/* ==========================================================================
   SITE CHROME — the header and the mobile bottom bar, on every page
   --------------------------------------------------------------------------
   One stylesheet so every page shares the same header and bottom bar.
   Load it LAST on each page. Page stylesheets still carry older header
   rules (styles.css, 1styles.css, inline <style> blocks), so selectors are
   qualified with .site-header / .mobile-bottom-nav and key properties use
   !important. Tokens are prefixed --as- so they can't collide with a page's
   own variables.
   Behaviour (active link, solid-on-scroll, hide-on-scroll) is in
   site-chrome.js.
   ========================================================================== */

@font-face {
    font-family: 'futur';
    src: url('/Fonts/futura/futura medium bt.woff2') format('woff2');
    font-display: swap;
}

:root {
    --as-gutter: 16px;
    --as-header-h: 64px;
    --as-nav-h: 60px;
    --as-bg-rgb: 10, 9, 16;
    --as-text: #f5f3fa;
    --as-text-2: rgba(245, 243, 250, 0.68);
    --as-hairline: rgba(255, 255, 255, 0.08);
    --as-hairline-strong: rgba(255, 255, 255, 0.2);
    --as-surface-1: rgba(255, 255, 255, 0.05);
    --as-surface-2: rgba(255, 255, 255, 0.1);
    /* Brand lilac, lifted from #7a65c2 so 12px labels pass contrast */
    --as-accent: #a08ff5;
    --as-aurora: linear-gradient(90deg, #12d6c5 0%, #3b82f6 48%, #b395e8 100%);
    --as-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --as-dur: 200ms;
}

@media (min-width: 768px) {
    :root {
        --as-gutter: 32px;
    }
}

@media (min-width: 1024px) {
    :root {
        --as-gutter: 48px;
        --as-header-h: 72px;
    }
}

@media (min-width: 1440px) {
    :root {
        --as-gutter: 64px;
    }
}

/* ---------- Header -------------------------------------------------------- */

header.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: var(--as-gutter);
    width: auto !important;
    height: var(--as-header-h) !important;
    margin: 0 !important;
    padding: 0 var(--as-gutter) !important;
    border: 0 !important;
    border-radius: 0 !important;
    /* Soft scrim so the header reads over any hero image */
    background: linear-gradient(180deg,
            rgba(var(--as-bg-rgb), 0.82) 0%,
            rgba(var(--as-bg-rgb), 0.38) 60%,
            rgba(var(--as-bg-rgb), 0) 100%) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    font-family: 'futur', sans-serif;
    color: var(--as-text);
    transition: transform 0.3s var(--as-ease), background-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Past the top of the page: frosted glass with a hairline */
header.site-header.is-solid {
    background: rgba(var(--as-bg-rgb), 0.74) !important;
    backdrop-filter: blur(20px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
    box-shadow: inset 0 -1px 0 var(--as-hairline) !important;
}

/* Scrolling down tucks it away; scrolling up brings it back */
header.site-header.is-hidden {
    transform: translateY(-100%) !important;
}

/* Movie and TV pages on phones: the header sits at the top of the page and
   scrolls away with it. It doesn't follow the page or come back on scroll up. */
@media (max-width: 768px) {
    header.site-header.sits-top {
        position: absolute !important;
        transform: none !important;
    }
}

header.site-header .site-logo {
    display: flex !important;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none;
}

/* The logo artwork has wide transparent margins (~45% of its height), so the
   image is drawn taller than the header; negative margins keep the header's
   height and left edge where they are. */
header.site-header .logo-img {
    display: block !important;
    width: auto !important;
    height: 60px !important;
    max-width: none !important;
    margin: -8px 0 -8px -4px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

@media (min-width: 769px) {
    header.site-header .logo-img {
        height: 76px !important;
        margin: -12px 0 -12px -6px !important;
    }
}

header.site-header .site-nav {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--as-text) !important;
}

/* Nav links: one segmented pill (desktop) */
header.site-header .header-icons {
    display: none !important;
}

@media (min-width: 769px) {
    header.site-header .header-icons {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 4px !important;
        margin: 0 !important;
        padding: 4px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid var(--as-hairline) !important;
        border-radius: 999px !important;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    header.site-header .header-icons a,
    header.site-header .header-icons .header-browse-button {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        height: 40px !important;
        margin: 0 !important;
        padding: 0 16px !important;
        border: 0 !important;
        border-radius: 999px !important;
        background: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
        font-family: 'futur', sans-serif !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        line-height: 1 !important;
        letter-spacing: 0.01em !important;
        text-decoration: none !important;
        color: var(--as-text-2) !important;
        cursor: pointer;
        transition: color var(--as-dur) ease, background-color var(--as-dur) ease !important;
    }

    header.site-header .header-icons .header-browse-button {
        gap: 4px !important;
        padding-right: 12px !important;
    }

    header.site-header .header-icons .material-symbols-outlined {
        font-size: 20px !important;
        margin: 0 !important;
        color: inherit !important;
        text-shadow: none !important;
    }

    header.site-header .header-icons a:hover,
    header.site-header .header-icons .header-browse-button:hover {
        color: var(--as-text) !important;
        background: rgba(255, 255, 255, 0.06) !important;
    }

    header.site-header .header-icons a.active,
    header.site-header .header-icons .header-browse-button.modal-open {
        color: var(--as-text) !important;
        background: rgba(255, 255, 255, 0.12) !important;
    }

    header.site-header .header-icons a:focus-visible,
    header.site-header .header-icons .header-browse-button:focus-visible {
        outline: 2px solid #fff !important;
        outline-offset: 2px;
    }
}

header.site-header .browse-arrow {
    font-size: 20px !important;
    transition: transform 0.3s var(--as-ease);
}

header.site-header .header-browse-button.modal-open .browse-arrow {
    transform: rotate(180deg);
}

/* Round icon buttons: Search on desktop, Account on mobile */
header.site-header .header-round-btn {
    display: grid !important;
    place-items: center;
    flex: 0 0 auto;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--as-surface-1) !important;
    border: 1px solid var(--as-hairline) !important;
    box-shadow: none !important;
    color: var(--as-text) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color var(--as-dur) ease, border-color var(--as-dur) ease;
}

header.site-header .header-round-btn .material-symbols-outlined {
    font-size: 24px !important;
    color: inherit !important;
    text-shadow: none !important;
    margin: 0 !important;
}

header.site-header .header-round-btn:hover {
    background: var(--as-surface-2) !important;
    border-color: var(--as-hairline-strong) !important;
}

header.site-header .header-round-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

header.site-header .header-profile.active {
    border-color: var(--as-accent) !important;
    color: var(--as-accent) !important;
}

@media (min-width: 769px) {
    header.site-header .header-profile {
        display: none !important;
    }
}

@media (max-width: 768px) {
    header.site-header .header-search {
        display: none !important;
    }
}

/* Page extras that live in the header keep working but take the new look */
header.site-header #show-auth-button,
header.site-header .hamburger-icon {
    display: none !important;
}

/* Explore pages: inline search box between logo and nav (desktop only) */
header.site-header > .search-container {
    flex: 0 1 360px;
    margin: 0 auto !important;
}

@media (max-width: 768px) {
    header.site-header > .search-container {
        display: none !important;
    }
}

/* Icons in the shared chrome always use the site's Rounded set, including
   on pages (Anime) whose own icon font is the Outlined family */
header.site-header .material-symbols-outlined,
.mobile-bottom-nav .material-symbols-outlined {
    font-family: 'Material Symbols Rounded' !important;
    font-weight: normal !important;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ---------- Anime sub-brand ---------------------------------------------- */
/* Anime pages keep their "AuroraScreen Anime" logo and their own sliding
   anime search, which takes the search button's place. */

header.site-header .logo-img--anime {
    height: 40px !important;
    margin: 0 !important;
    filter: drop-shadow(0 0 12px rgba(192, 133, 208, 0.45));
}

@media (min-width: 769px) {
    header.site-header .logo-img--anime {
        height: 48px !important;
        margin: 0 !important;
    }
}

header.site-header .site-nav:has(#searchContainer) {
    position: relative !important;
}

header.site-header .anime-search-btn {
    display: grid !important;
}

/* Anime genre page: anime.css only styles the sliding search under .home,
   so the genre page gets the same behaviour here (scoped to body.genre so
   the working home-page search is untouched) */
body.genre header.site-header #searchContainer {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

body.genre header.site-header #searchContainer.open {
    width: min(450px, 60vw);
    opacity: 1;
    pointer-events: auto;
}

body.genre header.site-header #searchContainer .search-box {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 44px 0 18px;
    border: 1px solid rgba(192, 133, 208, 0.5);
    border-radius: 999px;
    color: #fff;
    font: inherit;
    font-size: 15px;
    outline: none;
}

body.genre header.site-header #searchContainer .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: 400px;
    margin-top: 8px;
    overflow-y: auto;
    border-radius: 12px;
    background: #1a1a2e;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.genre header.site-header #searchContainer .search-results.active {
    display: block;
}

