:root {
    --bg: #070b14;
    --bg-2: #0b1020;
    --panel: rgba(16, 24, 42, 0.82);
    --panel-strong: rgba(19, 29, 52, 0.96);
    --panel-soft: rgba(255, 255, 255, 0.055);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(151, 167, 255, 0.24);
    --text: #f4f7ff;
    --muted: #9ba8c4;
    --muted-2: #6f7b95;
    --primary: #7c6dff;
    --primary-2: #46d8ff;
    --accent: #a66bff;
    --danger: #ff5874;
    --success: #55d98a;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(124, 109, 255, 0.18), transparent 26rem),
        radial-gradient(circle at 90% 0%, rgba(70, 216, 255, 0.12), transparent 30rem),
        linear-gradient(180deg, #050812 0%, var(--bg) 42%, #050812 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 80%);
    opacity: 0.45;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.container {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
}

.site-shell { position: relative; z-index: 1; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: min(var(--container), calc(100% - 32px));
    margin: 16px auto 0;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(8, 12, 24, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 60px rgba(0,0,0,0.22);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.site-header.scrolled {
    background: rgba(8, 12, 24, 0.92);
    border-color: var(--border-strong);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.06em;
    box-shadow: 0 16px 40px rgba(124,109,255,.32);
}

.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font-size: 1rem; letter-spacing: -0.03em; }
.brand-text small { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    color: var(--muted);
    font-weight: 800;
    font-size: .92rem;
    padding: 12px 14px;
    border-radius: 14px;
    transition: color .18s ease, background .18s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
    background: rgba(255,255,255,0.075);
}

.main-nav .nav-admin {
    color: #fff;
    background: linear-gradient(135deg, rgba(124,109,255,.95), rgba(166,107,255,.85));
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    color: var(--text);
    padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 99px; }

.hero-section {
    min-height: 680px;
    display: flex;
    align-items: center;
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}

.hero-bg-orb { position: absolute; border-radius: 999px; filter: blur(12px); pointer-events: none; }
.orb-one { width: 360px; height: 360px; background: rgba(124,109,255,.16); left: -120px; top: 90px; }
.orb-two { width: 420px; height: 420px; background: rgba(70,216,255,.10); right: -160px; bottom: 30px; }

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr);
    gap: 44px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b8c1ff;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 0 22px rgba(124,109,255,.75);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 18px;
    max-width: 860px;
    font-size: clamp(2.35rem, 6vw, 5.2rem);
    line-height: .95;
    letter-spacing: -0.075em;
    text-wrap: balance;
}

.hero-copy p,
.page-hero p,
.detail-description {
    max-width: 680px;
    color: var(--muted);
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.75;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 15px;
    font-weight: 900;
    cursor: pointer;
    color: var(--text);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 16px 38px rgba(124,109,255,.28); }
.btn-soft { background: rgba(255,255,255,.075); border: 1px solid var(--border); }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn.full { width: 100%; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 560px;
    margin-top: 34px;
}

.hero-stats div {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255,255,255,.045);
}
.hero-stats strong { display: block; font-size: 1.75rem; letter-spacing: -.05em; }
.hero-stats span { color: var(--muted); font-weight: 800; font-size: .82rem; }

.hero-panel,
.glass-panel,
.content-panel,
.info-card,
.filter-bar,
.empty-state {
    border: 1px solid var(--border);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-panel {
    position: relative;
    padding: 18px;
    border-radius: 32px;
    overflow: hidden;
}
.panel-topline { height: 3px; width: 44%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--primary-2)); margin: 0 0 18px; }

