:root {
    --sunset-50: #fff7ed;
    --sunset-100: #ffedd5;
    --sunset-500: #f97316;
    --sunset-600: #ea580c;
    --golden-50: #fffbeb;
    --golden-400: #fbbf24;
    --golden-600: #d97706;
    --twilight-500: #8b5cf6;
    --twilight-700: #6d28d9;
    --ocean-500: #0ea5e9;
    --ink-900: #111827;
    --ink-700: #374151;
    --ink-500: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --bg: #fffaf5;
    --shadow-soft: 0 18px 45px rgba(17, 24, 39, 0.10);
    --shadow-card: 0 12px 32px rgba(17, 24, 39, 0.08);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink-900);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.10), transparent 34rem),
        linear-gradient(180deg, #fffaf5 0%, #ffffff 42%, #fffaf5 100%);
    font-family: Inter, 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;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #fff7ed, #f3f4f6);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.18rem;
    white-space: nowrap;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: white;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sunset-500), var(--twilight-500));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.site-nav {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.site-nav a,
.mobile-panel a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--ink-700);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-panel a:hover {
    color: var(--sunset-600);
    background: var(--sunset-50);
    transform: translateY(-1px);
}

.header-search {
    width: 290px;
    display: flex;
    align-items: center;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.big-search input,
.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--ink-900);
    background: transparent;
    font: inherit;
}

.header-search input {
    padding: 0 12px;
    font-size: 0.92rem;
}

.header-search button,
.big-search button,
.filter-toolbar button,
.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.big-search button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sunset-500), var(--twilight-500));
    box-shadow: 0 14px 26px rgba(249, 115, 22, 0.25);
}

.header-search button {
    min-width: 64px;
    height: 36px;
}

.primary-button,
.ghost-button {
    min-height: 48px;
    padding: 0 24px;
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(12px);
}

.header-search button:hover,
.big-search button:hover,
.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.filter-toolbar button:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--sunset-50);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--sunset-600);
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-track,
.hero-slide,
.hero-backdrop {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-backdrop {
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.74) 42%, rgba(17, 24, 39, 0.30) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.18) 52%, rgba(17, 24, 39, 0.45) 100%),
        var(--hero-image) center / cover no-repeat;
    transform: scale(1.04);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 340px;
    align-items: center;
    gap: 56px;
    padding: 82px 0 72px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--sunset-600);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.section-heading.light .eyebrow,
.detail-copy .eyebrow {
    color: #fed7aa;
}

.hero-copy h1 {
    max-width: 820px;
    margin: 16px 0 18px;
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-tags,
.tag-list,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.tag-list span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

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

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

.hero-poster {
    display: block;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-controls button {
    border: 0;
    color: #ffffff;
    cursor: pointer;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    font-size: 2rem;
    line-height: 1;
}

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

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

.hero-dots button.active {
    width: 32px;
    background: #ffffff;
}

.section-block {
    padding: 64px 0;
}

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

.section-heading h2,
.intro-copy h2,
.sub-hero h1,
.detail-copy h1 {
    margin: 6px 0 0;
    color: var(--ink-900);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading > a,
.text-link {
    color: var(--sunset-600);
    font-weight: 900;
}

.intro-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    align-items: center;
    gap: 30px;
}

.intro-copy p,
.sub-hero p,
.category-overview-body p,
.detail-one-line,
.detail-main p,
.movie-card-body p,
.rank-info p {
    color: var(--ink-500);
}

.big-search {
    display: flex;
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.big-search input {
    padding: 0 18px;
}

.big-search button {
    min-width: 124px;
    min-height: 48px;
}

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

.category-card,
.category-overview-card,
.movie-card,
.ranking-panel,
.detail-main,
.detail-side,
.filter-toolbar {
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.86);
    box-shadow: var(--shadow-card);
}

.category-card {
    position: relative;
    min-height: 220px;
    padding: 24px;
    overflow: hidden;
    border-radius: 28px;
}

.category-card strong {
    display: block;
    margin: 14px 0 8px;
    font-size: 1.3rem;
}

.category-card p {
    position: relative;
    z-index: 2;
    max-width: 210px;
    color: var(--ink-500);
    font-size: 0.95rem;
}

.category-count {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--sunset-600);
    background: var(--sunset-50);
    font-weight: 900;
    font-size: 0.78rem;
}

.category-card img {
    position: absolute;
    right: -18px;
    bottom: -32px;
    width: 120px;
    height: 160px;
    border-radius: 22px;
    transform: rotate(8deg);
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.18);
}

.feature-panel {
    width: min(1220px, calc(100% - 32px));
    padding: 46px 28px;
    border-radius: 34px;
    background: linear-gradient(135deg, var(--golden-50), var(--sunset-50) 50%, #faf5ff);
}

.section-heading.light h2 {
    color: var(--ink-900);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--sunset-50);
}