body.genre header.site-header .search-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    color: #fff;
    cursor: pointer;
}

body.genre header.site-header .search-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.genre header.site-header .search-item img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

body.genre header.site-header .search-item-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

@media (max-width: 768px) {
    body.genre header.site-header #searchContainer.open {
        position: fixed;
        top: 10px;
        left: 12px;
        right: 12px;
        width: auto;
        transform: none;
    }
}

/* The search field slides over the nav pill, so it needs a solid fill */
header.site-header #searchContainer .search-box {
    background: rgba(22, 19, 34, 0.98) !important;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.8);
}

header.site-header #searchContainer .search-box:focus {
    background: rgb(28, 24, 42) !important;
}

/* The mobile anime search is a full-screen fixed panel inside the header;
   a filter or transform on the header would trap it in the header's box */
header.site-header:has(.search-container.open) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
}

/* Pages whose content starts at the very top get pushed below the header
   (pages with a full-bleed hero let the header float over it instead) */
body.chrome-offset {
    padding-top: var(--as-header-h) !important;
}

@media (max-width: 768px) {
    body.chrome-offset-mobile {
        padding-top: var(--as-header-h) !important;
    }
}

/* ---------- Mobile bottom bar --------------------------------------------- */
/* The home page's bar, now the only one: frosted glass, lilac active tab
   with a glowing marker on top. */

