:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --brand: #ef4444;
    --brand-strong: #f97316;
    --brand-soft: rgba(239, 68, 68, 0.14);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

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: 50;
    background: linear-gradient(90deg, #0f172a, #1e293b 48%, #0f172a);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}

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

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, #fca5a5, #fdba74);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
    color: #e5e7eb;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fb7185;
}

.search-form {
    display: flex;
    align-items: center;
    min-width: 240px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.search-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 11px 14px;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.64);
}

.search-form button,
.primary-btn,
.ghost-btn,
.panel-more,
.text-link {
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

.search-form button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    padding: 11px 16px;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-brand {
    color: #fdba74;
    font-weight: 800;
    margin-bottom: 12px;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(239, 68, 68, 0.42), transparent 28%),
        radial-gradient(circle at 82% 28%, rgba(249, 115, 22, 0.32), transparent 30%),
        linear-gradient(135deg, #020617, #111827 50%, #1e293b);
}

.hero-track {
    position: relative;
    z-index: 1;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 0.95fr 1.15fr;
    gap: 48px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 90px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.36)), var(--hero-image);
    background-position: center;
    background-size: cover;
    filter: blur(26px);
    opacity: 0.28;
    transform: scale(1.08);
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hero-media,
.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-media img {
    width: min(430px, 100%);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.eyebrow,
.section-heading p,
.panel-title p,
.category-card-large p:first-child,
.inner-hero > p:first-child,
.ranking-panel .panel-title p {
    margin: 0 0 8px;
    color: #fb7185;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 700px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 5px 10px;
    font-size: 12px;
}

.tag-row span {
    background: #f1f5f9;
    color: #475569;
}

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

.primary-btn,
.ghost-btn,
.panel-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 14px 32px rgba(239, 68, 68, 0.34);
}

.ghost-btn {
    min-height: 46px;
    padding: 0 20px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.panel-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

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

.hero-controls > button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 26px;
}

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

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

.hero-dot.is-active {
    width: 28px;
    background: #ffffff;
}

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

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

.section-heading h2,
.panel-title h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-heading a,
.text-link {
    color: var(--brand);
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 20px;
    color: #ffffff;
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.86)), var(--tile-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: #e2e8f0;
    font-size: 13px;
}

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

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

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e2e8f0;
}

.poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
}

.card-meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

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

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

.movie-card p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.ranking-panel,
.side-card,
.player-card,
.content-block,
.category-card-large {
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.ranking-panel {
    position: sticky;
    top: 98px;
    padding: 22px;
}

.rank-list,
.compact-ranks {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.rank-no {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    font-weight: 900;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-year {
    color: var(--muted);
    font-size: 13px;
}

.panel-more {
    width: 100%;
    margin-top: 18px;
    min-height: 42px;
    color: #ffffff;
    background: var(--dark);
}

.inner-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.inner-hero {
    padding: 86px max(16px, calc((100% - 1180px) / 2)) 68px;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.68)), var(--inner-image);
    background-size: cover;
    background-position: center;
}

.soft-hero {
    background:
        radial-gradient(circle at 20% 24%, rgba(239, 68, 68, 0.34), transparent 25%),
        radial-gradient(circle at 78% 30%, rgba(249, 115, 22, 0.28), transparent 26%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

.inner-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.inner-hero p:not(:first-child) {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: #dbeafe;
    font-size: 14px;
}

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

.filter-bar {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.large-search input {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    outline: 0;
    padding: 0 16px;
}

.filter-bar input {
    flex: 1;
}

.empty-state {
    display: none;
    padding: 30px;
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--muted);
    text-align: center;
}

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

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

.category-card-large {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: hidden;
    border-radius: 16px;
    background: #e2e8f0;
}

.category-cover img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.category-card-large h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card-large p {
    color: var(--muted);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 86px 54px minmax(0, 1fr) 96px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.ranking-cover img {
    width: 86px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-number {
    color: #ef4444;
    font-size: 28px;
    font-weight: 900;
}

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.ranking-info p {
    margin: 0 0 8px;
    color: var(--muted);
}

.heat-score {
    color: var(--brand);
    font-weight: 900;
    text-align: right;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 78px max(16px, calc((100% - 1180px) / 2));
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.62)), var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: blur(22px);
    opacity: 0.5;
    transform: scale(1.08);
}

.detail-poster,
.detail-copy {
    position: relative;
    z-index: 1;
}

.detail-poster img {
    width: 100%;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.detail-copy h1 {
    margin: 10px 0 12px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.detail-copy p:not(.eyebrow) {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

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

.player-card {
    overflow: hidden;
    padding: 14px;
    background: #0f172a;
}

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

.movie-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.62));
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 16px 38px rgba(239, 68, 68, 0.35);
    font-size: 30px;
}

.content-block {
    margin-top: 22px;
    padding: 24px;
}

.content-block h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-block p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

.detail-side {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 18px;
}

.side-card {
    padding: 22px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    font-weight: 700;
}

.large-search {
    display: flex;
    max-width: 760px;
    margin: 0 auto 28px;
    background: transparent;
    border: 0;
    overflow: visible;
}

.large-search input {
    flex: 1;
    border-radius: 999px 0 0 999px;
}

.large-search button {
    min-width: 110px;
    border-radius: 0 999px 999px 0;
}

.site-footer {
    margin-top: 30px;
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-grid h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 17px;
}

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

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: #fb7185;
}

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

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

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

    .nav-toggle {
        display: block;
    }

    .mobile-nav.is-open {
        display: block;
    }

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

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

@media (max-width: 860px) {
    .header-inner {
        height: 68px;
    }

    .header-inner > .search-form {
        display: none;
    }

    .hero-carousel,
    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 38px;
        text-align: center;
    }

    .hero-media img {
        width: min(260px, 70vw);
        margin: 0 auto;
    }

    .hero-actions,
    .hero-tags {
        justify-content: center;
    }

    .split-layout,
    .detail-layout,
    .detail-hero,
    .footer-grid,
    .category-list-large {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .detail-side {
        position: static;
    }

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

    .ranking-row {
        grid-template-columns: 74px 44px minmax(0, 1fr);
    }

    .ranking-cover img {
        width: 74px;
        height: 100px;
    }

    .heat-score {
        grid-column: 3;
        text-align: left;
    }

    .category-card-large {
        grid-template-columns: 1fr;
    }
}

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

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

    .filter-bar {
        flex-direction: column;
    }

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

    .detail-hero,
    .inner-hero {
        padding-top: 54px;
        padding-bottom: 48px;
    }

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

    .rank-year {
        display: none;
    }
}
