/*
 * Lanime visual shell
 *
 * This layer follows the supplied YumeZone reference: black canvas, quiet
 * glass navigation, compact rounded controls, and content-first spacing.
 * Legacy templates keep their markup and behavior; this stylesheet owns the
 * shared visual contract so the migration remains reversible.
 */

:root {
    --yz-black: #000;
    --yz-surface-0: #050505;
    --yz-surface-1: #0b0b0d;
    --yz-surface-2: #121214;
    --yz-text: #f0f0f5;
    --yz-muted: #a7a7af;
    --yz-faint: #686873;
    --yz-border: rgba(255, 255, 255, .12);
    --yz-border-soft: rgba(255, 255, 255, .07);
    --yz-accent: #91b8b1;
    --yz-purple: #a855f7;
    --yz-max: 1800px;
    --yz-nav-height: 56px;
}

html,
body {
    background: var(--yz-black);
    color: var(--yz-text);
}

body {
    font-family: Inter, Space Grotesk, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

body:not(.landing-route) .main-content {
    min-height: 100vh;
    padding-top: var(--yz-nav-height);
    background: var(--yz-black);
}

/* Shared app navigation */
.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--yz-nav-height);
    border-bottom: 1px solid transparent;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .72), rgba(0, 0, 0, .30), transparent);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

body:not(.home-route):not(.landing-route) .navbar {
    border-bottom-color: var(--yz-border-soft);
    background: rgba(5, 5, 6, .92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.navbar-container {
    width: min(100%, var(--yz-max));
    height: 100%;
    padding: 0 1rem;
    gap: .75rem;
}

.navbar-left {
    min-width: 0;
    gap: .5rem;
}

.sidebar-toggle,
.mobile-search-toggle,
.nav-icon-button,
.user-avatar-btn {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.sidebar-toggle:hover,
.mobile-search-toggle:hover,
.nav-icon-button:hover,
.user-avatar-btn:hover {
    border-color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .20);
    transform: translateY(-1px);
}

.sidebar-toggle {
    display: none;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    width: 132px;
    height: 32px;
    overflow: hidden;
}

.lanime-brand-logo {
    width: 132px;
    height: 28px;
    object-fit: contain;
    object-position: left center;
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, .95));
}

