:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --dark: #0f172a;
    --dark-2: #111827;
    --amber: #f59e0b;
    --orange: #f97316;
    --soft: #fff7ed;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 45%, #eef2ff 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 22px rgba(249, 115, 22, 0.26);
}

.brand-text {
    font-size: 22px;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 10px 16px;
    color: #334155;
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.24);
}

.header-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
}

.header-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 10px 14px 10px 18px;
    color: var(--ink);
    background: transparent;
}

.header-search button,
.large-search button {
    border: 0;
    color: #fff;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #0f172a;
    margin: 5px auto;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

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

.hero-carousel {
    position: relative;
    min-height: 680px;
    color: #fff;
    overflow: hidden;
    background: radial-gradient(circle at 20% 15%, rgba(245, 158, 11, 0.26), transparent 28%), linear-gradient(135deg, #0f172a 0%, #111827 55%, #1f2937 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 32px 32px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.38)), linear-gradient(0deg, rgba(15, 23, 42, 0.9), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 96px;
    max-width: 820px;
    justify-self: center;
    text-align: center;
}

.hero-eyebrow,
.sub-hero span,
.section-title span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.18);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 24px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.07em;
    background: linear-gradient(90deg, #fde68a, #fb923c, #fef3c7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-line {
    max-width: 760px;
    margin: 0 auto;
    color: #d1d5db;
    font-size: clamp(18px, 2.4vw, 26px);
    line-height: 1.55;
}

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

.hero-tags {
    justify-content: center;
    margin: 26px auto 0;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.tag-cloud span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #475569;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-actions {
    justify-content: center;
    margin-top: 32px;
}

.primary-button,
.ghost-button,
.category-entry,
.section-title a,
.category-tile-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 900;
    transition: all 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 30px rgba(249, 115, 22, 0.32);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.category-entry:hover,
.section-title a:hover,
.category-tile-head a:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.2s ease;
}

.hero-dot.is-active {
    width: 58px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: -48px;
    position: relative;
    z-index: 4;
    padding: 34px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-title h2,
.sub-hero h1 {
    margin: 10px 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.search-panel p,
.section-title p,
.category-tile p,
.sub-hero p {
    color: var(--muted);
    line-height: 1.8;
}

.large-search {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 16px;
}

.large-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 16px 18px;
}

.quick-links {
    grid-column: 1 / -1;
}

.quick-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-weight: 800;
}

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

.section-title a,
.category-tile-head a,
.category-entry {
    color: #c2410c;
    background: #fff7ed;
}

.light-title,
.light-title h2,
.light-title p {
    color: #fff;
}

.light-title span {
    color: #fde68a;
}

.light-title a {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

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

.movie-card,
.category-overview-card,
.content-card,
.side-card,
.category-tile {
    overflow: hidden;
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-overview-card:hover,
.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 46px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e2e8f0;
}

.poster-wrap img,
.compact-card img,
.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.movie-card:hover .poster-wrap img,
.compact-card:hover img,
.ranking-item:hover .ranking-poster img {
    transform: scale(1.06);
}

.poster-chip,
.rank-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    right: auto;
    left: 14px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.movie-card h2,
.ranking-info h2,
.content-card h2,
.side-card h2,
.category-tile h2,
.category-overview-card h2,
.player-section h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.movie-card h2 a:hover,
.ranking-info h2 a:hover {
    color: var(--orange);
}

.movie-card p,
.ranking-info p,
.content-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.72;
}

.movie-meta {
    color: #64748b;
    font-size: 13px;
    font-weight: 750;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 10px;
    color: #cbd5e1;
}

.tag-row {
    margin-top: 12px;
}

.rank-section {
    background: linear-gradient(135deg, #111827, #0f172a);
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 108px 44px 1fr auto;
    gap: 16px;
    align-items: center;
    border-radius: 18px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.home-ranking .ranking-item {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-ranking .ranking-info p,
.home-ranking .movie-meta {
    color: #cbd5e1;
}

.ranking-poster {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #e2e8f0;
}

.ranking-index {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 950;
}

.score-pill {
    border-radius: 999px;
    padding: 9px 12px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 950;
}

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

.category-tile,
.category-overview-card {
    padding: 24px;
}

.category-tile-head,
.category-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.category-overview-head {
    justify-content: flex-start;
}

.category-overview-head > span {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 950;
}

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

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

.compact-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 130px;
    border-radius: 15px;
    background: #111827;
}

.compact-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 62%);
}

