* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --amber: #f59e0b;
    --rose: #fb7185;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-lg: 0 28px 80px rgba(2, 6, 23, 0.55);
    --shadow-card: 0 18px 42px rgba(2, 6, 23, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.18), transparent 30%),
        radial-gradient(circle at 88% 16%, rgba(59, 130, 246, 0.20), transparent 32%),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.22);
}

.brand-text {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--soft);
    font-weight: 650;
}

.site-nav a {
    position: relative;
    padding: 8px 0;
    transition: color 0.24s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    transition: transform 0.24s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: #ffffff;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
}

.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.page-main {
    padding-top: 96px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    display: grid;
    align-items: center;
    overflow: hidden;
    border-radius: 0 0 36px 36px;
}

.hero-stage {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.9s ease;
}

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

.hero-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.30) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.16) 0%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.55fr);
    align-items: center;
    gap: 52px;
    padding: 72px 0 44px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.12);
    font-size: 0.92rem;
    font-weight: 750;
}

.hero-title {
    max-width: 790px;
    margin: 22px 0 16px;
    font-size: clamp(2.55rem, 6vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 760px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: clamp(1rem, 1.7vw, 1.28rem);
}

.hero-meta,
.movie-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    font-size: 0.82rem;
    font-weight: 650;
}

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

.button-primary,
.button-secondary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.button-secondary {
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.72);
}

.button-ghost {
    border: 1px solid var(--line);
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.48);
}

.button-primary:hover,
.button-secondary:hover,
.button-ghost:hover {
    transform: translateY(-2px);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 90px 24px 24px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.96));
}

.hero-card-title {
    margin: 0 0 10px;
    font-size: 1.55rem;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    width: min(1240px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.hero-control {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(226, 232, 240, 0.18);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.section {
    padding: 58px 0;
}

.section-tight {
    padding: 34px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    line-height: 1.15;
}

.section-desc {
    max-width: 760px;
    margin: 9px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: 380px;
}

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.card-link:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 26px 70px rgba(8, 145, 178, 0.20);
}

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.72);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-link:hover .card-cover img {
    transform: scale(1.08);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 28%, rgba(2, 6, 23, 0.88));
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 0.78rem;
    font-weight: 800;
}

.card-year {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    font-size: 0.78rem;
    font-weight: 800;
}

.card-body {
    padding: 16px 16px 18px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 1.02rem;
    line-height: 1.35;
}

.card-desc {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.category-card {
    min-height: 172px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.15), transparent 42%),
        rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.34);
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 1.22rem;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(120px, 180px)) auto;
    gap: 12px;
    margin: 24px 0 30px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(14px);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    outline: none;
    padding: 0 14px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.68);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.filter-panel button {
    height: 46px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 14px;
    color: #e0f2fe;
    background: rgba(8, 145, 178, 0.16);
    cursor: pointer;
    font-weight: 800;
}

.list-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: var(--shadow-card);
}

.ranking-list {
    display: grid;
}

.rank-item {
    display: grid;
    grid-template-columns: 70px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    transition: background 0.22s ease;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item:hover {
    background: rgba(34, 211, 238, 0.07);
}

.rank-number {
    font-size: 1rem;
    font-weight: 900;
    color: var(--cyan);
}

.rank-cover {
    width: 72px;
    height: 96px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.8);
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.rank-desc {
    margin: 8px 0 0;
    color: var(--muted);
}

.rank-score {
    min-width: 84px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.18);
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 34px;
    padding: clamp(28px, 5vw, 54px);
    background:
        radial-gradient(circle at 86% 18%, rgba(34, 211, 238, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
    box-shadow: var(--shadow-lg);
}

.page-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(2.1rem, 4vw, 4.2rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.page-hero p {
    max-width: 840px;
    margin: 0;
    color: var(--soft);
    font-size: 1.08rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(310px, 0.46fr);
    gap: 28px;
}

.player-card,
.detail-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.24s ease;
}

.player-wrap.is-started .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 60px rgba(34, 211, 238, 0.34);
    cursor: pointer;
    font-size: 2rem;
}

.player-message {
    margin: 0;
    padding: 12px 16px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.32);
}

.detail-card {
    padding: clamp(22px, 3vw, 34px);
}

.detail-card h1 {
    margin: 12px 0 16px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.detail-text {
    color: #dbeafe;
}

.detail-text p {
    margin: 0 0 16px;
}

.detail-cover {
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow-card);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.side-card {
    padding: 20px;
}

.related-list {
    display: grid;
    gap: 12px;
}

.related-item {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 18px;
    padding: 8px;
    transition: background 0.22s ease;
}

.related-item:hover {
    background: rgba(34, 211, 238, 0.08);
}

.related-item img {
    width: 62px;
    height: 82px;
    border-radius: 14px;
    object-fit: cover;
}

.related-item h3 {
    margin: 0 0 6px;
    font-size: 0.98rem;
}

.related-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.94rem;
}

.breadcrumb a {
    color: #bae6fd;
}

.empty-state[hidden],
.filter-card.is-hidden {
    display: none;
}

.empty-state {
    margin: 26px 0;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.6);
    text-align: center;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.68);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 28px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.28rem;
    font-weight: 900;
}

.footer-desc {
    max-width: 720px;
    margin: 14px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    justify-content: flex-end;
    color: var(--soft);
}

.footer-copy {
    grid-column: 1 / -1;
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

@media (max-width: 1100px) {
    .movie-grid,
    .movie-grid.wide-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-layout,
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-card {
        max-width: 420px;
    }
}

@media (max-width: 820px) {
    .site-nav {
        position: absolute;
        top: 76px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow-lg);
    }

    .site-header.is-open .site-nav {
        display: flex;
    }

    .site-nav a {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .site-nav a:hover,
    .site-nav a.is-active {
        background: rgba(34, 211, 238, 0.08);
    }

    .site-nav a::after {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-carousel,
    .hero-stage,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        padding-top: 42px;
        gap: 26px;
    }

    .hero-card {
        max-width: 310px;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.wide-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 70px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 540px) {
    .header-inner,
    .page-shell,
    .hero-content,
    .hero-controls,
    .footer-inner {
        width: min(100% - 22px, 1240px);
    }

    .brand {
        font-size: 1.18rem;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
    }

    .movie-grid,
    .movie-grid.wide-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.45rem;
    }

    .page-main {
        padding-top: 86px;
    }

    .section {
        padding: 40px 0;
    }

    .card-cover {
        aspect-ratio: 16 / 10;
    }

    .rank-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .rank-cover {
        display: none;
    }
}