.quick-nav {
    display: flex;
    align-items: center;
    gap: .35rem;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.navbar .quick-nav-link {
    min-height: 33px;
    padding: .375rem .875rem;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 999px;
    background: rgba(0, 0, 0, .20);
    color: rgba(255, 255, 255, .90);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar .quick-nav-link:hover,
.navbar .quick-nav-link.active {
    border-color: rgba(255, 255, 255, .30);
    background: rgba(255, 255, 255, .20);
    color: #fff;
    transform: none;
}

.search-container {
    flex: 0 0 auto;
    width: 36px;
    max-width: none;
    position: relative;
    order: 3;
}

.search-input-wrapper {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: width .25s ease, border-color .2s ease, background .2s ease;
}

.search-input-wrapper:focus-within {
    width: min(260px, 42vw);
    border-color: rgba(255, 255, 255, .42);
    background: rgba(10, 10, 10, .88);
}

.search-icon {
    left: 9px;
    color: #fff;
}

.search-input {
    height: 34px;
    width: 0;
    padding: 0 0 0 32px;
    border: 0;
    background: transparent;
    color: #fff;
    opacity: 0;
    transition: width .2s ease, opacity .2s ease;
}

.search-input-wrapper:focus-within .search-input {
    width: 100%;
    opacity: 1;
}

.search-input:focus {
    box-shadow: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: .375rem;
    order: 4;
}

.user-menu > .mobile-search-toggle {
    display: none;
}

.navbar .btn-signin {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    font-size: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.navbar .btn-signin:hover {
    border-color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .20);
    color: #fff;
    transform: none;
}

.navbar .user-avatar-btn {
    overflow: hidden;
}

.navbar .avatar-ring,
.navbar .user-avatar-btn img {
    width: 30px;
    height: 30px;
    border-radius: 999px;
}

/* Shared content language */
.container,
.main-content > .container {
    width: min(100%, 1800px);
    max-width: 1800px;
    padding-inline: clamp(1rem, 3vw, 3rem);
}

.section-title,
.anime-title,
.manga-section-title {
    color: var(--yz-text);
    letter-spacing: -.04em;
}

.section-subtitle,
.manga-hero-kicker {
    color: var(--yz-accent);
}

.btn-primary {
    background: #fff;
    border-color: #fff;
    color: #050505;
    box-shadow: 0 0 20px rgba(255, 255, 255, .12);
}

.btn-primary:hover {
    background: #ededf0;
    border-color: #ededf0;
    color: #000;
    box-shadow: 0 0 35px rgba(255, 255, 255, .22);
}

.btn-secondary {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: #fff;
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, .26);
    background: rgba(255, 255, 255, .10);
    color: #fff;
}

.anime-card,
.manga-card {
    border-color: rgba(255, 255, 255, .08);
    border-radius: 1rem;
    background: rgba(10, 10, 12, .72);
    box-shadow: none;
}

.anime-card:hover,
.manga-card:hover {
    border-color: rgba(255, 255, 255, .20);
    background: rgba(18, 18, 20, .96);
    box-shadow: none;
    transform: translateY(-3px);
}

.anime-card img,
.manga-card img {
    filter: saturate(.62) grayscale(.15);
}

.anime-card:hover img,
.manga-card:hover img {
    filter: saturate(1) grayscale(0);
}

.anime-card-title,
.manga-card-title {
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
}

.anime-card-meta,
.manga-card-meta {
    color: var(--yz-muted);
}

.footer {
    border-top-color: var(--yz-border-soft);
    background: #050505;
}

.footer-socials { display: flex; align-items: center; gap: 2px; margin-top: 14px; }
.footer-socials a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #a3a3a3; border-radius: 8px; }
.footer-socials a:hover { color: #fff; background: #181818; }
.footer-socials a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.footer-socials svg { width: 18px; height: 18px; flex: none; }
.landing-page__footer .footer-socials { margin-top: 0; }

/* Home spotlight matches the reference's full-bleed, quiet hero. */
.home-route .main-content {
    padding-top: 0;
}

.home-route .spotlight-section {
    height: clamp(560px, 55vh, 750px);
    min-height: 560px;
    max-height: 750px;
    margin: 0;
    border-radius: 0;
    background: var(--yz-surface-0);
}

.home-route .spotlight-backdrop img {
    filter: saturate(.76) brightness(.64);
    transform: scale(1.04);
}

.home-route .spotlight-gradient {
    background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .64) 42%, transparent 100%),
        linear-gradient(to right, rgba(0, 0, 0, .94), rgba(0, 0, 0, .40) 52%, transparent 100%);
}

.home-route .spotlight-content {
    width: min(100%, 1800px);
    padding: 0 clamp(1rem, 3vw, 3rem) 3.5rem;
}

.home-route .spotlight-info {
    max-width: 42rem;
}

.home-route .spotlight-meta-top {
    gap: .4rem;
    margin-bottom: 1rem;
    color: #dddde3;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-route .spotlight-meta-top > * {
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: .55rem;
    padding: .25rem .55rem;
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(8px);
}

.home-route .spotlight-meta-top > * + *::before {
    display: none;
}

.home-route .spotlight-meta-top .spotlight-rating {
    border-color: rgba(245, 158, 11, .30);
    color: #fbbf24;
}

.home-route .spotlight-title {
    max-width: 39rem;
    font-size: clamp(3rem, 6.4vw, 6rem);
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.075em;
}

.home-route .spotlight-title-accent {
    color: #fff;
    font-family: inherit;
    font-style: normal;
}

.home-route .spotlight-title-kicker,
.home-route .spotlight-title-ghost,
.home-route .spotlight-title-mark {
    display: none;
}

.home-route .spotlight-genres {
    gap: .4rem;
    margin: 1rem 0;
}

