.profile-container {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3.5vw, 32px);
    max-width: 900px;
    margin: 0 auto;
}

.profile-card {
    padding: clamp(28px, 4vw, 40px);
    border-radius: 18px;
    border: 1px solid var(--white-15);
    backdrop-filter: blur(12px);
    text-align: center;
}

.dark-theme .profile-card {
    background: var(--dark-primary-08);
    border-color: var(--dark-primary-20);
}

.light-theme .profile-card {
    background: var(--light-primary-08);
    border-color: var(--light-primary-20);
}

.profile-avatar-large {
    width: clamp(96px, 12vw, 128px);
    height: clamp(96px, 12vw, 128px);
    border-radius: 50%;
    margin: 0 auto clamp(16px, 2.5vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3rem);
}

.dark-theme .profile-avatar-large {
    background: linear-gradient(135deg, var(--dark-primary), var(--dark-secondary));
    color: var(--white);
    box-shadow: 0 8px 32px var(--dark-primary-30);
}

.light-theme .profile-avatar-large {
    background: linear-gradient(135deg, var(--light-primary), var(--light-secondary));
    color: var(--white);
    box-shadow: 0 8px 32px var(--light-primary-30);
}

.profile-card h3 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.profile-email {
    font-size: clamp(0.85rem, 1.3vw, 0.95rem);
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: clamp(20px, 3vw, 28px);
}

.profile-team {
    font-size: clamp(0.85rem, 1.3vw, 0.95rem);
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: clamp(20px, 3vw, 28px);
}

.profile-team a {
    text-decoration: none;
    font-weight: 800;
    transition: all 0.3s ease;
}

.dark-theme .profile-team a {
    color: var(--dark-secondary);
}

.light-theme .profile-team a {
    color: var(--light-primary);
}

.profile-team a:hover {
    text-decoration: underline;
}

.profile-tabs-container {
    padding: clamp(24px, 3.5vw, 32px);
    border-radius: 18px;
    border: 1px solid var(--white-15);
    backdrop-filter: blur(12px);
}

.dark-theme .profile-tabs-container {
    background: var(--dark-primary-08);
    border-color: var(--dark-primary-20);
}

.light-theme .profile-tabs-container {
    background: var(--light-primary-08);
    border-color: var(--light-primary-20);
}

.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: clamp(24px, 3.5vw, 32px);
    padding: 6px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
}

.dark-theme .profile-tabs {
    background: var(--dark-primary-08);
}

.light-theme .profile-tabs {
    background: var(--light-primary-08);
}