.poster-link img {
    transition: transform 0.3s ease;
}

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

.poster-badge,
.poster-score {
    position: absolute;
    z-index: 2;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.76rem;
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
    background: rgba(17, 24, 39, 0.52);
}

.poster-score {
    right: 12px;
    color: #111827;
    background: #fbbf24;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--ink-500);
    font-size: 0.82rem;
    font-weight: 800;
}

.movie-card h3,
.rank-info h3 {
    margin: 8px 0 8px;
    font-size: 1.06rem;
    line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
    color: var(--sunset-600);
}

.movie-card-body p,
.rank-info p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.92rem;
}

.tag-list span {
    color: var(--sunset-600);
    background: var(--sunset-50);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 28px;
}

.ranking-panel {
    align-self: start;
    padding: 22px;
    border-radius: 28px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 46px 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sunset-500), var(--twilight-500));
    font-weight: 900;
}

.rank-thumb {
    display: block;
    width: 74px;
    height: 98px;
    overflow: hidden;
    border-radius: 14px;
}

.rank-info h3 {
    margin-top: 0;
}

.rank-info p {
    min-height: auto;
    margin-bottom: 8px;
}

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

.sub-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(109, 40, 217, 0.76)),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.36), transparent 30rem);
}

.sub-hero h1,
.sub-hero p {
    color: #ffffff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

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

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 0.7fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
    padding: 16px;
    border-radius: 24px;
}

.filter-toolbar label {
    display: grid;
    gap: 6px;
    color: var(--ink-500);
    font-size: 0.82rem;
    font-weight: 900;
}

.filter-toolbar input,
.filter-toolbar select {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.filter-toolbar button {
    min-height: 44px;
    padding: 0 18px;
    color: var(--sunset-600);
    background: var(--sunset-50);
}

.filter-count {
    min-height: 24px;
    margin: 0 0 22px;
    color: var(--ink-500);
    font-weight: 800;
}

.category-overview-card {
    overflow: hidden;
    border-radius: 28px;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    height: 150px;
    background: var(--sunset-50);
}

.category-overview-body {
    padding: 22px;
}

.category-overview-body span {
    color: var(--sunset-600);
    font-weight: 900;
}

.category-overview-body h2 {
    margin: 8px 0;
    font-size: 1.35rem;
}

.detail-hero {
    padding: 74px 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.76), rgba(17, 24, 39, 0.36)),
        var(--detail-bg) center / cover no-repeat;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), transparent 44%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.36);
}

.detail-copy h1,
.detail-copy p {
    color: #ffffff;
}

.detail-copy h1 {
    margin-bottom: 16px;
}

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

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

.detail-tags span {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.48);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow-soft);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sunset-500), var(--twilight-500));
    box-shadow: 0 20px 45px rgba(249, 115, 22, 0.35);
    font-size: 2rem;
}

.play-overlay strong {
    font-size: 1.1rem;
}

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

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    color: #ffffff;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.82);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    padding: 18px 0 64px;
}

.detail-main,
.detail-side {
    padding: 28px;
    border-radius: 28px;
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.detail-main p {
    margin: 0 0 24px;
    font-size: 1.02rem;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.detail-side dt {
    color: var(--ink-500);
    font-weight: 900;
}

.detail-side dd {
    margin: 0;
}

.detail-side a {
    color: var(--sunset-600);
    font-weight: 900;
}

.site-footer {
    padding: 56px 0;
    color: #d1d5db;
    background: #111827;
}

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

.footer-logo {
    color: #ffffff;
}

.site-footer p {
    max-width: 420px;
    color: #9ca3af;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links.compact {
    flex-direction: row;
    flex-wrap: wrap;
}

.footer-links a {
    color: #d1d5db;
}

.footer-links a:hover {
    color: #ffffff;
}

.is-hidden {
    display: none !important;
}

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

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

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

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

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

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

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

    .hero-carousel,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding-top: 54px;
    }

    .hero-poster {
        width: min(260px, 72vw);
        margin: 0 auto;
        order: -1;
    }

    .intro-search,
    .detail-hero-inner,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .category-grid,
    .overview-grid,
    .movie-grid,
    .all-grid,
    .compact-grid,
    .full-rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .site-logo {
        font-size: 1rem;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .hero-copy h1 {
        font-size: 2.5rem;
    }

    .hero-actions,
    .big-search {
        flex-direction: column;
        align-items: stretch;
    }

    .category-grid,
    .overview-grid,
    .movie-grid,
    .all-grid,
    .compact-grid,
    .full-rank-list {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 42px 64px minmax(0, 1fr);
    }

    .rank-thumb {
        width: 64px;
        height: 86px;
    }
}