.compact-card span,
.compact-card strong {
    position: absolute;
    z-index: 2;
    left: 12px;
    right: 12px;
}

.compact-card span {
    top: 12px;
    color: #fde68a;
    font-size: 12px;
    font-weight: 900;
}

.compact-card strong {
    bottom: 12px;
    color: #fff;
    font-size: 14px;
    line-height: 1.25;
}

.sub-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 82% 20%, rgba(249, 115, 22, 0.36), transparent 28%), linear-gradient(135deg, #0f172a, #1f2937);
}

.sub-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0;
}

.sub-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
}

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

.filter-wrap {
    padding-top: 44px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: #fff;
    outline: 0;
}

.filter-bar input {
    flex: 1 1 260px;
}

.empty-state {
    display: none;
    margin: 34px 0 0;
    padding: 28px;
    border-radius: 18px;
    text-align: center;
    color: var(--muted);
    background: #fff;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #fff;
    background: #0f172a;
}

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

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.08);
    opacity: 0.38;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.72)), linear-gradient(0deg, #0f172a, transparent 42%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.36);
    background: #111827;
}

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

.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.detail-line {
    max-width: 780px;
    color: #d1d5db;
    font-size: 20px;
    line-height: 1.75;
}

.detail-meta {
    margin: 22px 0;
}

.detail-meta span {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
}

.detail-tags span {
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.16);
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
}

.player-section,
.content-card,
.side-card {
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.movie-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #020617;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.18), rgba(15, 23, 42, 0.42));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.36);
    font-size: 34px;
    padding-left: 5px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 16px;
    margin: 0;
}

.side-card dt {
    color: #64748b;
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: #111827;
    font-weight: 800;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.back-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 99;
    width: 48px;
    height: 48px;
    display: none;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 34px rgba(249, 115, 22, 0.32);
    font-weight: 950;
}

.back-top.is-visible {
    display: grid;
}

.site-footer {
    margin-top: 60px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #111827, #0f172a);
}

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

.footer-about p {
    margin: 18px 0 0;
    line-height: 1.8;
    color: #94a3b8;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.footer-column {
    display: grid;
    gap: 10px;
    align-content: start;
}

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

.footer-column a,
.footer-column span {
    color: #94a3b8;
    font-size: 14px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.searchable-card.is-hidden {
    display: none;
}

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

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

    .home-ranking,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-inner {
        grid-template-columns: 240px 1fr;
    }
}

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

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }

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

    .hero-carousel {
        min-height: 600px;
    }

    .hero-content {
        padding: 92px 0 80px;
    }

    .search-panel {
        grid-template-columns: 1fr;
        margin-top: -34px;
        padding: 24px;
    }

    .large-search {
        flex-direction: column;
    }

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

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

    .ranking-item {
        grid-template-columns: 88px 38px 1fr;
    }

    .score-pill {
        grid-column: 2 / -1;
        justify-self: start;
    }

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

    .detail-inner {
        grid-template-columns: 1fr;
        padding: 54px 0;
    }

    .detail-poster {
        width: min(260px, 72vw);
    }

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

@media (max-width: 540px) {
    .brand-text {
        font-size: 19px;
    }

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

    .hero-tags,
    .detail-meta,
    .tag-row,
    .hero-actions {
        gap: 8px;
    }

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

    .poster-wrap {
        aspect-ratio: 16 / 10;
    }

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

    .ranking-index {
        position: absolute;
        margin: 8px;
    }

    .filter-bar {
        display: grid;
    }

    .filter-bar input,
    .filter-bar select {
        width: 100%;
    }

    .side-card dl {
        grid-template-columns: 1fr;
    }

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