:root {
    color-scheme: light;
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #020617;
    --dark-soft: #0f172a;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --yellow: #facc15;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", 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: 50;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.32);
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-copy strong {
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy small {
    color: #94a3b8;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.main-nav > a,
.nav-dropdown > button {
    color: #e2e8f0;
    background: transparent;
    border: 0;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.main-nav > a:hover,
.nav-dropdown > button:hover {
    color: #22d3ee;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 4px;
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    color: #dbeafe;
    padding: 9px 12px;
    border-radius: 10px;
}

.nav-dropdown-panel a:hover {
    background: rgba(59, 130, 246, 0.18);
    color: #67e8f9;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 310px;
    padding: 4px;
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
}

.top-search input,
.mobile-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: #fff;
}

.top-search input {
    color: #fff;
    background: transparent;
    padding: 8px 8px 8px 14px;
}

.top-search input::placeholder,
.mobile-search input::placeholder,
.filter-input::placeholder {
    color: #94a3b8;
}

.top-search button,
.mobile-search button,
.primary-button,
.secondary-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    padding: 9px 16px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.36);
}

.secondary-button {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: none;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(148, 163, 184, 0.16);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: #111827;
    padding: 16px;
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-search input {
    border-radius: 999px;
    padding: 10px 14px;
}

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

.mobile-links a {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 12px;
}

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

.hero-carousel {
    position: relative;
    min-height: 600px;
    color: #fff;
    overflow: hidden;
    background: #020617;
}

.hero-track {
    position: relative;
    min-height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.hero-media {
    position: absolute;
    inset: 0;
}

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

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 35%, rgba(34, 211, 238, 0.22), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.05) 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 600px;
    margin: 0 auto;
    display: grid;
    align-content: center;
    gap: 22px;
    padding: 74px 0;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--yellow);
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.26);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-content h1 {
    width: min(720px, 100%);
    margin: 0;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    width: min(680px, 100%);
    margin: 0;
    color: #dbeafe;
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags,
.meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.meta-pills span,
.tag-row span,
.tag-row a,
.detail-tags span,
.footer-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #0f172a;
    background: #e0f2fe;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #dbeafe;
    background: rgba(226, 232, 240, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.18);
}

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

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

.section-block {
    margin-top: 58px;
}

.section-panel {
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.section-panel.dark {
    color: #fff;
    background: linear-gradient(135deg, #020617, #1e293b);
    border-color: rgba(148, 163, 184, 0.18);
}

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

.section-head h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.dark .section-head p {
    color: #cbd5e1;
}

.section-more {
    color: var(--blue);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.42);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.82);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
}

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

.movie-meta-line {
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 7px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.3;
}

.movie-card h3 a:hover,
.related-card h3 a:hover {
    color: var(--blue);
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row a {
    color: #075985;
}

.scroller {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(255px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.scroller > * {
    scroll-snap-align: start;
}

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

.category-tile {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.35), transparent 36%),
        linear-gradient(135deg, #0f172a, #1e3a8a 54%, #0891b2);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-tile p {
    margin: 0;
    color: #dbeafe;
}

.category-mini {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}

.category-mini img {
    width: 68px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 100px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 14px;
    font-weight: 900;
}

.rank-thumb {
    width: 100px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-item h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-action {
    color: var(--blue);
    font-weight: 800;
    white-space: nowrap;
}

.page-title {
    padding: 58px 0 24px;
}

.page-title .crumbs,
.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 14px;
}

.crumbs a:hover {
    color: var(--blue);
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(130px, 1fr));
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.filter-input,
.filter-select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 0 13px;
}

.hidden-card {
    display: none !important;
}

.no-results {
    display: none;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
}

.no-results.is-visible {
    display: block;
}

.detail-hero {
    color: #fff;
    background:
        radial-gradient(circle at 76% 30%, rgba(34, 211, 238, 0.2), transparent 28%),
        linear-gradient(135deg, #020617, #111827 58%, #0f172a);
    padding: 34px 0 48px;
}

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.05), rgba(2, 6, 23, 0.5));
    cursor: pointer;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 24px 58px rgba(6, 182, 212, 0.42);
    font-size: 34px;
}

.player-shell.is-playing .play-overlay {
    display: none;
}

.detail-copy {
    display: grid;
    gap: 16px;
}

.detail-copy h1 {
    color: #fff;
}

.detail-copy p {
    margin: 0;
    color: #cbd5e1;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-main {
    width: min(1180px, calc(100% - 32px));
    margin: 46px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 2fr) 340px;
    gap: 28px;
}

.article-panel,
.side-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08);
}

.article-panel {
    padding: 30px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.article-panel p {
    margin: 0 0 20px;
    color: #334155;
}

.side-panel {
    padding: 18px;
    height: fit-content;
}

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

.related-card {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 12px;
    align-items: center;
}

.related-poster {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.related-poster img {
    width: 104px;
    height: 70px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-poster span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(2, 6, 23, 0.2);
}

.related-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.3;
}

.related-card p {
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card small {
    color: #94a3b8;
}

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 34px;
    padding: 46px 0;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 360px;
}

.footer-column h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.footer-column a:hover {
    color: #22d3ee;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags span {
    color: #cffafe;
    background: rgba(6, 182, 212, 0.14);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 14px;
}

@media (max-width: 1080px) {
    .top-search,
    .main-nav {
        display: none;
    }

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

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

    .detail-layout,
    .detail-main,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .header-inner,
    .page-main,
    .hero-content,
    .detail-layout,
    .detail-main,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .brand-copy small {
        display: none;
    }

    .hero-carousel,
    .hero-track,
    .hero-content {
        min-height: 560px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

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

    .section-panel,
    .article-panel {
        padding: 22px;
        border-radius: 22px;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 82px 1fr;
    }

    .rank-action {
        grid-column: 3;
    }

    .rank-thumb {
        width: 82px;
        height: 58px;
    }

    .mobile-links {
        grid-template-columns: 1fr;
    }
}
