:root {
    --color-bg: #f8fafc;
    --color-bg-soft: #f1f5f9;
    --color-slate-950: #020617;
    --color-slate-900: #0f172a;
    --color-slate-800: #1e293b;
    --color-slate-700: #334155;
    --color-slate-600: #475569;
    --color-slate-500: #64748b;
    --color-slate-300: #cbd5e1;
    --color-white: #ffffff;
    --color-emerald: #10b981;
    --color-emerald-dark: #059669;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.14);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.10);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --container: min(1180px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-slate-900);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: Inter, -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;
    color: var(--color-white);
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: var(--container);
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand:hover {
    opacity: 0.88;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-emerald), #22d3ee);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--color-slate-300);
    font-size: 12px;
}

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

.nav-link {
    color: var(--color-slate-300);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-emerald);
}

.header-search {
    position: relative;
    width: 260px;
}

.header-search input,
.inline-search input,
.filter-control input,
.filter-control select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.34);
    outline: none;
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--color-slate-900);
    background: rgba(255, 255, 255, 0.95);
}

.header-search input:focus,
.inline-search input:focus,
.filter-control input:focus,
.filter-control select:focus {
    border-color: var(--color-emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.search-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(420px, 92vw);
    max-height: 460px;
    overflow: auto;
    padding: 10px;
    color: var(--color-slate-900);
    background: var(--color-white);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.search-result-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
}

.search-result-item:hover {
    background: #f1f5f9;
}

.search-result-item img {
    width: 64px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.search-result-item strong {
    display: block;
    margin-bottom: 4px;
}

.search-result-item small {
    color: var(--color-slate-500);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.16);
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    margin: 4px auto;
    display: block;
    background: var(--color-white);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: var(--container);
    margin: 0 auto;
    padding: 14px 0 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}

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

.mobile-link {
    padding: 12px 14px;
    color: var(--color-slate-200);
    background: rgba(148, 163, 184, 0.10);
    border-radius: 12px;
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    color: var(--color-white);
    background: var(--color-slate-950);
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    opacity: 0.44;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 24%, rgba(16, 185, 129, 0.22), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.24) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, transparent 45%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: var(--container);
    min-height: 72vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: min(1180px, calc(100vw - 32px));
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 14px;
    padding: 6px 12px;
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.92);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero-meta {
    margin: 20px 0 0;
    color: var(--color-slate-300);
    font-weight: 700;
}

.hero-desc {
    max-width: 660px;
    margin: 18px 0 0;
    color: #e2e8f0;
    font-size: 18px;
}

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

.primary-button,
.ghost-button,
.secondary-button,
.text-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-emerald), #14b8a6);
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.35);
}

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

.ghost-button {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.secondary-button {
    border: 0;
    color: var(--color-white);
    background: var(--color-slate-900);
    cursor: pointer;
}

.text-button,
.section-more {
    color: var(--color-emerald-dark);
    background: #ecfdf5;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.36);
    border-radius: 999px;
}

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

.hero-rail {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 92px;
    z-index: 3;
    display: grid;
    gap: 12px;
    width: 260px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    color: var(--color-white);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    backdrop-filter: blur(14px);
}

.hero-mini-card.active {
    border-color: rgba(16, 185, 129, 0.75);
    background: rgba(16, 185, 129, 0.16);
}

.hero-mini-card img {
    width: 72px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--color-slate-900);
    border-radius: 12px;
}

.search-landing,
.content-section,
.category-overview-grid,
.rank-list,
.detail-content,
.player-section,
.filter-bar {
    width: var(--container);
    margin: 34px auto 0;
}

.search-card,
.page-hero,
.filter-bar,
.player-card,
.story-block {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.search-card {
    padding: 30px;
}

.search-card h2,
.section-head h2,
.page-hero h1,
.story-block h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.inline-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 22px;
}

.inline-search button {
    border: 0;
    color: var(--color-white);
    background: var(--color-slate-900);
    border-radius: 999px;
    padding: 0 20px;
    cursor: pointer;
}

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

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

.category-tile {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    padding: 22px;
    color: var(--color-white);
    background: var(--color-slate-900);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.tile-bg,
.overview-cover span {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.88)),
        var(--tile-image);
    background-size: cover;
    background-position: center;
    transition: transform 0.35s ease;
}

.category-tile:hover .tile-bg,
.category-overview-card:hover .overview-cover span {
    transform: scale(1.08);
}

.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile strong {
    margin-top: 64px;
    font-size: 24px;
}

.category-tile small {
    margin-top: 6px;
    color: #dbeafe;
}

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

