@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&display=swap');

/* ══════════════════════════════════════
   HEADER  —  prefix: hd-
══════════════════════════════════════ */

.hd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 68px;
    background: rgba(6, 5, 12, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Rajdhani', sans-serif;
    transition: background .4s, border-color .4s, box-shadow .4s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hd-header.hd-scrolled {
    background: rgba(5, 4, 10, 0.97);
    border-color: rgba(200, 120, 40, 0.15);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.7);
}

/* scan line — красная черта ползёт по нижней границе */
.hd-scanline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

.hd-scanline::after {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(211, 5, 29, 0.9), transparent);
    animation: hd-scan 4s linear infinite;
}

@keyframes hd-scan {
    from {
        left: -30%;
    }
    to {
        left: 130%;
    }
}

/* ── Inner ── */
.hd-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 36px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 0;
}

/* ── Logo ── */
.hd-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    padding-right: 28px;
    transition: opacity .2s;
}

.hd-logo:hover {
    opacity: .8;
}

.hd-logo img {
    height: 48px;
    width: auto;
    display: block;
}

/* ── Nav ── */
.hd-nav {
    display: flex;
    align-items: stretch;
    flex: 1;
    height: 100%;
}

.hd-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    align-self: center;
}

.hd-item {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 100%;
}

.hd-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    height: 100%;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(200, 180, 140, 0.4);
    text-decoration: none;
    position: relative;
    transition: color .2s;
    white-space: nowrap;
}

/* hover — подъём иконки + светлый текст */
.hd-item:hover .hd-link {
    color: rgba(240, 230, 200, 0.85);
}

.hd-link i {
    font-size: 15px;
    transition: transform .25s, color .2s;
    color: rgba(255, 70, 70, 0.55);
}

.hd-item:hover .hd-link i {
    transform: translateY(-2px) scale(1.15);
    color: #ff6b6b;
}

/* hover — тонкая линия снизу */
.hd-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: rgba(255, 70, 70, 0.45);
    transform: scaleX(0);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.hd-item:hover .hd-link::after {
    transform: scaleX(1);
}

.hd-item:hover .hd-link::after {
    transform: scaleX(1);
}

/* АКТИВНЫЙ — толстая красная светящаяся линия снизу */
.hd-item.hd-active .hd-link {
    color: #fff;
}

.hd-item.hd-active .hd-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c8001a 15%, #ff2040 50%, #c8001a 85%, transparent);
    box-shadow: 0 0 14px rgba(211, 5, 29, 0.9), 0 0 4px rgba(255, 60, 80, 1);
    animation: hd-active-in .35s ease forwards;
}

@keyframes hd-active-in {
    from {
        opacity: 0;
        transform: scaleX(.3);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.hd-item.hd-active .hd-link::after {
    display: none;
}

.hd-item.hd-active .hd-link i {
    color: #ff4060;
    transform: none;
}


/* ── Online badge ── */
.hd-online {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    margin-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.hd-online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4db45e;
    animation: hd-blink 2s ease infinite;
    flex-shrink: 0;
}

@keyframes hd-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .25;
    }
}

.hd-online-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(77, 180, 94, 0.6);
    text-transform: uppercase;
}

.hd-online-count {
    font-size: 12px;
    font-weight: 700;
    color: #6cd480;
    letter-spacing: 1px;
}

/* ── Right ── */
.hd-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Lang ── */
.hd-lang {
    position: relative;
}

.hd-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    color: rgba(200, 180, 140, 0.5);
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all .2s;
}

.hd-lang-btn i {
    font-size: 9px;
    opacity: .5;
    transition: transform .2s;
}

.hd-lang-btn:hover {
    border-color: rgba(200, 120, 40, 0.35);
    color: #f0c060;
}

.hd-lang.open .hd-lang-btn i {
    transform: rotate(180deg);
}

.hd-lang-drop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(8, 7, 16, 0.99);
    border: 1px solid rgba(200, 120, 40, 0.2);
    border-radius: 3px;
    padding: 5px;
    min-width: 72px;
    display: none;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    animation: hd-drop .2s ease;
}

@keyframes hd-drop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hd-lang.open .hd-lang-drop {
    display: flex;
}

.hd-lang-item {
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(200, 180, 140, 0.45);
    text-decoration: none;
    border-radius: 2px;
    transition: all .15s;
    text-align: center;
}

.hd-lang-item:hover {
    background: rgba(200, 120, 40, 0.15);
    color: #f0c060;
}

/* ── ВХОД ── */
.hd-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(200, 180, 140, 0.55);
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}

.hd-btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: rgba(200, 120, 40, 0);
    transition: background .25s;
}

.hd-btn-login:hover {
    background: rgba(200, 120, 40, 0.1);
    border-color: rgba(200, 120, 40, 0.4);
    color: #f0c060;
}

