/* ── Unified Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 65px;
    background: rgba(18, 18, 32, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
}

.navbar-container {
    position: relative;          /* для абсолютного позиционирования дочерних блоков */
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;     /* центральное меню всегда по центру */
}

/* ===== Логотип – привязан к левому краю ===== */
.navbar-logo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
    color: #ffd700;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}
.navbar-logo:hover { opacity: 0.85; }

/* ===== Центральное меню – всегда по центру ===== */
.navbar-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    /* центрируется автоматически благодаря justify-content:center у родителя */
}

/* ===== Правый блок – привязан к правому краю ===== */
.nav-right {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    /* не влияет на ширину и центрирование меню */
}

.nav-link {
    color: #a0a5c0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ffd700;
    border-radius: 2px;
}

#navProfileContainer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    box-sizing: border-box;
    white-space: nowrap;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-profile:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffd700;
}

.nav-profile svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.nav-profile .username {
    font-weight: 500;
}

.nav-profile .guest-badge {
    font-size: 11px;
    background: #2a2a4a;
    padding: 2px 8px;
    border-radius: 12px;
    color: #aaa;
    margin-left: 4px;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    box-sizing: border-box;
    white-space: nowrap;
    border-radius: 8px;
    background: #e94560;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}

.nav-login:hover {
    background: #c73652;
}

/* ===== Hamburger button ===== */
.navbar-hamburger {
    display: none;
}

/* ===== Мобильные корректировки ===== */
@media (max-width: 600px) {
    .navbar-container { padding: 0 12px; }
    .navbar-hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }
    .navbar-hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #a0a5c0;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    .navbar-hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .navbar-hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .navbar-hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    .navbar-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        background: rgba(18, 18, 32, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 16px 20px;
        gap: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 1000;
    }
    .navbar-menu.open {
        display: flex;
    }
    .navbar-menu .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 1rem;
    }
    .navbar-menu .nav-link:last-child {
        border-bottom: none;
    }
    .nav-right {
        display: none;
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        background: rgba(18, 18, 32, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 999;
        justify-content: center;
    }
    .nav-right.open {
        display: flex;
    }
    .nav-profile .username,
    .nav-profile .guest-badge { display: none; }
    .lang-switcher { display: none; }
    .navbar-logo { left: 12px; font-size: 1rem; }
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a0a5c0;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    height: 38px;
    margin-right: 8px;
    box-sizing: border-box;
}

.lang-switcher:hover {
    border-color: #ffd700;
    color: #fff;
}

.lang-switcher option {
    background: #1e1e32;
    color: #fff;
}

/* ── Register Modal (shared across all pages) ── */
.register-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.register-modal.active { display: flex; }
.register-modal .modal-content {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
}
.register-modal .modal-content h2 {
    color: #ffd700;
    font-size: 26px;
    margin-bottom: 10px;
}
.register-modal .modal-content p {
    color: #ccc;
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
}
.register-modal .btn-auth {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    margin-bottom: 10px;
}
.register-modal .btn-primary {
    background: #e94560;
    color: white;
}
.register-modal .btn-primary:hover { background: #c73652; }
.register-modal .btn-login {
    background: #2a2a4a;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.register-modal .btn-login:hover { background: #3a3a5a; color: #fff; }
.register-modal .btn-later {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    padding: 8px;
    margin-top: 4px;
}
.register-modal .btn-later:hover { color: #aaa; }

/* ── Online Hero ── */
.online-hero {
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
}
@media (max-width: 600px) {
    .online-hero { font-size: 12px; }
}