:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eff6ff;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-300: #67e8f9;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --blue-500: #3b82f6;
    --yellow-400: #facc15;
    --text: #0f172a;
    --muted: #64748b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--slate-50), #ffffff);
    color: var(--text);
    font-family: ui-sans-serif, 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: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 74px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 10px 28px rgba(6, 182, 212, 0.35);
}

.brand-text {
    font-size: 1.08rem;
}

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

.nav-link {
    padding: 10px 13px;
    border-radius: 999px;
    color: #cbd5e1;
    font-weight: 650;
    font-size: 0.94rem;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: min(340px, 32vw);
    padding: 4px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.header-search input,
.mobile-search input,
.filter-input,
.search-control input,
.search-control select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.header-search input {
    padding: 8px 12px;
}

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

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 750;
    transition: 0.2s ease;
}

.header-search button,
.mobile-search button {
    padding: 8px 15px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-nav-panel {
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 6px;
    margin-bottom: 14px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-search input {
    padding: 10px;
}

.mobile-nav-links,
.mobile-category-links div {
    display: grid;
    gap: 8px;
}

.mobile-category-links {
    margin-top: 14px;
    color: #cbd5e1;
}

.mobile-category-links strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
}

.mobile-category-links a {
    color: #cbd5e1;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 24% 22%, rgba(34, 211, 238, 0.22), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #164e63 52%, #0f172a 100%);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    transform: scale(1.02);
}

.hero-slide img.is-missing,
.poster-image.is-missing {
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.28) 35%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--cyan-300);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 1.1rem;
}

.hero-tags,
.tag-row,
.meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags {
    margin-bottom: 30px;
}

.hero-chip,
.category-pill,
.tag-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 750;
}

.hero-chip {
    padding: 8px 14px;
    color: #dffbff;
    border: 1px solid rgba(103, 232, 249, 0.35);
    background: rgba(6, 182, 212, 0.18);
}

.hero-actions,
.filter-bar,
.search-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.secondary-button,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 14px 35px rgba(6, 182, 212, 0.28);
}

.primary-button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 45px rgba(6, 182, 212, 0.36);
}

.secondary-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
}

.hero-controls {
    position: absolute;
    right: clamp(18px, 5vw, 70px);
    bottom: 38px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

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

.hero-controls button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero-controls button:hover {
    background: rgba(255, 255, 255, 0.28);
}

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

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

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

.section,
.section-dark,
.section-soft {
    padding: 76px 22px;
}

.section {
    background: #ffffff;
}

.section-soft {
    background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.section-dark {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

.section-inner {
    max-width: 1280px;
    margin: 0 auto;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

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

.section-action {
    color: var(--cyan-600);
    font-weight: 800;
    white-space: nowrap;
}

.section-dark .section-action {
    color: var(--cyan-300);
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

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

.section-dark .movie-card {
    color: var(--text);
}

.card-link {
    display: block;
    height: 100%;
}

.poster-frame {
    position: relative;
    margin: 0;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(59, 130, 246, 0.18)),
        #1e293b;
}

.poster-frame.wide {
    aspect-ratio: 16 / 9;
}

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

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

.duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
}

.duration {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.28);
}

.card-body {
    padding: 18px;
}

.category-pill {
    padding: 5px 10px;
    color: #0e7490;
    background: var(--cyan-100);
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.04rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
    display: -webkit-box;
    min-height: 2.72em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.meta-line {
    margin: 8px 0 10px;
    color: var(--slate-500);
    font-size: 0.88rem;
}

.meta-line span + span::before {
    content: "·";
    margin-right: 9px;
    color: #cbd5e1;
}

.tag-chip {
    color: var(--slate-500);
    font-size: 0.78rem;
}

.card-large {
    border-radius: 26px;
}

.card-large figcaption {
    position: absolute;
    inset: auto 0 0;
    padding: 70px 24px 22px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
}

.card-large h3 {
    min-height: auto;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.card-large p {
    color: rgba(255, 255, 255, 0.84);
}

.card-horizontal .card-link {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 160px;
}

.card-horizontal .poster-frame {
    height: 100%;
    min-height: 160px;
}

.scroll-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    width: 330px;
    min-width: 330px;
    scroll-snap-align: start;
}

.page-hero {
    color: #ffffff;
    padding: 76px 22px;
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.22), transparent 26%),
        linear-gradient(135deg, #0f172a, #164e63);
}

.page-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #cbd5e1;
    font-size: 1.06rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--cyan-300);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at right top, rgba(34, 211, 238, 0.18), transparent 34%),
        #ffffff;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

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