.mobile-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    display: none !important;
    box-sizing: border-box !important;
    /* anime.css reverses every nav on phones; keep Home | Search | Browse */
    flex-direction: row !important;
    max-width: none !important;
    justify-content: space-around !important;
    align-items: stretch !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px 8px env(safe-area-inset-bottom, 0px) !important;
    border: 0 !important;
    border-top: 1px solid rgba(160, 143, 245, 0.16) !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, rgba(18, 17, 28, 0.82) 0%, rgba(12, 11, 20, 0.94) 100%) !important;
    backdrop-filter: blur(24px) saturate(1.5) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
    box-shadow: 0 -12px 32px -16px rgba(0, 0, 0, 0.7) !important;
    font-family: 'futur', sans-serif;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex !important;
    }
}

.mobile-bottom-nav .nav-item {
    position: relative !important;
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    min-height: 48px !important;
    height: var(--as-nav-h) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--as-text-2) !important;
    font-family: 'futur', sans-serif !important;
    text-decoration: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color var(--as-dur) ease, transform 120ms ease !important;
}

.mobile-bottom-nav .nav-item .material-symbols-outlined {
    font-size: 24px !important;
    line-height: 1 !important;
    margin: 0 !important;
    color: inherit !important;
    transition: font-variation-settings var(--as-dur) ease;
}

.mobile-bottom-nav .nav-text,
.mobile-bottom-nav span.nav-text {
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
    color: inherit !important;
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.94);
}

.mobile-bottom-nav .nav-item:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item.modal-open {
    color: var(--as-accent) !important;
}