.home-route .spotlight-genre {
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: .55rem;
    background: rgba(10, 10, 12, .7);
    padding: .35rem .65rem;
    color: #d7d7dc;
    font-size: .7rem;
}

.home-route .spotlight-genre + .spotlight-genre::before {
    display: none;
}

.home-route .spotlight-description {
    max-width: 38rem;
    margin-bottom: 1.1rem;
    color: #d1d1d7;
    font-size: .95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-route .spotlight-actions .btn {
    min-height: 3rem;
    border-radius: .75rem;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-route .spotlight-nav {
    right: clamp(1rem, 3vw, 3rem);
    bottom: 3.5rem;
}

.home-route .spotlight-nav-btn {
    width: 44px;
    height: 44px;
    border-color: rgba(255, 255, 255, .15);
    background: rgba(0, 0, 0, .42);
}

.home-route .share-banner {
    border-color: rgba(255, 255, 255, .09);
    border-radius: 1rem;
    background: rgba(12, 12, 14, .84);
}

.home-route .content-tabs {
    border-bottom-color: rgba(255, 255, 255, .10);
}

.home-route .tab-btn.active::after {
    background: #fff;
}

/* Landing page */
.landing-route .main-content {
    padding: 0;
}

.landing-route .navbar {
    display: none;
}

.landing-route .footer {
    display: none;
}

.landing-page {
    min-height: 100vh;
    overflow: hidden;
    background: #000;
    color: #f0f0f5;
}

.landing-page__nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    height: 73px;
    border-bottom: 1px solid transparent;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .82), rgba(0, 0, 0, .38), transparent);
}

.landing-page__nav-inner {
    width: min(100%, 1200px);
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.landing-page__brand img {
    display: block;
    width: 132px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, .95));
}

.landing-page__links {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    color: rgba(255, 255, 255, .76);
    font-size: .75rem;
    font-weight: 700;
}

.landing-page__links a:hover {
    color: #fff;
}

.landing-page__links .dot {
    color: rgba(255, 255, 255, .18);
}

.landing-page__login {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .75rem;
    background: rgba(255, 255, 255, .06);
    padding: .55rem 1rem;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}

.landing-page__hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
}

.landing-page__hero::before {
    content: "";
    position: absolute;
    inset: -5%;
    z-index: -2;
    background: linear-gradient(rgba(0, 0, 0, .44), rgba(0, 0, 0, .44)),
        url("../images/misc/yumezone-landing.webp") center / cover no-repeat;
    filter: grayscale(1) brightness(.50);
    opacity: .78;
    animation: landing-pan 22s ease-in-out infinite alternate;
}

.landing-page__hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 18rem;
    background: linear-gradient(to top, #000, transparent);
}

.landing-page__hero-inner {
    width: min(100%, 1200px);
    padding: 6rem 2rem 3rem;
    text-align: center;
}