.spotlight-card {
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 18px;
    align-items: center;
}
.spotlight-poster img,
.detail-poster img,
.anime-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.spotlight-poster { height: 220px; border-radius: 22px; overflow: hidden; background: var(--panel-soft); }
.spotlight-info h2 { margin: 12px 0 8px; font-size: 1.55rem; letter-spacing: -.05em; }
.spotlight-info p { color: var(--muted); line-height: 1.65; }
.spotlight-info a,
.inline-link,
.table-link { color: #b8c1ff; font-weight: 900; }
.tag { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: rgba(124,109,255,.18); color: #c9d0ff; font-size: .75rem; font-weight: 900; }
.provider-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.provider-strip span { padding: 9px 12px; border-radius: 999px; background: rgba(255,255,255,.065); color: var(--muted); font-size: .8rem; font-weight: 800; }

.section-block { padding: 52px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 8px 0 0; font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.06em; }
.section-heading a { color: #b8c1ff; font-weight: 900; }
.section-heading.slim { margin-bottom: 18px; }
.section-heading.slim h2 { font-size: 1.55rem; }

.anime-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.small-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.anime-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(16, 24, 42, .78);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.anime-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: rgba(21, 31, 55, .9); }
.anime-card-media { position: relative; display: block; height: 300px; background: rgba(255,255,255,.04); }
.age-badge { position: absolute; top: 12px; right: 12px; padding: 8px 10px; border-radius: 999px; background: rgba(8,12,24,.86); color: #fff; font-weight: 900; font-size: .75rem; }
.anime-card-body { padding: 18px; }
.anime-meta-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.anime-card h3 { margin: 12px 0 8px; font-size: 1.12rem; letter-spacing: -.04em; }
.anime-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.55; font-size: .93rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row.compact { gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 8px 11px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.055); color: #c8d1ea; font-weight: 800; font-size: .8rem; }
.chip-link:hover { border-color: var(--border-strong); color: #fff; }
.genre-cloud .chip { padding: 11px 14px; }

.split-section { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; }
.clean-panel { border-radius: 28px; padding: 28px; }
.clean-panel h2 { margin: 10px 0 12px; font-size: 1.8rem; letter-spacing: -.05em; }
.clean-panel p { color: var(--muted); line-height: 1.7; }

.horizontal-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.mini-card { padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.045); }
.mini-card span { display: block; font-weight: 900; margin-bottom: 7px; }
.mini-card small { color: var(--muted); }

.page-main { padding: 62px 0; }
.narrow-page { max-width: 860px; }
.page-hero { margin-bottom: 26px; }
.compact-hero h1 { font-size: clamp(2.3rem, 5vw, 4.3rem); }

.filter-bar {
    display: grid;
    grid-template-columns: 1.2fr .75fr .75fr auto;
    gap: 12px;
    align-items: end;
    padding: 18px;
    border-radius: 26px;
    margin-bottom: 22px;
}

label { display: grid; gap: 8px; }
label span { color: var(--muted); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
input, select, textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid rgba(151, 167, 255, .25);
    border-radius: 15px;
    background: rgba(8, 12, 24, .86);
    color: var(--text);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea { padding: 14px 15px; resize: vertical; line-height: 1.6; }
select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #b8c1ff 50%), linear-gradient(135deg, #b8c1ff 50%, transparent 50%);
    background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 42px;
}
select option { background: #11182a; color: #eef3ff; }
input:focus, select:focus, textarea:focus { border-color: rgba(124,109,255,.85); box-shadow: 0 0 0 4px rgba(124,109,255,.15); background: rgba(10, 15, 29, .96); }

.result-line { margin-bottom: 18px; color: var(--muted); font-weight: 800; }
.result-line strong { color: #fff; }
.empty-state { padding: 28px; border-radius: 24px; color: var(--muted); text-align: center; }
.empty-state.large { padding: 56px 28px; }
.empty-state h1 { margin: 0 0 10px; color: var(--text); font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.07em; }

.detail-hero { position: relative; min-height: 560px; display: flex; align-items: end; padding: 92px 0 56px; background-image: var(--banner); background-size: cover; background-position: center; }
.detail-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,8,18,.96), rgba(5,8,18,.82), rgba(5,8,18,.45)), linear-gradient(0deg, var(--bg), transparent 55%); }
.detail-layout { position: relative; display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 34px; align-items: end; }
.detail-poster { height: 360px; border-radius: 28px; overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); background: var(--panel-soft); }
.original-title { margin: -6px 0 16px; color: #c8d1ea; font-weight: 800; }
.detail-content { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; padding: 34px 0 70px; align-items: start; }
.info-card, .content-panel { border-radius: 28px; padding: 24px; }
.info-card h2, .content-panel h2 { margin-top: 0; letter-spacing: -.05em; }
.info-list { margin: 0 0 20px; display: grid; gap: 12px; }
.info-list div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.info-list dt { color: var(--muted); font-weight: 900; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.info-list dd { margin: 0; color: var(--text); font-weight: 700; }
.main-detail-column { display: grid; gap: 20px; }
.provider-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.provider-card { padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.045); transition: transform .18s ease, border-color .18s ease; }
.provider-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.provider-card strong { display: block; margin-bottom: 5px; }
.provider-card span, .muted { color: var(--muted); }
.prose { line-height: 1.75; color: var(--muted); }
.prose h2 { color: var(--text); margin-top: 28px; }

.poster-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(124,109,255,.28), rgba(70,216,255,.12)); }
.poster-placeholder span { font-size: 2.2rem; font-weight: 900; opacity: .75; }
.poster-placeholder.tall { min-height: 100%; }

.site-footer {
    width: min(var(--container), calc(100% - 40px));
    margin: 40px auto 24px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255,255,255,.045);
    color: var(--muted);
}
.site-footer strong { color: var(--text); }
.site-footer p { margin: 6px 0 0; }
.footer-links { display: flex; gap: 14px; font-weight: 800; }
.footer-links a:hover { color: var(--text); }

@media (max-width: 1040px) {
    .hero-content, .detail-content { grid-template-columns: 1fr; }
    .anime-grid, .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .horizontal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .split-section { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .container { width: min(100% - 28px, var(--container)); }
    .site-header { width: min(100% - 24px, var(--container)); border-radius: 20px; }
    .nav-toggle { display: block; }
    .main-nav { position: absolute; top: calc(100% + 10px); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: 12px; border: 1px solid var(--border); border-radius: 20px; background: rgba(8,12,24,.96); }
    .main-nav.open { display: flex; }
    .main-nav a { width: 100%; }
    .hero-section { min-height: auto; padding-top: 54px; }
    .hero-content { grid-template-columns: 1fr; }
    .hero-copy h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
    .hero-stats { grid-template-columns: 1fr; }
    .spotlight-card { grid-template-columns: 1fr; }
    .spotlight-poster { height: 320px; }
    .anime-grid, .featured-grid, .small-grid, .provider-list, .filter-bar, .horizontal-list { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-poster { width: min(240px, 100%); height: 340px; }
    .info-list div { grid-template-columns: 1fr; gap: 4px; }
    .site-footer { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   AniInfo Language Switcher
============================================================ */

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.language-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.language-switcher a:hover {
    transform: translateY(-1px);
    color: var(--text);
}

.language-switcher a.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(91, 124, 255, 0.34), rgba(153, 92, 255, 0.34));
}