.mobile-bottom-nav .nav-item.active .material-symbols-outlined,
.mobile-bottom-nav .nav-item.modal-open .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Glowing marker above the active tab */
.mobile-bottom-nav .nav-item::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--as-accent);
    box-shadow: 0 0 10px var(--as-accent);
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.25s var(--as-ease);
}

.mobile-bottom-nav .nav-item.active::after,
.mobile-bottom-nav .nav-item.modal-open::after {
    transform: translateX(-50%) scaleX(1);
}

@media (prefers-reduced-motion: reduce) {

    header.site-header,
    .mobile-bottom-nav .nav-item,
    .mobile-bottom-nav .nav-item::after {
        transition: none !important;
    }
}

/* ---------- Private-site notice ------------------------------------------- */
/* Shown once per browser by site-chrome.js. Sits above the bottom bar on
   phones and in the bottom-right corner on larger screens. */

.as-notice {
    position: fixed !important;
    z-index: 1500 !important;
    left: var(--as-gutter);
    right: var(--as-gutter);
    bottom: calc(var(--as-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
    box-sizing: border-box !important;
    max-width: 420px;
    margin: 0 auto !important;
    padding: 18px 20px !important;
    border: 1px solid rgba(160, 143, 245, 0.22) !important;
    border-radius: 16px !important;
    background: rgba(var(--as-bg-rgb), 0.92) !important;
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.75);
    color: var(--as-text) !important;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    text-align: left !important;
    animation: as-notice-in 0.4s var(--as-ease) both;
}

@media (min-width: 769px) {
    .as-notice {
        left: auto;
        right: var(--as-gutter);
        bottom: var(--as-gutter);
    }
}

.as-notice.is-leaving {
    animation: as-notice-out 0.2s ease forwards;
}

@keyframes as-notice-in {
    from { opacity: 0; transform: translateY(16px); }
}

@keyframes as-notice-out {
    to { opacity: 0; transform: translateY(8px); }
}

.as-notice h2 {
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-family: 'futur', sans-serif !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    color: var(--as-text) !important;
}

.as-notice p {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: var(--as-text-2) !important;
}

.as-notice-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 16px;
    margin-top: 14px;
}

.as-notice-actions a {
    font-size: 14px !important;
    color: var(--as-accent) !important;
    text-decoration: none !important;
}

.as-notice-actions a:hover {
    text-decoration: underline !important;
}

.as-notice-actions button {
    min-height: 40px;
    margin: 0 !important;
    padding: 0 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--as-accent) !important;
    color: #14111f !important;
    font: 600 14px/1 'Segoe UI', system-ui, sans-serif !important;
    cursor: pointer;
    transition: transform 120ms ease, filter var(--as-dur) ease;
}

.as-notice-actions button:hover {
    filter: brightness(1.08);
}

.as-notice-actions button:active {
    transform: scale(0.96);
}

/* "Go to aurorascreen.mov": a link wearing the filled button style */
.as-notice-actions a.as-notice-primary {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 20px !important;
    border-radius: 999px !important;
    background: var(--as-accent) !important;
    color: #14111f !important;
    font: 600 14px/1 'Segoe UI', system-ui, sans-serif !important;
    transition: transform 120ms ease, filter var(--as-dur) ease;
}

.as-notice-actions a.as-notice-primary:hover {
    text-decoration: none !important;
    filter: brightness(1.08);
}

.as-notice-actions a.as-notice-primary:active {
    transform: scale(0.96);
}

/* "Not now": dismiss without the weight of the main action */
.as-notice-actions button.as-notice-ghost {
    min-height: 40px;
    padding: 0 4px !important;
    background: none !important;
    color: var(--as-text-2) !important;
    font-weight: 500 !important;
}

.as-notice-actions button.as-notice-ghost:hover {
    filter: none;
    color: var(--as-text) !important;
}

.as-notice-actions a:focus-visible,
.as-notice-actions button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .as-notice,
    .as-notice.is-leaving {
        animation: none;
    }
}