.landing-page__eyebrow {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    padding: .38rem 1rem;
    color: #cfcfd4;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.landing-page h1 {
    max-width: 58rem;
    margin: 2rem auto 2.25rem;
    color: #fff;
    font-size: clamp(3.2rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.055em;
    text-wrap: balance;
}

.landing-page h1 em {
    color: #d5d5da;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

.landing-page__lede {
    max-width: 44rem;
    margin: 0 auto;
    color: #d0d0d6;
    font-size: clamp(.8rem, 1.6vw, 1rem);
    font-weight: 500;
    line-height: 1.65;
}

.landing-page__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.4rem;
}

.landing-page__button {
    min-width: 15rem;
    min-height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border-radius: .75rem;
    padding: .9rem 2.5rem;
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .03em;
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.landing-page__button--primary {
    background: #fff;
    color: #050505;
    box-shadow: 0 0 20px rgba(255, 255, 255, .15);
}

.landing-page__button--secondary {
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: #fff;
}

.landing-page__button:hover {
    transform: translateY(-2px) scale(1.02);
}

.landing-page__section {
    border-top: 1px solid rgba(255, 255, 255, .04);
    padding: 7rem 2rem;
}

.landing-page__section-inner {
    width: min(100%, 1200px);
    margin: 0 auto;
}

.landing-page__section-kicker {
    color: #9da0a9;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .25em;
    text-transform: uppercase;
}

.landing-page__section h2 {
    margin-top: .8rem;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: -.045em;
}

.landing-page__section h2 em {
    color: #d5d5da;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

.landing-page__feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.landing-page__feature {
    min-height: 12rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: .75rem;
    background: rgba(10, 10, 12, .38);
    padding: 1.25rem;
}

.landing-page__feature-icon {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: .6rem;
    background: #18181b;
    color: #fff;
}

.landing-page__feature h3 {
    margin: 1rem 0 .55rem;
    color: #fff;
    font-size: .9rem;
}

.landing-page__feature p {
    color: #b3b3ba;
    font-size: .75rem;
    line-height: 1.65;
}

.landing-page__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding: 3rem 2rem;
    color: #777781;
    font-size: .72rem;
}

@keyframes landing-pan {
    from { transform: scale(1.02) translate3d(-.5%, -.5%, 0); }
    to { transform: scale(1.08) translate3d(.5%, .5%, 0); }
}

@media (max-width: 900px) {
    .landing-page__feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    :root { --yz-nav-height: 56px; }
    .navbar-container { padding-inline: .75rem; }
    .sidebar-toggle { display: grid; }
    .quick-nav,
    .search-container { display: none; }
    .user-menu > .mobile-search-toggle { display: grid; }
    .navbar-brand { width: 122px; }
    .lanime-brand-logo { width: 122px; }
    .home-route .spotlight-section { height: min(88svh, 680px); min-height: 540px; }
    .home-route .spotlight-content { padding-bottom: 3.75rem; }
    .home-route .spotlight-info { max-width: 100%; }
    .home-route .spotlight-title { font-size: clamp(2.7rem, 12vw, 4.25rem); }
    .home-route .spotlight-description { display: -webkit-box; -webkit-line-clamp: 2; font-size: .82rem; }
    .home-route .spotlight-nav { bottom: 1.25rem; }
    .home-route .spotlight-nav-btn { display: none; }
    .landing-page__nav-inner { padding-inline: 1.25rem; }
    .landing-page__links { display: none; }
    .landing-page__hero-inner { padding-inline: 1.25rem; }
    .landing-page__actions { flex-direction: column; align-items: stretch; }
    .landing-page__button { min-width: 0; width: 100%; }
    .landing-page__section { padding: 5rem 1.25rem; }
    .landing-page__feature-grid { grid-template-columns: 1fr; }
    .landing-page__footer { flex-direction: column; align-items: flex-start; padding-inline: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .landing-page__hero::before { animation: none; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Use the supplied Lanime mascot lockup in the shared shell.  Keep the
 * image visible instead of replacing it with a text pseudo-element so the
 * header and landing page use the same brand asset on every route. */
.navbar-brand .lanime-brand-logo,
.landing-page__brand img {
    display: block;
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .75));
}

.navbar-brand::after,
.landing-page__brand::after {
    content: none;
}

/* home.css predates the shared theme and intentionally has stronger scoped
 * selectors.  Repeat the small set of navigation rules here so the home
 * route has the same 56px glass nav as every other YumeZone-style surface. */
.home-route .navbar {
    height: var(--yz-nav-height);
    background: linear-gradient(to bottom, rgba(0, 0, 0, .72), rgba(0, 0, 0, .28), transparent);
    border-bottom: 0;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.home-route .navbar-container {
    width: min(100%, var(--yz-max));
    padding-inline: 1rem;
    gap: .75rem;
}

.home-route .navbar-brand {
    width: 132px;
    height: 32px;
}

.home-route .quick-nav {
    gap: .35rem;
    padding: 0;
}

.home-route .navbar .quick-nav-link {
    min-height: 33px;
    padding: .375rem .875rem;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 999px;
    background: rgba(0, 0, 0, .20);
    color: rgba(255, 255, 255, .90);
    font-size: 13px;
    font-weight: 700;
}

.home-route .navbar .quick-nav-link::after {
    display: none;
}

.home-route .navbar .quick-nav-link:hover,
.home-route .navbar .quick-nav-link.active {
    border-color: rgba(255, 255, 255, .30);
    background: rgba(255, 255, 255, .20);
    color: #fff;
}

.home-route .search-container {
    display: block;
}

.home-route .user-menu > .mobile-search-toggle {
    display: none;
}

.home-route .navbar .btn-signin {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
}

/* Shared YumeZone card language: compact horizontal rails instead of a
 * dashboard grid. The existing links and provider data remain unchanged. */
.home-route .home-page-shell > .home-layout,
.home-route .home-page-shell > .home-discover-section,
.home-route .home-page-shell > .combined-manga-section {
    width: min(100%, var(--yz-max));
}

.home-route .anime-grid {
    display: flex;
    grid-template-columns: none;
    gap: .75rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .2rem .1rem .7rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .24) transparent;
}

.home-route .anime-grid::-webkit-scrollbar { height: 5px; }
.home-route .anime-grid::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 99px; }

.home-route .anime-grid .anime-card {
    flex: 0 0 160px;
    width: 160px;
}

.home-route .anime-card-poster {
    aspect-ratio: 2 / 3;
}

.home-route .anime-card-title {
    margin-top: .55rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-route .home-sidebar {
    max-height: 42rem;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .22) transparent;
}

.home-discover-section {
    margin: 0 auto clamp(4rem, 8vw, 8rem);
}

.home-discover-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.home-discover-kicker {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 0 0 .55rem;
    color: #a855f7;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.home-discover-kicker span {
    width: 2.5rem;
    height: 2px;
    border-radius: 99px;
    background: #a855f7;
}

.home-discover-heading h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    letter-spacing: -.06em;
}

.home-discover-heading > div > p:last-child {
    margin: .4rem 0 0;
    color: #9c9ca7;
    font-size: .88rem;
}

.home-discover-tabs {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem;
    border: 1px solid var(--yz-border-soft);
    border-radius: .75rem;
    background: #09090b;
}

.home-discover-tabs a {
    padding: .65rem .85rem;
    border-radius: .55rem;
    color: #858590;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.home-discover-tabs a:hover,
.home-discover-tabs a.active {
    background: #fff;
    color: #09090b;
}

.home-discover-grid {
    display: grid;
    grid-template-columns: minmax(18rem, .72fr) minmax(0, 1.8fr);
    gap: 2rem;
}

.home-ranked-label {
    margin: 0 0 .65rem .2rem;
    color: #8c8c98;
    font-size: .7rem;
    font-weight: 700;
}

.home-ranked-queue {
    min-width: 0;
    max-height: 37rem;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .22) transparent;
}

.home-ranked-item {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 5.25rem;
    padding: .6rem .7rem;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: .9rem;
    color: #fff;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.home-ranked-item + .home-ranked-item { margin-top: .45rem; }

.home-ranked-item:hover,
.home-ranked-item.active {
    border-color: rgba(168, 85, 247, .68);
    background: rgba(255, 255, 255, .07);
    transform: translateX(2px);
}

.home-ranked-item > strong {
    width: 2rem;
    color: #686873;
    font-size: 1.1rem;
}

.home-ranked-item.active > strong { color: #a855f7; }

.home-ranked-item img {
    width: 3.2rem;
    height: 4.15rem;
    flex: 0 0 auto;
    border-radius: .55rem;
    object-fit: cover;
    filter: saturate(.82);
}

.home-ranked-item span { min-width: 0; }
.home-ranked-item b,
.home-ranked-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-ranked-item b { color: #d7d7de; font-size: .88rem; }
.home-ranked-item small { margin-top: .35rem; color: #8e8e98; font-size: .7rem; }

.home-discover-feature {
    position: relative;
    min-height: 37rem;
    overflow: hidden;
    border: 1px solid var(--yz-border);
    border-radius: 1rem;
    background: #09090b;
}

.home-discover-feature > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.7) brightness(.58);
}

.home-discover-feature-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, .92), rgba(0, 0, 0, .62) 45%, rgba(0, 0, 0, .12)), linear-gradient(to top, rgba(0, 0, 0, .94), transparent 65%);
}

