::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #14532d;
    border-radius: 3px;
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #000 inset;
    -webkit-text-fill-color: #86efac;
}

#nav-links a.nav-active,
#nav-drawer a.nav-active {
    color: #6ee7a7;
    box-shadow: inset 0 -2px 0 0 currentColor;
}

#nav-drawer a.nav-active {
    background: rgba(34, 197, 94, 0.08);
}

.htmx-settling {
    opacity: 0;
    transition: opacity 200ms;
}
.htmx-settling.htmx-swapping {
    opacity: 1;
}

.tooltip {
    position: relative;
    cursor: pointer;
}

.tooltip:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px;
    border-radius: 3px;
    background: #14532d;
    color: #86efac;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
}

.tooltip:hover:before {
    visibility: visible;
    opacity: 1;
}

#primordis-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1000;
    pointer-events: none;
    overflow: hidden;
}
#primordis-bg svg {
    width: 100%;
    height: 100%;
}

.game-content {
    position: relative;
    z-index: 1;
}

.panel {
    background: rgba(7, 26, 12, 0.75);
    backdrop-filter: blur(2px);
    border-radius: 8px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lang-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--c-text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--c-accent);
}

.lang-sep {
    color: var(--c-border);
    font-size: 11px;
}

/* ── NAV BASE ───────────────────────────────────────────── */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 52px;
    background: rgba(4, 15, 7, 0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--c-border);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.nav-links a {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--c-accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-left: auto;
}

/* ── HAMBURGER ──────────────────────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    height: 1px;
    background: var(--c-text-dim);
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.25s, background 0.2s;
}

.nav-hamburger:hover span {
    background: var(--c-accent);
}

/* otvorený stav — X */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ── DRAWER + OVERLAY ───────────────────────────────────── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 98;
    background: rgba(0, 0, 0, 0.5);
}

/* ── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 860px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100dvh;
        width: min(280px, 80vw);
        z-index: 99;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 72px 0 2rem;
        background: rgba(4, 15, 7, 0.97);
        backdrop-filter: blur(8px);
        border-left: 1px solid var(--c-border);
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links a {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 12px;
        border-bottom: 1px solid var(--c-border);
    }

    /* otvorený drawer */
    .nav-links.open {
        transform: translateX(0);
    }

    .nav-overlay.open {
        display: block;
    }
}

@keyframes highlight-fade {
    0%   { background: rgba(29, 158, 117, 0.55); box-shadow: 0 0 0 2px rgba(29, 158, 117, 0.8), 0 0 16px rgba(29, 158, 117, 0.3); }
    30%  { background: rgba(29, 158, 117, 0.35); box-shadow: 0 0 0 1px rgba(29, 158, 117, 0.5), 0 0 8px rgba(29, 158, 117, 0.2); }
    100% { background: transparent; box-shadow: none; }
}

.htmx-highlight {
    animation: highlight-fade 3.5s ease forwards;
    border-radius: 4px;
}