:root {
    color-scheme: dark;
    --page-bg: #020617;
    --surface: rgba(15, 23, 42, 0.82);
    --surface-strong: #0f172a;
    --surface-soft: rgba(30, 41, 59, 0.72);
    --border: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #3b82f6;
    --blue-strong: #2563eb;
    --cyan: #22d3ee;
    --purple: #8b5cf6;
    --rose: #fb7185;
    --amber: #f59e0b;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.22), transparent 30rem),
        radial-gradient(circle at 92% 12%, rgba(139, 92, 246, 0.20), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(2, 6, 23, 0.86);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 16px 34px rgba(59, 130, 246, 0.28);
}

.brand-text {
    font-size: 20px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.nav-links a,
.mobile-links a {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-links a:hover,
.mobile-links a.is-active {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.16);
}

.nav-search {
    display: flex;
    align-items: center;
    width: min(250px, 28vw);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    overflow: hidden;
}

.nav-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 10px 8px 10px 16px;
}

.nav-search button {
    border: 0;
    color: #ffffff;
    background: transparent;
    padding: 10px 14px;
    cursor: pointer;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.86);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-links {
    display: grid;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.hero-carousel {
    position: relative;
    width: min(1320px, calc(100% - 32px));
    min-height: 640px;
    margin: 28px auto 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 34px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.70);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
    gap: 42px;
    align-items: center;
    padding: clamp(28px, 5vw, 72px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 520ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.86) 42%, rgba(15, 23, 42, 0.42) 100%),
        radial-gradient(circle at 78% 20%, rgba(59, 130, 246, 0.38), transparent 30rem),
        radial-gradient(circle at 22% 80%, rgba(139, 92, 246, 0.22), transparent 26rem);
    z-index: -1;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin: 0 0 18px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.16);
    font-size: 14px;
}

.hero-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-title span {
    display: block;
    color: #93c5fd;
}

.hero-movie-title {
    margin: 18px 0 8px;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.15;
}

.hero-desc {
    max-width: 660px;
    margin: 0 0 24px;
    color: var(--soft);
    font-size: 18px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 16px 38px rgba(59, 130, 246, 0.32);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.btn-ghost {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.20);
}

.hero-media {
    position: relative;
}

.hero-poster {
    position: relative;
    max-width: 410px;
    margin-left: auto;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #0f172a;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.70);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.82));
}

.hero-card-info {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
}

.hero-card-info strong {
    display: block;
    font-size: 22px;
    line-height: 1.25;
}

.hero-card-info span {
    color: #cbd5e1;
    font-size: 14px;
}

.hero-dots {
    position: absolute;
    left: clamp(28px, 5vw, 72px);
    bottom: 26px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.36);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #ffffff;
}

.quick-search {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.quick-search-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card input {
    min-height: 54px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    outline: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.52);
    padding: 0 18px;
}

.section {
    padding: 64px 0 0;
}

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

.section-kicker {
    margin: 0 0 6px;
    color: #93c5fd;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.detail-content h2,
.player-section h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    letter-spacing: -0.04em;
}

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.42);
    background: rgba(30, 41, 59, 0.88);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 300ms ease;
}

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

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

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

.card-title a:hover {
    color: #93c5fd;
}

.card-meta,
.rank-meta,
.detail-meta,
.category-meta {
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    margin: 10px 0 0;
    min-height: 3.1em;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.55;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span,
.meta-pill,
.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
    font-size: 12px;
}

.feature-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel,
.category-card,
.filter-panel,
.content-panel {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.70);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
}

.rank-panel {
    padding: 22px;
    position: sticky;
    top: 96px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.rank-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.58);
    transition: background 180ms ease, transform 180ms ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: rgba(59, 130, 246, 0.16);
}

.rank-no {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    font-weight: 900;
}

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

.category-card {
    display: block;
    padding: 24px;
    transition: transform 180ms ease, border-color 180ms ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.38);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
}

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

.page-hero,
.detail-hero {
    padding: 56px 0 30px;
}

.page-hero-card,
.detail-hero-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 34px;
    background:
        radial-gradient(circle at 18% 20%, rgba(59, 130, 246, 0.20), transparent 26rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.page-hero-card {
    padding: clamp(28px, 5vw, 56px);
}

.page-hero h1,
.detail-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 850px;
    color: var(--soft);
    font-size: 18px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.filter-bar a,
.filter-bar button,
.filter-bar select {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.70);
    padding: 10px 14px;
}

.filter-bar a:hover,
.filter-bar a.is-active,
.filter-bar button:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.22);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 38px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.pagination a:hover,
.pagination .current {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.82);
}

.detail-hero-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    padding: clamp(22px, 4vw, 44px);
}

.detail-cover {
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #0f172a;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}

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

.detail-summary {
    margin: 20px 0;
    color: var(--soft);
    font-size: 18px;
}

.player-section,
.detail-content,
.related-section {
    padding-top: 32px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 180ms ease;
}

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

.play-core {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 16px 44px rgba(37, 99, 235, 0.36);
    font-weight: 900;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

.content-panel {
    padding: clamp(22px, 4vw, 34px);
}

.content-panel p {
    color: var(--soft);
    font-size: 17px;
}

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

.info-table div {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-table dt {
    color: var(--muted);
}

.info-table dd {
    margin: 0;
    color: #ffffff;
}

.search-shell {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    align-items: start;
}

.filter-panel {
    padding: 22px;
    position: sticky;
    top: 96px;
}

.search-box-large {
    display: grid;
    gap: 14px;
}

.search-box-large input,
.search-box-large select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    outline: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.46);
    padding: 13px 14px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 32px;
    padding: 42px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
}

.footer-grid p,
.footer-grid a {
    color: var(--muted);
}

.footer-grid a:hover {
    color: #ffffff;
}

.footer-list {
    display: grid;
    gap: 10px;
}

.copyright-line {
    padding: 18px 0 28px;
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 1120px) {
    .movie-grid,
    .movie-grid.compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .feature-layout,
    .detail-content-grid,
    .search-shell {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .filter-panel {
        position: static;
    }
}

@media (max-width: 900px) {
    .nav-shell {
        grid-template-columns: auto 1fr auto;
    }

    .nav-links,
    .nav-search {
        display: none;
    }

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

    .hero-carousel {
        min-height: 740px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-poster {
        max-width: 280px;
        margin: 0;
        transform: none;
    }

    .quick-search {
        margin-top: 24px;
    }

    .detail-hero-card {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 300px;
    }

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

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

@media (max-width: 640px) {
    .container,
    .nav-shell,
    .mobile-panel,
    .hero-carousel {
        width: min(100% - 22px, 1240px);
    }

    .brand-text {
        font-size: 17px;
    }

    .hero-carousel {
        border-radius: 24px;
        min-height: 760px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero-desc,
    .page-hero p,
    .detail-summary {
        font-size: 16px;
    }

    .quick-search-card {
        grid-template-columns: 1fr;
    }

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

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

    .card-body {
        padding: 12px;
    }

    .card-desc {
        display: none;
    }

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

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