:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --emerald: #34d399;
    --emerald-dark: #059669;
    --cyan: #22d3ee;
    --orange: #fb923c;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.16), transparent 34rem),
        radial-gradient(circle at 90% 8%, rgba(34, 211, 238, 0.14), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.03em;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    color: #06261f;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.36);
}

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

.nav-link,
.mobile-nav-link {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.1);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 240px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.78);
}

.header-search input,
.mobile-search input,
.search-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.search-panel input::placeholder {
    color: #64748b;
}

.search-icon {
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
}

.mobile-menu-button {
    display: none;
    border: 0;
    color: var(--text);
    background: rgba(30, 41, 59, 0.88);
    border-radius: 12px;
    width: 44px;
    height: 44px;
}

.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-search {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.8);
}

.mobile-search button {
    border: 0;
    color: #03221b;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.mobile-nav {
    display: grid;
    margin-top: 10px;
}

.hero {
    position: relative;
    height: 78vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

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

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

.hero-media::before,
.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
}

.hero-media::before {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.9));
}

.hero-media::after {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 34%, transparent 74%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 40px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald);
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: 0.08em;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 22px 0 0;
    max-width: 760px;
    color: #dbeafe;
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.65;
}

.hero-badges,
.detail-badges,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.hero-badges span,
.detail-badges span,
.tag-list span {
    color: #e2e8f0;
    padding: 9px 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
}

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

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: #022c22;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.3);
}

.button-secondary {
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.62);
}

.button-primary:hover,
.button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 52px rgba(34, 211, 238, 0.22);
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--text);
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.hero-control:hover {
    background: rgba(15, 23, 42, 0.8);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--emerald);
}

.main-content {
    padding: 64px 0 84px;
}

.page-hero {
    padding: 70px 0 46px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 8% 20%, rgba(16, 185, 129, 0.18), transparent 30rem),
        radial-gradient(circle at 86% 12%, rgba(34, 211, 238, 0.14), transparent 30rem),
        rgba(2, 6, 23, 0.34);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 18px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.75;
}

.section-block {
    margin-bottom: 72px;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.section-heading span {
    color: var(--emerald);
    font-weight: 900;
    letter-spacing: 0.12em;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 0;
    max-width: 780px;
    color: var(--muted);
    line-height: 1.7;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.9));
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.45);
    box-shadow: 0 24px 70px rgba(16, 185, 129, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(52, 211, 153, 0.22), transparent 45%),
        linear-gradient(135deg, #0f172a, #111827);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.poster-year {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ecfeff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #022c22;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 14px 40px rgba(16, 185, 129, 0.36);
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover {
    color: var(--emerald);
}

.movie-card-body p {
    margin: 0;
    min-height: 44px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: #cbd5e1;
    font-size: 12px;
}

.movie-card-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.72);
}

.movie-card-small .movie-card-body p {
    display: none;
}

.feature-panel,
.category-panel,
.search-panel {
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.22), rgba(8, 47, 73, 0.22));
    box-shadow: var(--shadow);
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 120px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: auto -20% -60% 20%;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.26), transparent 65%);
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.6;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.45);
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.65), rgba(8, 47, 73, 0.65));
}

.category-tile h2,
.category-tile h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-tile p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px minmax(140px, 0.7fr) minmax(160px, 1fr) 24px;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(5px);
    border-color: rgba(52, 211, 153, 0.42);
    background: rgba(15, 23, 42, 0.96);
}

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #022c22;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.rank-title {
    min-width: 0;
    color: var(--text);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-desc {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-arrow {
    color: var(--emerald);
    font-size: 28px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.82);
    text-align: center;
}

.pagination a:hover,
.pagination .current {
    color: #022c22;
    border-color: transparent;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 46px 0 70px;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.95)),
        linear-gradient(0deg, #020617, transparent 48%);
}

.breadcrumb {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--emerald);
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: rgba(15, 23, 42, 0.82);
}

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

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-info .lead {
    max-width: 850px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 20px;
    line-height: 1.75;
}

.content-panel {
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.24);
}

.content-panel h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.content-panel p {
    margin: 0 0 20px;
    color: var(--soft);
    font-size: 17px;
    line-height: 1.9;
}

.content-panel p:last-child {
    margin-bottom: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: var(--text);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.24));
    cursor: pointer;
}

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

.play-overlay span:first-child {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    color: #022c22;
    font-size: 30px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 60px rgba(16, 185, 129, 0.38);
}

.play-overlay span:last-child {
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.72);
}

.player-message.is-visible {
    display: block;
}

.search-panel {
    margin-bottom: 32px;
}

.search-panel form {
    display: flex;
    gap: 12px;
}

.search-panel input {
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.9);
}

.search-panel button {
    min-width: 120px;
    border: 0;
    border-radius: 18px;
    color: #022c22;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    cursor: pointer;
}

.empty-state {
    display: none;
    padding: 32px;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.98));
    padding: 50px 0 22px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 34px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 16px;
}

.site-footer p,
.site-footer a {
    display: block;
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.75;
}

.site-footer a:hover {
    color: var(--emerald);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 14px;
}

@media (max-width: 1060px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

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

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

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: 64px;
    }

    .site-logo {
        font-size: 19px;
    }

    .hero {
        min-height: 620px;
        height: auto;
    }

    .hero-content {
        padding: 112px 0 96px;
    }

    .hero-control {
        display: none;
    }

    .main-content {
        padding: 42px 0 64px;
    }

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

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

    .feature-panel,
    .category-panel,
    .search-panel,
    .content-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .rank-row {
        grid-template-columns: 48px minmax(0, 1fr) 20px;
        gap: 10px;
    }

    .rank-desc {
        display: none;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        gap: 26px;
    }

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

    .search-panel form {
        flex-direction: column;
    }

    .play-overlay {
        flex-direction: column;
        gap: 12px;
    }

    .play-overlay span:first-child {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 420px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }
}