.home-discover-feature-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: end;
    min-height: 37rem;
    max-width: 35rem;
    padding: 2.5rem;
}

.home-discover-pick {
    align-self: flex-start;
    border-radius: .35rem;
    background: #fff;
    padding: .25rem .5rem;
    color: #09090b;
    font-size: .7rem;
    font-weight: 900;
}

.home-discover-feature h3 {
    margin: .85rem 0 .55rem;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.3rem);
    letter-spacing: -.065em;
    line-height: .98;
}

.home-discover-feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.home-discover-feature-meta span {
    border-radius: .35rem;
    background: rgba(255, 255, 255, .12);
    padding: .25rem .5rem;
    color: #ededf0;
    font-size: .68rem;
    font-weight: 700;
}

.home-discover-feature p {
    display: -webkit-box;
    max-width: 33rem;
    margin: 1rem 0 1.3rem;
    overflow: hidden;
    color: #c3c3cc;
    font-size: .9rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.home-discover-feature-actions { display: flex; gap: .7rem; }
.home-discover-feature-actions .btn { min-height: 2.9rem; border-radius: .75rem; font-size: .75rem; font-weight: 800; }

@media (max-width: 900px) {
    .home-discover-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .home-discover-grid { grid-template-columns: 1fr; }
    .home-ranked-queue { display: flex; gap: .55rem; max-height: none; overflow-x: auto; padding-bottom: .45rem; }
    .home-ranked-label { display: none; }
    .home-ranked-item { flex: 0 0 15rem; }
    .home-ranked-item + .home-ranked-item { margin-top: 0; }
}

@media (max-width: 560px) {
    .home-discover-tabs { width: 100%; overflow-x: auto; }
    .home-discover-tabs a { flex: 1 0 auto; text-align: center; }
    .home-discover-feature,
    .home-discover-feature-content { min-height: 32rem; }
    .home-discover-feature-content { padding: 1.35rem; }
}

/* Manga detail hero: the reference uses a centered fan of covers followed by
 * the catalog controls. Reflow the existing cover stage without changing its
 * links or data source. */
.manga-landing-hero {
    grid-template-columns: 1fr;
    min-height: 800px;
    margin: 0 -3rem 4rem;
    padding: 5.5rem 2rem 2.5rem;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(ellipse at 50% 34%, rgba(255, 255, 255, .08), transparent 36%),
        linear-gradient(to bottom, #08080a 0%, #09090b 72%, #000 100%);
}

.manga-landing-hero::before {
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .34), transparent 70%);
    opacity: .16;
}

