: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;
    --muted-strong: #cbd5e1;
    --brand: #22d3ee;
    --brand-deep: #0891b2;
    --accent: #67e8f9;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.12), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: linear-gradient(to bottom, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58), transparent);
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(2, 6, 23, 0.96);
    border-color: var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), #2563eb);
    color: white;
    font-weight: 900;
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

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

.brand-name {
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-tagline {
    color: var(--muted);
    font-size: 12px;
}

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

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

.nav-link {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 650;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent);
    background: rgba(34, 211, 238, 0.12);
}

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

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(18px);
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

.mobile-nav-link {
    padding: 12px 14px;
}

.site-main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    background: linear-gradient(135deg, #020617, #0f172a);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-image,
.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-shade,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.86) 24%, rgba(2, 6, 23, 0.38) 62%, rgba(2, 6, 23, 0.68) 100%),
        radial-gradient(circle at 18% 70%, rgba(34, 211, 238, 0.26), transparent 28rem);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 72px;
    width: min(1240px, calc(100% - 32px));
    transform: translateX(-50%);
    max-width: 1240px;
}

.hero-content > * {
    max-width: 760px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-content p {
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2.2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-meta,
.quick-links,
.page-hero-actions,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: var(--muted-strong);
    font-size: 13px;
}

.hero-actions {
    margin-top: 26px;
}

.primary-button,
.ghost-button,
.search-card button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-card button {
    border: 0;
    color: #001018;
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    box-shadow: 0 16px 38px rgba(34, 211, 238, 0.22);
}

.ghost-button {
    border: 1px solid rgba(203, 213, 225, 0.28);
    color: var(--text);
    background: rgba(15, 23, 42, 0.58);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
    color: var(--text);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

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

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

.home-search-panel,
.content-section,
.footer-shell,
.footer-bottom,
.detail-shell,
.player-shell {
    width: min(1240px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.home-search-panel {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-top: -36px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.search-card label,
.toolbar label {
    color: var(--text);
    font-weight: 800;
}

.search-card input,
.toolbar input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
    outline: none;
}

.search-card input {
    height: 48px;
    padding: 0 16px;
}

.toolbar input {
    min-height: 46px;
    padding: 0 15px;
}

.quick-links a {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}

.content-section {
    padding: 58px 0 0;
}

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

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

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

.section-more {
    flex: none;
    color: var(--accent);
    font-weight: 800;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 26px 70px rgba(8, 145, 178, 0.2);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.26), transparent 12rem),
        linear-gradient(135deg, #0f172a, #020617);
}

.movie-card.compact .card-poster {
    aspect-ratio: 16 / 11;
}

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

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.12));
}

.play-chip,
.rank-number {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
    background: rgba(34, 211, 238, 0.92);
    color: #001018;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: scale(1);
}

.rank-number {
    left: 14px;
    top: 14px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: rgba(2, 6, 23, 0.76);
    color: var(--accent);
    border: 1px solid rgba(103, 232, 249, 0.32);
    backdrop-filter: blur(12px);
}

.card-body {
    padding: 17px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 12px;
}

.card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: rgba(148, 163, 184, 0.55);
}

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.library-list a:hover,
.rank-table a:hover {
    color: var(--accent);
}

.movie-card p {
    min-height: 52px;
    margin: 9px 0 14px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.movie-card.compact p {
    min-height: 46px;
}

.tag-row {
    gap: 7px;
}

.tag-row span {
    min-height: 26px;
    padding: 4px 9px;
    font-size: 12px;
}

.category-overview-section,
.ranking-section,
.spotlight-section {
    padding: 42px;
    margin-top: 58px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.3));
}

.category-grid,
.category-detail-grid,
.text-grid {
    display: grid;
    gap: 20px;
}

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

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

.category-card,
.category-detail-card a,
.text-card {
    display: grid;
    gap: 13px;
    height: 100%;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(2, 6, 23, 0.48);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover,
.category-detail-card a:hover,
.text-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.34);
    background: rgba(15, 23, 42, 0.82);
}

.category-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(34, 211, 238, 0.14);
    color: var(--accent);
    font-size: 20px;
    font-weight: 900;
}

