/*
 * Shared visual foundation for every migrated Movie Box Wiki route.
 *
 * Page-specific files only define their own content layouts. Keeping the
 * document reset and common site chrome here prevents the former per-page CSS
 * copies from drifting apart.
 */
:root {
    --bg: #000;
    --text: #fff;
    --muted: #c8cfdb;
    --line: #1f2937;
    --brand: #2f80ff;
    --brand-2: #22c55e;
    --max: 1180px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
    width: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family:
        'Inter',
        'Segoe UI',
        'Helvetica Neue',
        Arial,
        system-ui,
        -apple-system,
        sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    margin-inline: auto;
    width: min(100% - 2rem, var(--max));
}

/* The header remains shared because every route uses the same React component. */
.site-header {
    backdrop-filter: blur(10px);
    background: rgba(15, 17, 21, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .inner {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr auto 1fr;
    padding: 0.9rem 0;
}

.brand {
    align-items: center;
    display: inline-flex;
    gap: 0.65rem;
    min-width: 0;
}

.brand-mark {
    display: block;
    flex: 0 0 auto;
    height: 40px;
    object-fit: contain;
    width: 40px;
}

.brand-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    justify-self: center;
}

.top-nav a {
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text);
    font-size: 1.02rem;
    padding: 0.45rem 0.72rem;
    transition: 0.2s ease;
}

.top-nav a.active,
.top-nav a:hover,
.top-nav a:focus-visible {
    background: rgba(47, 128, 255, 0.16);
    border-color: rgba(47, 128, 255, 0.65);
    outline: none;
}

/* The mobile menu interaction is managed by PageInteractions. */
.mobile-nav-toggle {
    display: none;
}

@media (max-width: 760px) {
    .site-header .inner {
        gap: 0.55rem;
        grid-template-columns: auto 1fr auto;
    }

    .mobile-nav-toggle {
        align-items: center;
        background: rgba(47, 128, 255, 0.12);
        border: 1px solid rgba(47, 128, 255, 0.55);
        border-radius: 10px;
        color: #dbe9ff;
        cursor: pointer;
        display: inline-flex;
        font-size: 1.15rem;
        height: 38px;
        justify-content: center;
        line-height: 1;
        width: 38px;
    }

    .brand {
        justify-self: center;
    }

    .brand-text {
        max-width: 42vw;
    }

    .site-header .top-nav {
        align-items: stretch;
        background: rgba(6, 10, 18, 0.96);
        border: 1px solid rgba(47, 128, 255, 0.45);
        border-radius: 12px;
        box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
        display: none;
        flex-direction: column;
        gap: 0.16rem;
        left: 1rem;
        padding: 0.45rem;
        position: absolute;
        top: calc(100% + 0.45rem);
        width: min(78vw, 280px);
        z-index: 220;
    }

    .site-header.mobile-menu-open .top-nav {
        display: flex;
    }

    .site-header .top-nav a {
        text-align: left;
    }
}
