:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-strong: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --line: rgba(148, 163, 184, 0.2);
    --blue: #60a5fa;
    --purple: #a78bfa;
    --cyan: #22d3ee;
    --radius: 24px;
    --shadow: 0 22px 70px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.28), transparent 34rem),
        radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.24), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-block,
.quick-search-panel,
.page-hero,
.detail-layout,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: white;
    transform: translateY(-1px);
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input,
.page-filter {
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: white;
    background: rgba(15, 23, 42, 0.86);
    outline: none;
    border-radius: 999px;
    padding: 11px 16px;
    min-width: 240px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.site-search input:focus,
.page-filter:focus {
    border-color: rgba(96, 165, 250, 0.75);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

.site-search button,
.primary-action,
.ghost-action,
.filter-chip {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.site-search button,
.primary-action {
    color: white;
    padding: 11px 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.site-search button:hover,
.primary-action:hover,
.ghost-action:hover,
.filter-chip:hover,
.movie-card:hover,
.category-tile:hover,
.related-card:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: white;
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 28px auto 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 52px;
    align-items: center;
    padding: 62px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(2.5rem, 7vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.detail-copy p,
.quick-search-panel p,
.content-card p,
.info-card p,
.movie-card p,
.category-tile p,
.category-overview-card p,
.footer-inner p {
    color: var(--muted);
}

.hero p {
    font-size: 1.08rem;
    max-width: 680px;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.tag-list span {
    color: #dbeafe;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(37, 99, 235, 0.14);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.82rem;
    font-weight: 800;
}

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

.ghost-action {
    color: white;
    padding: 11px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.44);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
    aspect-ratio: 3 / 4.25;
    background: rgba(15, 23, 42, 0.86);
}

.hero-poster img,
.poster-link img,
.related-card img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 62px;
    bottom: 34px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.25);
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--blue), var(--purple));
}

.quick-search-panel,
.page-hero,
.filter-panel,
.section-block,
.detail-layout {
    margin-top: 34px;
}

.quick-search-panel,
.page-hero,
.filter-panel,
.content-card,
.info-card,
.category-overview-card,
.movie-card,
.category-tile {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 480px);
    gap: 28px;
    align-items: center;
    padding: 30px;
    border-radius: var(--radius);
}

.quick-search-panel h2,
.section-heading h2,
.content-card h2,
.info-card h2,
.category-overview-card h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    letter-spacing: -0.04em;
}

.large-search input {
    min-width: 0;
    width: 100%;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.section-heading a {
    color: #bfdbfe;
    font-weight: 900;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.compact-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 22px 58px rgba(37, 99, 235, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    transition: transform 0.4s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.poster-badge,
.rank-mark {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: white;
    font-size: 0.78rem;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.poster-badge {
    left: 12px;
}

.rank-mark {
    right: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-card-body {
    padding: 14px;
}

.movie-meta-line {
    display: flex;
    gap: 8px;
    color: var(--subtle);
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 7px 0 8px;
    font-size: 1.03rem;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #bfdbfe;
}

.movie-card p {
    margin: 0;
    font-size: 0.9rem;
}

.category-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.category-tile {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile span {
    font-size: 1.55rem;
    font-weight: 900;
}

.category-tile p {
    margin-bottom: 0;
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.full-ranking {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.page-hero {
    padding: 52px;
    border-radius: 32px;
}

.slim-hero {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(124, 58, 237, 0.2)),
        rgba(15, 23, 42, 0.9);
}

.filter-panel {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
    padding: 22px;
    border-radius: 24px;
}

.filter-panel input {
    width: 100%;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.filter-chip {
    color: var(--muted);
    padding: 8px 13px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.76);
}

.filter-chip.is-active {
    color: white;
    border-color: rgba(96, 165, 250, 0.55);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(124, 58, 237, 0.5));
}

.category-overview-card {
    border-radius: 24px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-overview-card:hover {
    border-color: rgba(96, 165, 250, 0.46);
}

.category-overview-card a {
    display: block;
    padding: 24px;
}

.mini-title-row {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.mini-title-row span {
    color: #dbeafe;
    font-size: 0.92rem;
}

.detail-hero {
    min-height: 540px;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 28px;
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.detail-copy p {
    max-width: 760px;
    font-size: 1.05rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--subtle);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: white;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
}

.detail-main,
.detail-aside {
    display: grid;
    gap: 24px;
    align-content: start;
}

.player-section h2 {
    margin: 0 0 14px;
    font-size: 1.6rem;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: black;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.14), rgba(2, 6, 23, 0.66));
    z-index: 2;
}

.player-overlay.is-hidden {
    display: none;
}

.play-trigger {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: white;
    font-size: 2rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.46);
}

.content-card,
.info-card {
    padding: 24px;
    border-radius: 24px;
}

.content-card p,
.info-card p {
    margin-bottom: 0;
}

.info-grid {
    display: grid;
    gap: 12px;
}

.info-grid div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-grid span {
    color: var(--subtle);
}

.info-grid strong {
    color: white;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.related-card {
    display: grid;
    gap: 8px;
    transition: transform 0.2s ease;
}

.related-card img {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: #111827;
}

.related-card span {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 30px 0;
}

.footer-inner strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.footer-inner nav {
    max-width: 520px;
    color: var(--muted);
    font-weight: 700;
}

.footer-inner a:hover {
    color: white;
}

.is-hidden-card {
    display: none;
}

@media (max-width: 1180px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .site-search:not(.mobile-search):not(.large-search) {
        display: none;
    }

    .movie-grid,
    .full-ranking {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .compact-grid,
    .ranking-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hero {
        min-height: 740px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .hero-poster {
        max-width: 250px;
    }

    .hero-controls {
        left: 32px;
    }

    .quick-search-panel,
    .detail-hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 280px;
    }

    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .compact-grid,
    .ranking-list,
    .full-ranking {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
    }

    .brand {
        font-size: 1.25rem;
    }

    .hero,
    .detail-hero,
    .page-hero {
        width: min(100% - 20px, 1180px);
        border-radius: 24px;
    }

    .hero {
        min-height: 700px;
    }

    .hero-slide,
    .detail-hero,
    .page-hero,
    .quick-search-panel,
    .filter-panel,
    .content-card,
    .info-card {
        padding: 22px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(2.1rem, 14vw, 3.6rem);
    }

    .movie-grid,
    .compact-grid,
    .ranking-list,
    .full-ranking,
    .category-grid,
    .category-overview-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .site-search input,
    .page-filter {
        min-width: 0;
        width: 100%;
    }

    .large-search,
    .mobile-search {
        display: grid;
        grid-template-columns: 1fr;
    }
}
