﻿/* ============================================
   СТРАНИЦА "ПРОФИЛЬ"
   ============================================ */

.profile-page {
    background-image: url('../images/Back2.jpeg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    position: relative;
    padding: clamp(120px, 14vh, 160px) var(--page-padding-x) clamp(40px, 6vw, 80px);
    min-height: 100vh;
}

    .profile-page::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        z-index: 1;
        pointer-events: none;
    }

.profile-inner {
    position: relative;
    z-index: 2;
    max-width: var(--page-max-width);
    margin: 0 auto;
}

/* ============================================
   ШАПКА ПРОФИЛЯ
   ============================================ */

.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(243, 156, 18, 0.5);
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.3);
    background: linear-gradient(160deg, #0d1b3a, #0a1428);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

    .profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.profile-info {
    min-width: 0;
    flex: 1;
}

.profile-top-line {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.profile-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.profile-rank-badge {
    padding: 5px 12px;
    background: rgba(93, 173, 226, 0.15);
    border: 1px solid rgba(93, 173, 226, 0.4);
    border-radius: 20px;
    color: #5dade2;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-nick {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    color: #fff;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.2;
    word-break: break-word;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #2ecc71;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ============================================
   ТАБЫ
   ============================================ */

.profile-tabs {
    display: flex;
    gap: 8px;
    background: rgba(13, 27, 58, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(93, 173, 226, 0.2);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 25px;
    overflow-x: auto;
    scrollbar-width: none;
}

    .profile-tabs::-webkit-scrollbar {
        display: none;
    }

.profile-tab {
    flex: 1;
    min-width: 130px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #b8c4d4;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

    .profile-tab:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
    }

    .profile-tab.active {
        background: linear-gradient(135deg, #2196f3, #1976d2);
        color: #fff;
        box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
    }

/* ============================================
   КОНТЕНТ ТАБОВ
   ============================================ */

.profile-tab-content {
    display: none;
}

    .profile-tab-content.active {
        display: block;
        animation: fadeInTab 0.25s ease;
    }

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   6 ПОКАЗАТЕЛЕЙ
   ============================================ */

.profile-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.profile-stat-card {
    padding: 20px 15px;
    background: linear-gradient(160deg, #0d1b3a 0%, #0a1428 100%);
    border: 1px solid rgba(93, 173, 226, 0.25);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s, border-color 0.3s;
}

    .profile-stat-card:hover {
        transform: translateY(-3px);
        border-color: #5dade2;
    }

.profile-stat-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.profile-stat-value {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    font-weight: 800;
    color: #f39c12;
}

/* ============================================
   ТАБЛИЦА ПО СЕРВЕРАМ
   ============================================ */

.profile-servers-table {
    background: rgba(13, 27, 58, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(93, 173, 226, 0.25);
    border-radius: 14px;
    overflow: hidden;
}

.profile-servers-header,
.profile-server-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr 1.2fr;
    gap: 20px;
    align-items: center;
    padding: 16px 25px;
}

.profile-servers-header {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(93, 173, 226, 0.25);
    color: #5dade2;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-server-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ddd;
    font-size: 0.95rem;
    transition: background 0.15s;
}

    .profile-server-row:last-child {
        border-bottom: none;
    }

    .profile-server-row:hover {
        background: rgba(93, 173, 226, 0.05);
    }

.profile-server-name {
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-server-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
}

    .profile-server-stat .icon {
        font-size: 0.9rem;
        color: #5dade2;
    }

/* ============================================
   ЗАГЛУШКИ ДЛЯ ДРУГИХ ТАБОВ
   ============================================ */

.profile-placeholder {
    padding: 60px 30px;
    background: linear-gradient(160deg, #0d1b3a 0%, #0a1428 100%);
    border: 1px solid rgba(93, 173, 226, 0.25);
    border-radius: 14px;
    text-align: center;
}

.profile-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    line-height: 1;
}

.profile-placeholder h3 {
    font-size: 1.3rem;
    color: #fff;
    margin: 0 0 8px;
}

.profile-placeholder p {
    font-size: 0.95rem;
    color: #888;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ============================================
   НАСТРОЙКИ
   ============================================ */

.profile-settings {
    padding: 25px clamp(20px, 3vw, 35px);
    background: linear-gradient(160deg, #0d1b3a 0%, #0a1428 100%);
    border: 1px solid rgba(93, 173, 226, 0.25);
    border-radius: 14px;
}

.profile-settings-title {
    font-size: 1.2rem;
    color: #fff;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

    .profile-setting-row:last-of-type {
        border-bottom: none;
    }

.profile-setting-info {
    min-width: 0;
    flex: 1;
}

.profile-setting-name {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-setting-desc {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.4;
}

/* Переключатель */
.profile-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

    .profile-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.profile-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: background 0.3s;
}

    .profile-switch-slider::before {
        content: '';
        position: absolute;
        height: 20px;
        width: 20px;
        left: 3px;
        top: 3px;
        background: #fff;
        border-radius: 50%;
        transition: transform 0.3s;
    }

.profile-switch input:checked + .profile-switch-slider {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

    .profile-switch input:checked + .profile-switch-slider::before {
        transform: translateX(24px);
    }

.profile-settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

/* ============================================
   АДАПТИВ
   ============================================ */

@media (max-width: 1100px) {
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-top-line {
        justify-content: center;
    }

    .profile-status {
        justify-content: center;
    }

    .profile-servers-header,
    .profile-server-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 14px 18px;
        font-size: 0.9rem;
    }

        .profile-servers-header > *:nth-child(n+3),
        .profile-server-row > *:nth-child(n+3) {
            display: none;
        }
}

@media (max-width: 600px) {
    .profile-stats {
        grid-template-columns: 1fr 1fr;
    }

    .profile-avatar {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }

    .profile-setting-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 400px) {
    .profile-stats {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   КНОПКА ПРИВЯЗКИ STEAM
   ============================================ */
.steam-link-btn {
    display: inline-block;
    background: linear-gradient(to bottom, #a4d007, #6b9e02);
    border-radius: 4px;
    padding: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.15s, filter 0.2s;
    cursor: pointer;
}

    .steam-link-btn:hover {
        filter: brightness(1.1);
        transform: translateY(-1px);
    }

.steam-link-btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to bottom, #74a800, #5e8a00);
    color: #fff;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 3px;
}

.steam-icon {
    width: 20px;
    height: 20px;
    fill: #fff;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.3));
}