/* ========================================
   TEAM PAGE STYLES
   ======================================== */

/* Team Hero Section */
.team-hero {
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    animation: fadeInDown 0.8s ease-out;
}

.section-description {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 1rem auto 0;
    line-height: 1.6;
}

/* Team Section */
.team-section {
    padding: 4rem 0 6rem;
    min-height: 60vh;
}

/* Loading State */
.team-loading {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.5s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 4px solid rgba(124, 58, 237, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.team-loading p {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-lg);
}

/* Error State */
.team-error {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.5s ease-out;
}

.team-error svg {
    stroke: var(--color-error);
    margin-bottom: 1.5rem;
}

.team-error p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

/* Team Member Card */
.team-member {
    background: linear-gradient(
        135deg,
        rgba(20, 20, 45, 0.9) 0%,
        rgba(30, 30, 60, 0.85) 100%
    );
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(124, 58, 237, 0.05);
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-member:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(124, 58, 237, 0.2);
}

.team-member:hover::before {
    opacity: 1;
}

/* Avatar */
.member-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.avatar-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    padding: 4px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
}

.team-member:hover .avatar-wrapper {
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.6);
    transform: scale(1.05);
}

.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-dark-bg);
    background: var(--color-dark-bg-secondary);
}

/* Status Badge */
.status-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid var(--color-dark-bg);
    background: var(--color-success);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.offline {
    background: var(--color-gray-600);
    box-shadow: none;
}

.status-badge.idle {
    background: var(--color-warning);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.status-badge.dnd {
    background: var(--color-error);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

/* Member Info */
.member-name {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.member-role {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(168, 139, 250, 0.15) 100%);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary-light);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.team-member:hover .member-role {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(168, 139, 250, 0.25) 100%);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Role Colors */
.member-role.founder { border-color: #ef4444; color: #fca5a5; }
.member-role.developer { border-color: #8b5cf6; color: #c4b5fd; }
.member-role.admin { border-color: #f59e0b; color: #fbbf24; }

.member-bio {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 0;
    min-height: 60px;
}

/* Team Stats Section */
.team-stats {
    padding: 4rem 0 6rem;
    background: linear-gradient(
        180deg,
        rgba(124, 58, 237, 0.03) 0%,
        transparent 100%
    );
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card {
    background: linear-gradient(
        135deg,
        rgba(20, 20, 45, 0.9) 0%,
        rgba(30, 30, 60, 0.85) 100%
    );
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(124, 58, 237, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(124, 58, 237, 0.15);
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 16px;
    color: var(--color-white);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.5);
}

.stat-value {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .team-hero {
        padding: 5rem 0 3rem;
    }

    .team-section {
        padding: 3rem 0 4rem;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .team-member {
        padding: 1.5rem;
    }

    .member-avatar {
        width: 100px;
        height: 100px;
    }

    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .stat-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .team-hero {
        padding: 4rem 0 2rem;
    }

    .section-description {
        font-size: var(--font-size-base);
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .team-member {
        padding: 1.25rem;
    }

    .member-avatar {
        width: 80px;
        height: 80px;
    }

    .avatar-wrapper {
        width: 80px;
        height: 80px;
    }

    .member-name {
        font-size: var(--font-size-lg);
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-value {
        font-size: var(--font-size-3xl);
    }
}