.category-card h2 {
    margin: 0 0 10px;
    font-size: 1.55rem;
}

.category-card p {
    margin: 0 0 24px;
    color: var(--slate-600);
}

.category-card .category-count {
    margin-top: auto;
    color: var(--cyan-600);
    font-weight: 850;
}

.filter-panel,
.search-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--slate-200);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-input,
.search-control input,
.search-control select {
    min-height: 46px;
    padding: 0 15px;
    color: var(--text);
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    background: #ffffff;
}

.filter-button {
    min-height: 46px;
    color: #ffffff;
    background: var(--slate-900);
}

.empty-state {
    display: none;
    padding: 46px 18px;
    text-align: center;
    color: var(--slate-600);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 62px 170px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #1e293b;
}

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

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.rank-info p {
    margin: 0;
    color: var(--slate-600);
}

.rank-score {
    padding: 10px 14px;
    border-radius: 999px;
    color: #0e7490;
    background: var(--cyan-100);
    font-weight: 850;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28)),
        transparent;
    cursor: pointer;
}

.player-start span {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 24px;
    border-radius: 999px;
    font-size: 1.06rem;
    font-weight: 850;
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.32);
}

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

.player-status {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 4;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.88rem;
    pointer-events: none;
}

.detail-card,
.sidebar-card {
    padding: 26px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-card h1 {
    margin: 12px 0 18px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

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

.info-cell {
    padding: 14px;
    border-radius: 16px;
    background: var(--slate-100);
}

.info-cell strong {
    display: block;
    color: var(--slate-500);
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.prose h2 {
    margin: 26px 0 10px;
    font-size: 1.45rem;
}

.prose p {
    margin: 0 0 16px;
    color: var(--slate-700);
}

.sidebar-card {
    position: sticky;
    top: 98px;
}

.sidebar-card h2 {
    margin: 0 0 16px;
    font-size: 1.2rem;
}

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

.related-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-cover {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #1e293b;
}

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

.related-item h3 {
    margin: 0 0 6px;
    font-size: 0.96rem;
    line-height: 1.34;
}

.related-item span {
    color: var(--slate-500);
    font-size: 0.8rem;
}

.search-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.7fr auto;
    gap: 12px;
    align-items: center;
}

.search-summary {
    margin: 18px 0 0;
    color: var(--slate-600);
    font-weight: 700;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 22px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1rem;
}

.footer-grid p {
    max-width: 430px;
    margin: 12px 0 0;
    color: #94a3b8;
}

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

.footer-grid a:hover {
    color: var(--cyan-300);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #64748b;
    font-size: 0.9rem;
}

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

    .mobile-menu-button {
        display: block;
    }

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

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

    .sidebar-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .hero {
        height: 620px;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 96px;
    }

    .hero-controls {
        right: 22px;
        bottom: 22px;
    }

    .hero-dots {
        left: 22px;
        bottom: 38px;
        transform: none;
    }

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

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

    .card-horizontal .card-link {
        grid-template-columns: 1fr;
    }

    .card-horizontal .poster-frame {
        min-height: auto;
    }

    .rank-item {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .rank-cover,
    .rank-score {
        display: none;
    }

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

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

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

@media (max-width: 560px) {
    .nav-shell {
        min-height: 66px;
        padding: 0 16px;
    }

    .brand-text {
        font-size: 0.98rem;
    }

    .hero {
        height: 580px;
    }

    .hero h1 {
        font-size: 2.55rem;
    }

    .section,
    .section-dark,
    .section-soft {
        padding: 54px 16px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .scroll-row .movie-card {
        width: 280px;
        min-width: 280px;
    }

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

    .related-item {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}