.profile-tab {
    flex: 1;
    padding: clamp(10px, 1.5vw, 12px);
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.dark-theme .profile-tab {
    color: var(--dark-text);
}

.light-theme .profile-tab {
    color: var(--light-text);
}

.dark-theme .profile-tab.active {
    background: linear-gradient(135deg, var(--dark-primary), var(--dark-secondary));
    color: var(--white);
    box-shadow: 0 4px 16px var(--dark-primary-30);
}

.light-theme .profile-tab.active {
    background: linear-gradient(135deg, var(--light-primary), var(--light-secondary));
    color: var(--white);
    box-shadow: 0 4px 16px var(--light-primary-30);
}

.profile-tab:hover:not(.active) {
    transform: translateY(-2px);
}

.dark-theme .profile-tab:hover:not(.active) {
    background: var(--dark-primary-12);
}

.light-theme .profile-tab:hover:not(.active) {
    background: var(--light-primary-12);
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.profile-team-btn {
    padding: clamp(8px, 1.2vw, 10px) clamp(16px, 2.5vw, 20px);
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.dark-theme .profile-team-btn {
    background: var(--dark-primary-15);
    color: var(--dark-secondary);
    border: 1px solid var(--dark-primary-30);
}

.light-theme .profile-team-btn {
    background: var(--light-primary-15);
    color: var(--light-primary);
    border: 1px solid var(--light-primary-30);
}

.profile-team-btn:hover {
    transform: translateY(-2px);
}

.dark-theme .profile-team-btn:hover {
    background: var(--dark-primary-25);
    box-shadow: 0 4px 16px var(--dark-primary-30);
}

.light-theme .profile-team-btn:hover {
    background: var(--light-primary-25);
    box-shadow: 0 4px 16px var(--light-primary-30);
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 3vw, 32px);
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: clamp(14px, 2vw, 18px);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    min-width: clamp(80px, 12vw, 100px);
}

.dark-theme .stat-box {
    background: var(--dark-primary-12);
}

.light-theme .stat-box {
    background: var(--light-primary-12);
}

.stat-value {
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 900;
}

.dark-theme .stat-value {
    color: var(--dark-secondary);
}

.light-theme .stat-value {
    color: var(--light-primary);
}

.stat-label {
    font-size: clamp(0.7rem, 1.1vw, 0.8rem);
    font-weight: 700;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.solved-challenges {
    padding: clamp(24px, 3.5vw, 32px);
    border-radius: 18px;
    border: 1px solid var(--white-15);
    backdrop-filter: blur(12px);
}

.dark-theme .solved-challenges {
    background: var(--dark-primary-08);
    border-color: var(--dark-primary-20);
}

.light-theme .solved-challenges {
    background: var(--light-primary-08);
    border-color: var(--light-primary-20);
}

.solved-challenges h3 {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    font-weight: 900;
    margin-bottom: clamp(16px, 2.5vw, 20px);
}

.solved-table {
    border-radius: 14px;
    border: 1px solid var(--white-15);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.dark-theme .solved-table {
    background: var(--dark-primary-05);
    border-color: var(--dark-primary-15);
}

.light-theme .solved-table {
    background: var(--light-primary-05);
    border-color: var(--light-primary-15);
}

.solved-table .table-row {
    grid-template-columns: 2fr 1.5fr 0.8fr 1fr;
}

.rank-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: clamp(0.6rem, 0.9vw, 0.7rem);
    font-weight: 800;
    margin-left: 8px;
    vertical-align: middle;
}

.dark-theme .rank-badge {
    background: var(--dark-primary-20);
    color: var(--dark-secondary);
}

.light-theme .rank-badge {
    background: var(--light-primary-20);
    color: var(--light-primary);
}

.rank-badge.first-blood {
    background: var(--error-light);
    color: var(--error-primary);
    border: 1px solid var(--error-border);
}

.team-profile-container {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3.5vw, 32px);
    max-width: 900px;
    margin: 0 auto;
}

.team-profile-card {
    padding: clamp(28px, 4vw, 40px);
    border-radius: 18px;
    border: 1px solid var(--white-15);
    backdrop-filter: blur(12px);
    text-align: center;
}

.dark-theme .team-profile-card {
    background: var(--dark-primary-08);
    border-color: var(--dark-primary-20);
}

.light-theme .team-profile-card {
    background: var(--light-primary-08);
    border-color: var(--light-primary-20);
}

.team-avatar-large {
    width: clamp(96px, 12vw, 128px);
    height: clamp(96px, 12vw, 128px);
    border-radius: 50%;
    margin: 0 auto clamp(16px, 2.5vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3rem);
}

.dark-theme .team-avatar-large {
    background: linear-gradient(135deg, var(--dark-primary), var(--dark-secondary));
    color: var(--white);
    box-shadow: 0 8px 32px var(--dark-primary-30);
}

.light-theme .team-avatar-large {
    background: linear-gradient(135deg, var(--light-primary), var(--light-secondary));
    color: var(--white);
    box-shadow: 0 8px 32px var(--light-primary-30);
}

.team-profile-card h3 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.team-description {
    font-size: clamp(0.85rem, 1.3vw, 0.95rem);
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: clamp(20px, 3vw, 28px);
}

.team-stats {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 3vw, 32px);
}

.team-tabs-container {
    padding: clamp(24px, 3.5vw, 32px);
    border-radius: 18px;
    border: 1px solid var(--white-15);
    backdrop-filter: blur(12px);
}

.dark-theme .team-tabs-container {
    background: var(--dark-primary-08);
    border-color: var(--dark-primary-20);
}

.light-theme .team-tabs-container {
    background: var(--light-primary-08);
    border-color: var(--light-primary-20);
}

.team-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: clamp(24px, 3.5vw, 32px);
    padding: 6px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
}

.dark-theme .team-tabs {
    background: var(--dark-primary-08);
}

.light-theme .team-tabs {
    background: var(--light-primary-08);
}

.team-tab {
    flex: 1;
    padding: clamp(10px, 1.5vw, 12px);
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.dark-theme .team-tab {
    color: var(--dark-text);
}

.light-theme .team-tab {
    color: var(--light-text);
}

.dark-theme .team-tab.active {
    background: linear-gradient(135deg, var(--dark-primary), var(--dark-secondary));
    color: var(--white);
    box-shadow: 0 4px 16px var(--dark-primary-30);
}

.light-theme .team-tab.active {
    background: linear-gradient(135deg, var(--light-primary), var(--light-secondary));
    color: var(--white);
    box-shadow: 0 4px 16px var(--light-primary-30);
}

.team-tab:hover:not(.active) {
    transform: translateY(-2px);
}

.dark-theme .team-tab:hover:not(.active) {
    background: var(--dark-primary-12);
}

.light-theme .team-tab:hover:not(.active) {
    background: var(--light-primary-12);
}

.team-tab-content {
    display: none;
}

.team-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.team-members-table {
    border-radius: 14px;
    border: 1px solid var(--white-15);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.dark-theme .team-members-table {
    background: var(--dark-primary-05);
    border-color: var(--dark-primary-15);
}

.light-theme .team-members-table {
    background: var(--light-primary-05);
    border-color: var(--light-primary-15);
}

.team-members-table .table-row {
    grid-template-columns: 2fr 1fr 0.8fr 0.8fr 0.8fr;
}

@media (max-width: 768px) {
    .profile-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-box {
        width: 100%;
        max-width: 200px;
    }

    .profile-container {
        max-width: 100%;
    }

    .team-stats {
        flex-direction: column;
        align-items: center;
    }

    .team-profile-container {
        max-width: 100%;
    }

    .team-members-table .table-row {
        grid-template-columns: 2fr 1fr 0.8fr;
    }

    .solved-table .table-row {
        grid-template-columns: 2.5fr 1.5fr 0.8fr;
    }
}

@media (max-width: 1024px) {
    .team-members-table .table-row {
        grid-template-columns: 2fr 1fr 0.8fr 0.8fr;
    }

    .solved-table .table-row {
        grid-template-columns: 0.5fr 2fr 1.5fr 0.8fr 1fr;
    }
}