.movie-card {
    overflow: hidden;
    background: var(--color-white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.34), transparent 38%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.76), transparent);
}

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    color: var(--color-white);
    background: rgba(16, 185, 129, 0.92);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--color-slate-900);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-title:hover {
    color: var(--color-emerald-dark);
}

.card-meta,
.card-desc {
    margin: 8px 0 0;
    color: var(--color-slate-500);
    font-size: 14px;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.tag-row span {
    padding: 5px 9px;
    color: #047857;
    background: #ecfdf5;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.page-hero {
    width: var(--container);
    margin: 34px auto 0;
    padding: clamp(32px, 6vw, 70px);
    color: var(--color-white);
    background:
        radial-gradient(circle at 82% 20%, rgba(16, 185, 129, 0.32), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.category-overview-card {
    overflow: hidden;
    background: var(--color-white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.overview-cover {
    position: relative;
    display: block;
    min-height: 190px;
    overflow: hidden;
    background: var(--color-slate-900);
}

.overview-body {
    padding: 24px;
}

.overview-body h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.overview-body p {
    color: var(--color-slate-500);
}

.overview-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.overview-samples span {
    padding: 6px 10px;
    color: var(--color-slate-700);
    background: var(--color-bg-soft);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
}

.filter-control label {
    display: block;
    margin: 0 0 8px;
    color: var(--color-slate-600);
    font-size: 13px;
    font-weight: 800;
}

.empty-state {
    margin: 26px 0 0;
    padding: 20px;
    text-align: center;
    color: var(--color-slate-500);
    background: var(--color-white);
    border-radius: var(--radius-lg);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 132px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    background: var(--color-white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-emerald), #14b8a6);
    border-radius: 18px;
    font-size: 20px;
    font-weight: 900;
}

.rank-poster img {
    width: 132px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--color-slate-900);
    border-radius: 14px;
}

.rank-info h2 {
    margin: 0;
    font-size: 22px;
}

.rank-info p,
.rank-info small {
    display: block;
    margin: 6px 0 0;
    color: var(--color-slate-500);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--color-white);
    background: var(--color-slate-950);
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.70), rgba(2, 6, 23, 0.94)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
    opacity: 0.98;
}

.detail-inner {
    position: relative;
    z-index: 1;
    width: var(--container);
    margin: 0 auto;
    padding: 36px 0 54px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 30px;
    color: var(--color-slate-300);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    min-height: 230px;
}

.detail-copy h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.detail-meta,
.detail-one-line {
    max-width: 760px;
    color: #dbeafe;
}

.detail-one-line {
    font-size: 18px;
}

.detail-tags span {
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.26);
}

.player-section {
    scroll-margin-top: 90px;
}

.player-card {
    padding: 18px;
    background: var(--color-slate-900);
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 18px;
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    width: 100%;
    color: var(--color-white);
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.24), rgba(2, 6, 23, 0.74));
    border: 0;
    cursor: pointer;
}

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

.play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    background: linear-gradient(135deg, var(--color-emerald), #14b8a6);
    border-radius: 999px;
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.38);
    font-size: 34px;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    font-size: 13px;
    pointer-events: none;
}

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

.story-block {
    padding: 26px;
}

.story-block p:last-child {
    color: var(--color-slate-600);
    font-size: 17px;
}

.site-footer {
    margin-top: 70px;
    color: var(--color-slate-300);
    background: var(--color-slate-950);
}

.footer-inner {
    width: var(--container);
    margin: 0 auto;
    padding: 44px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-white);
    font-size: 20px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--color-white);
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    color: var(--color-slate-500);
}

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

    .menu-button {
        display: block;
    }

    .header-search {
        margin-left: auto;
    }

    .hero-rail {
        display: none;
    }

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

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

@media (max-width: 820px) {
    .header-inner {
        min-height: 66px;
        gap: 12px;
    }

    .brand-text small {
        display: none;
    }

    .header-search {
        display: none;
    }

    .hero-slider,
    .hero-copy {
        min-height: 620px;
    }

    .hero-copy {
        justify-content: flex-end;
        padding-bottom: 126px;
    }

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

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

    .rank-row {
        grid-template-columns: 54px 88px 1fr;
    }

    .rank-row .text-button {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .rank-poster img {
        width: 88px;
    }

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

@media (max-width: 560px) {
    :root {
        --container: min(100vw - 20px, 1180px);
    }

    .mobile-nav.open,
    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-actions,
    .inline-search,
    .section-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-controls {
        bottom: 24px;
    }

    .search-card,
    .story-block,
    .overview-body {
        padding: 20px;
    }

    .rank-row {
        grid-template-columns: 44px 1fr;
    }

    .rank-poster {
        display: none;
    }
}