.manga-hero-copy {
    order: 2;
    width: min(100%, 720px);
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.manga-hero-kicker { justify-content: center; color: #a855f7; }
.manga-hero-kicker span { display: none; }
.manga-hero-copy h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); }
.manga-hero-copy h1 em { color: #fff; font-style: italic; font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.manga-hero-lede { margin-inline: auto; color: var(--yz-muted); }
.manga-hero-actions { justify-content: center; }
.manga-hero-actions .btn { border-radius: .7rem; }
.manga-hero-trust { justify-content: center; margin-top: 1.4rem; }

.manga-hero-stage {
    order: 1;
    width: min(100%, 760px);
    min-height: 405px;
    margin: 0 auto;
}

.manga-hero-stage::before {
    width: 390px;
    height: 390px;
    top: 8px;
    border-color: rgba(168, 85, 247, .22);
    box-shadow: 0 0 0 24px rgba(168, 85, 247, .045), 0 0 0 52px rgba(168, 85, 247, .025);
}

.manga-hero-cover { width: 175px; border-radius: .75rem; }
.manga-hero-cover:hover { border-color: rgba(168, 85, 247, .86); }
.manga-hero-cover-1 { transform: translate(-165%, -49%) rotate(-18deg) scale(.88); }
.manga-hero-cover-2 { transform: translate(-112%, -51%) rotate(-9deg) scale(.95); }
.manga-hero-cover-3 { transform: translate(-50%, -53%) rotate(0deg) scale(1.08); }
.manga-hero-cover-4 { transform: translate(12%, -51%) rotate(9deg) scale(.95); }
.manga-hero-cover-5 { transform: translate(65%, -49%) rotate(18deg) scale(.88); }

.manga-catalog-heading {
    margin-top: 0;
    padding-top: 0;
}

.manga-catalog-heading .manga-hero-kicker { justify-content: flex-start; color: #a855f7; }
.manga-source-tabs { border-radius: .75rem; background: rgba(255, 255, 255, .035); }
.manga-source-tab.active { background: #fff; color: #09090b; }
.manga-search-bar { border-radius: .75rem; background: rgba(255, 255, 255, .035); }
.manga-search-bar button { background: #fff; color: #09090b; }

/* Anime detail: banner, 260px poster rail, and quiet uppercase section labels
 * match the reference while preserving every existing tab/action ID. */
.anime-hero .container,
.anime-hero + .container {
    width: min(100%, var(--yz-max));
    max-width: var(--yz-max);
}

.anime-banner { height: 400px; }
.anime-banner::after { background: linear-gradient(to bottom, rgba(0, 0, 0, .08), #000 96%); }
.anime-info-container { margin-top: -64px; }
.anime-info-grid { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
.anime-poster { position: sticky; top: 78px; }
.anime-poster > img { border-radius: .75rem; }
.quick-meta-item .label { color: var(--yz-muted); }
.anime-details { min-width: 0; padding-top: 20px; }
.anime-title { font-size: clamp(2.1rem, 3.6vw, 3.6rem); letter-spacing: -.06em; }
.anime-stats { gap: 32px; padding: 16px 0; border-color: var(--yz-border-soft); }
.stat-label { color: var(--yz-muted); }
.stat-label svg { stroke: var(--yz-muted); }
.anime-actions .btn-primary { background: #fff; color: #09090b; }
.anime-actions .btn-secondary { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); }
.anime-genres .genre-tag { border-color: rgba(255, 255, 255, .10); background: rgba(255, 255, 255, .04); color: #b8b8c1; }
.anime-genres .studio-tag { border-color: rgba(255, 255, 255, .10) !important; background: rgba(255, 255, 255, .04) !important; color: #d8d8df !important; }
.anime-genres .studio-tag svg { color: #d8d8df; stroke: #d8d8df; }
.next-episode-banner { border-color: var(--yz-border-soft) !important; border-radius: 1rem !important; background: #09090b !important; }
.info-tabs { gap: .45rem; margin-top: 2rem; border-color: var(--yz-border-soft); border-radius: .75rem; background: #09090b; }
.info-tab-btn { flex: 0 0 auto; padding: .7rem 1rem; border-radius: .65rem; color: #8f8f99; }
.info-tab-btn.active { background: #fff; color: #08080a; box-shadow: none; }
.anime-synopsis h3,
.episodes-section h3,
.related-section h3,
.recommended-section h3 { text-transform: uppercase; letter-spacing: .12em; }

@media (max-width: 900px) {
    .manga-landing-hero { margin-inline: -1rem; padding-inline: 1rem; }
    .manga-hero-stage { min-height: 340px; }
    .manga-hero-cover { width: 145px; }
    .manga-hero-cover-1 { transform: translate(-155%, -49%) rotate(-17deg) scale(.82); }
    .manga-hero-cover-2 { transform: translate(-108%, -51%) rotate(-8deg) scale(.9); }
    .manga-hero-cover-3 { transform: translate(-50%, -53%) rotate(0deg) scale(1.02); }
    .manga-hero-cover-4 { transform: translate(8%, -51%) rotate(8deg) scale(.9); }
    .manga-hero-cover-5 { transform: translate(55%, -49%) rotate(17deg) scale(.82); }
    .anime-info-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 720px) {
    .manga-landing-hero { min-height: 700px; padding-top: 4.5rem; margin-bottom: 3rem; }
    .manga-hero-stage { min-height: 290px; }
    .manga-hero-cover { width: 112px; }
    .manga-hero-copy h1 { font-size: 2.25rem; }
    .manga-hero-trust { gap: .75rem 1rem; }
    .anime-banner { height: 300px; }
    .anime-info-container { margin-top: -42px; }
    .anime-info-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .anime-poster { position: relative; top: auto; width: min(190px, 55vw); margin: 0 auto; }
    .anime-details { padding-top: 0; }
    .anime-title { text-align: center; }
    .anime-stats { justify-content: center; }
    .anime-actions { justify-content: center; }
}

/* Hero title artwork -----------------------------------------------------
 * Logo files are transparent artwork and deliberately live in their own
 * lockup.  The reserved box prevents the description/actions from jumping
 * while a remote logo is loading; the title remains the accessible fallback.
 */
.home-route .spotlight-section {
    height: clamp(720px, calc(86svh + 80px), 980px);
    min-height: 720px;
    max-height: 980px;
}

/* Keep the bottom fade behind the slide's content stacking context. */
.home-route .spotlight-carousel::after {
    display: none;
}

.home-route .spotlight-content {
    padding-top: calc(var(--navbar-height) + 1.5rem);
    padding-bottom: 4.5rem;
}

.home-route .spotlight-brand-lockup {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: min(100%, 650px);
    min-height: 220px;
    margin: 0;
}

.home-route .spotlight-brand-lockup.has-logo {
    min-height: 220px;
}

.home-route .spotlight-logo {
    display: block;
    width: min(100%, 650px);
    max-width: 650px;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .22));
}

.home-route .spotlight-title[hidden] {
    display: none !important;
}

.home-route .spotlight-brand-lockup.logo-failed .spotlight-logo {
    display: none;
}

.home-route .spotlight-brand-lockup.logo-failed .spotlight-title {
    display: block !important;
}

@media (max-width: 760px) {
    .home-route .spotlight-section {
        height: max(730px, 92svh);
        min-height: 730px;
        max-height: none;
    }

    .home-route .spotlight-content {
        padding-bottom: 5rem;
    }

    .home-route .spotlight-brand-lockup,
    .home-route .spotlight-brand-lockup.has-logo {
        min-height: 154px;
    }

    .home-route .spotlight-logo {
        max-height: 154px;
    }
}

@media (max-width: 480px) {
    .home-route .spotlight-section { min-height: 760px; }
}

/* The search control is an icon-sized flex item until focused.  Keeping its
 * container shrink-safe prevents a focused input from pushing the navbar (or
 * making the manga page horizontally scroll). */
.navbar-container,
.navbar-left,
.quick-nav,
.user-menu {
    min-width: 0;
}

.search-container {
    min-width: 36px;
    flex-shrink: 1;
    z-index: 20;
}

.search-input-wrapper {
    min-width: 36px;
    max-width: min(360px, 42vw);
    overflow: hidden;
}

.search-input-wrapper:focus-within {
    position: absolute;
    top: 0;
    right: 0;
    width: min(360px, 42vw);
}

.search-input {
    min-width: 0;
}

.search-suggestions,
#search-error {
    max-width: min(360px, calc(100vw - 2rem));
    overflow-x: hidden;
}

.search-container:focus-within .search-suggestions {
    left: auto;
    right: 0;
    width: min(360px, calc(100vw - 2rem));
}

.search-container:focus-within #search-error {
    left: auto;
    right: 0;
    width: min(360px, calc(100vw - 2rem));
}

/* Full-bleed manga hero without the negative-margin overflow that clipped the
 * navbar and left side of the stage on tablet widths. */
.manga-landing-hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

@media (max-width: 900px) and (min-width: 769px) {
    .navbar-container { gap: .5rem; padding-inline: .75rem; }
    .quick-nav { gap: .15rem; }
    .navbar .quick-nav-link { padding-inline: .55rem; }
    .search-input-wrapper:focus-within { width: min(280px, 34vw); }
}
