/* ===========================
   HEADER — CUBE‑16
   =========================== */

.cube16-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    background: linear-gradient(135deg, #0f1115, #1a1d22);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 25px rgba(0, 140, 255, 0.25);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* LOGO */
.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    height: 48px;
    filter: drop-shadow(0 0 8px rgba(0,140,255,0.6));
}

.brand {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #e6f1ff;
    text-shadow: 0 0 8px rgba(0,140,255,0.7);
}

/* NAVIGATION */
.nav-links {
    display: flex;
    gap: 26px;
}

.nav-links a {
    color: #c9d4e2;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: 0.25s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #008cff, #9b4dff);
    transition: width 0.3s;
    border-radius: 2px;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a:hover::after {
    width: 100%;
}

/* LANG SWITCH */
.lang-switch {
    position: relative;
    flex: 0 0 auto;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    background: rgba(20, 23, 28, 0.92);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 13px;
    border-radius: 999px;
    color: #e6f1ff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.25s;
}

.lang-toggle:hover,
.lang-switch.open .lang-toggle {
    background: linear-gradient(135deg, rgba(0,140,255,0.35), rgba(155,77,255,0.35));
    color: #fff;
    border-color: rgba(255,255,255,0.28);
    box-shadow: 0 0 18px rgba(0,140,255,0.42);
}

.lang-globe {
    font-size: 1rem;
    line-height: 1;
}

.lang-current {
    white-space: nowrap;
}

.lang-chevron {
    font-size: 0.74rem;
    opacity: 0.8;
    transition: transform 0.2s;
}

.lang-switch.open .lang-chevron {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    padding: 8px;
    background: rgba(15, 17, 21, 0.98);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    box-shadow: 0 20px 42px rgba(0,0,0,0.55), 0 0 22px rgba(0,140,255,0.20);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.18s, transform 0.18s;
    z-index: 1000;
}

.lang-switch.open .lang-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #c9d4e2;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.18s;
}

.lang-option:hover,
.lang-option:focus {
    color: #fff;
    background: rgba(255,255,255,0.07);
    outline: none;
}

.lang-option.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0,140,255,0.45), rgba(155,77,255,0.35));
}

.lang-option.active::before {
    content: "✓";
    color: #fff;
    margin-right: -6px;
}

.lang-name {
    flex: 1;
    white-space: nowrap;
}

.lang-code {
    color: #8f9bb0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .cube16-header {
        padding: 14px 18px;
    }

    .lang-current {
        max-width: 94px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lang-menu {
        right: 0;
        min-width: min(260px, calc(100vw - 36px));
    }
}