.category-card strong,
.category-detail-card h2,
.text-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 21px;
}

.category-card p,
.category-detail-card p,
.text-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.category-card em,
.category-detail-card strong {
    color: var(--accent);
    font-style: normal;
}

.sample-titles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample-titles span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted-strong);
    font-size: 12px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #020617, #0f172a);
}

.compact-hero {
    padding: 144px 0 70px;
}

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

.compact-hero h1 {
    max-width: 820px;
    margin: 14px 0 14px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.compact-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

.page-hero-actions {
    margin-top: 24px;
}

.toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 420px);
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.62);
}

.empty-state {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.7);
    color: var(--muted);
    text-align: center;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rank-table th,
.rank-table td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.rank-table th {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.rank-table td {
    color: var(--muted-strong);
}

.rank-table tr:hover td {
    background: rgba(34, 211, 238, 0.06);
}

.library-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.library-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.64);
}

.library-list a {
    color: var(--text);
    font-weight: 800;
}

.library-list span {
    flex: none;
    color: var(--muted);
    font-size: 13px;
}

.detail-hero {
    min-height: 680px;
    padding: 120px 0 54px;
}

.detail-shell {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--muted-strong);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 40% 20%, rgba(34, 211, 238, 0.2), transparent 14rem),
        #0f172a;
    box-shadow: var(--shadow);
}

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

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

.detail-one-line {
    max-width: 860px;
    margin: 0 0 20px;
    color: var(--muted-strong);
    font-size: 19px;
    line-height: 1.85;
}

.detail-tags {
    margin-top: 16px;
}

.detail-copy .primary-button {
    margin-top: 24px;
}

.player-section {
    padding-top: 48px;
}

.player-shell {
    display: grid;
    gap: 18px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.player-video {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.player-start[hidden] {
    display: none;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    color: #001018;
    font-size: 36px;
    text-indent: 6px;
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.28);
}

.player-info {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.7);
}

.player-info h2,
.detail-text h2 {
    margin: 0 0 10px;
}

.player-info p,
.detail-text p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.9;
}

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

.detail-text article {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.64);
}

.site-footer {
    margin-top: 76px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), #020617);
}

.footer-shell {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
    padding: 46px 0;
}

.footer-brand p,
.footer-column a,
.footer-bottom p {
    color: var(--muted);
}

.footer-logo {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 900;
}

.footer-brand p {
    max-width: 360px;
    line-height: 1.75;
}

.footer-column h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

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

.footer-column a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding: 18px 0 32px;
    border-top: 1px solid var(--line);
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
}

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

    .menu-toggle {
        display: block;
    }

    .home-search-panel,
    .search-card,
    .detail-layout,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .featured-grid,
    .small-grid,
    .rank-grid,
    .category-grid,
    .category-detail-grid,
    .text-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-layout {
        align-items: start;
    }

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

@media (max-width: 720px) {
    .nav-shell {
        height: 66px;
    }

    .brand-tagline {
        display: none;
    }

    .hero-carousel {
        min-height: 78vh;
    }

    .hero-content {
        bottom: 72px;
    }

    .hero-control {
        display: none;
    }

    .home-search-panel {
        margin-top: -26px;
    }

    .quick-links {
        align-items: stretch;
    }

    .quick-links a {
        flex: 1 1 40%;
        text-align: center;
    }

    .content-section,
    .category-overview-section,
    .ranking-section,
    .spotlight-section {
        padding-top: 42px;
    }

    .category-overview-section,
    .ranking-section,
    .spotlight-section {
        padding-left: 18px;
        padding-right: 18px;
    }

    .section-heading,
    .toolbar,
    .library-list li {
        align-items: stretch;
        flex-direction: column;
        display: flex;
    }

    .movie-grid,
    .featured-grid,
    .small-grid,
    .rank-grid,
    .category-grid,
    .category-detail-grid,
    .text-grid,
    .detail-text,
    .library-list {
        grid-template-columns: 1fr;
    }

    .compact-hero {
        padding-top: 118px;
    }

    .detail-hero {
        padding-top: 104px;
    }

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

    .player-start span {
        width: 68px;
        height: 68px;
        font-size: 29px;
    }
}