.hd-btn-login:hover::before {
    background: #c0a060;
}

.hd-btn-login i {
    font-size: 12px;
    transition: transform .25s;
}

.hd-btn-login:hover i {
    transform: translateX(2px);
}

/* ── РЕГИСТРАЦИЯ ── */
.hd-btn-register {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px 9px 16px;
    background: #8a0010;
    border: 1px solid rgba(211, 5, 29, 0.35);
    color: #ffccd0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}

.hd-btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #ff5060, #8a0010);
}

.hd-btn-register::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 50%;
    height: 200%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    transition: left .5s ease;
}

.hd-btn-register:hover {
    background: #b8001a;
    color: #fff;
    box-shadow: 0 0 20px rgba(211, 5, 29, 0.4);
}

.hd-btn-register:hover::after {
    left: 140%;
}

.hd-btn-register i {
    font-size: 12px;
    transition: transform .3s;
    position: relative;
    z-index: 1;
}

.hd-btn-register span {
    position: relative;
    z-index: 1;
}

.hd-btn-register:hover i {
    transform: rotate(12deg) scale(1.15);
}

/* ── Burger ── */
.hd-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    cursor: pointer;
    padding: 0 9px;
    flex-shrink: 0;
    margin-left: 12px;
    transition: border-color .2s;
}

.hd-burger:hover {
    border-color: rgba(200, 120, 40, 0.4);
}

.hd-burger span {
    display: block;
    height: 1.5px;
    background: rgba(200, 180, 140, 0.6);
    border-radius: 1px;
    transition: all .3s;
    transform-origin: center;
}

.hd-burger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hd-burger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hd-burger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ══════════════════════════════════════
   MOBILE DRAWER
══════════════════════════════════════ */
.hd-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    pointer-events: none;
}

.hd-drawer.open {
    display: block;
    pointer-events: auto;
}

.hd-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: hd-ov-in .25s ease;
}

@keyframes hd-ov-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hd-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    background: #080710;
    border-right: 1px solid rgba(200, 120, 40, 0.15);
    display: flex;
    flex-direction: column;
    animation: hd-panel-in .3s cubic-bezier(.25, .46, .45, .94);
    overflow-y: auto;
}

@keyframes hd-panel-in {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.hd-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.hd-drawer-close {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    color: rgba(200, 180, 140, 0.4);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.hd-drawer-close:hover {
    background: rgba(211, 5, 29, 0.15);
    border-color: rgba(211, 5, 29, 0.3);
    color: #ff6060;
}

.hd-drawer-menu {
    flex: 1;
    list-style: none;
    padding: 12px 0;
}

.hd-drawer-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 22px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(200, 180, 140, 0.45);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all .2s;
}

.hd-drawer-menu li a:hover {
    color: #f0e8d8;
    background: rgba(255, 255, 255, 0.03);
    border-color: #d3051d;
    padding-left: 28px;
}

.hd-drawer-menu li.hd-active a {
    color: #fff;
    border-color: #d3051d;
    background: rgba(211, 5, 29, 0.08);
}

.hd-drawer-menu li a i {
    font-size: 13px;
    width: 18px;
    text-align: center;
    color: rgba(200, 120, 40, 0.45);
    transition: color .2s, transform .2s;
}

.hd-drawer-menu li a:hover i,
.hd-drawer-menu li.hd-active a i {
    color: #d3051d;
}

.hd-drawer-num {
    font-size: 9px;
    color: rgba(200, 120, 40, 0.35);
    letter-spacing: 1px;
    min-width: 18px;
}

.hd-drawer-footer {
    padding: 18px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.hd-drawer-footer .hd-btn-login,
.hd-drawer-footer .hd-btn-register {
    justify-content: center;
    clip-path: none;
    border-radius: 3px;
    padding: 12px;
    font-size: 12px;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1200px) {
    .hd-link {
        padding: 0 12px;
        letter-spacing: 1px;
    }

    .hd-link span {
        display: none;
    }

    .hd-link i {
        font-size: 15px;
        margin: 0;
    }

    .hd-sep {
        display: none;
    }

    .hd-item.hd-active .hd-link::before {
        left: 0;
        right: 0;
    }

    .hd-item:hover .hd-link::after {
        left: 0;
        right: 0;
    }
}

@media (max-width: 960px) {
    .hd-nav {
        display: none;
    }

    .hd-online {
        display: none;
    }

    .hd-right .hd-btn-login,
    .hd-right .hd-btn-register {
        display: none;
    }

    .hd-burger {
        display: flex;
        position: absolute;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hd-inner {
        padding: 0 18px;
    }

    .hd-logo img {
        height: 40px;
    }

    .hd-right .hd-lang {
        display: none;
    }
}