:root {
    --orange: #ea580c;
    --orange-dark: #c2410c;
    --red: #dc2626;
    --cyan: #0891b2;
    --blue: #2563eb;
    --bg: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.25);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
    transform: scale(1.08);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 650;
}

.nav-link {
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffedd5;
    opacity: 1;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

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

.mobile-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 650;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #7c2d12, #991b1b);
}

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

.hero-slide {
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease;
}

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

.hero-overlay {
    display: flex;
    align-items: flex-end;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    padding-bottom: 72px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.hero-meta {
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #fff;
    background: var(--orange);
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.32);
}

.btn.primary:hover {
    background: var(--orange-dark);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.btn.ghost.dark {
    color: var(--orange);
    background: #fff7ed;
}

.hero-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 40px;
    line-height: 0;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 36px;
    background: #fff;
}

.section {
    padding: 56px 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.section-heading span {
    color: var(--orange);
    font-size: 28px;
}

.section-heading h2 {
    margin: 0;
    color: #1f2937;
    font-size: 32px;
    line-height: 1.2;
}

.section-heading a {
    margin-left: auto;
    color: var(--orange);
    font-weight: 800;
}

.section-heading.light h2,
.section-heading.light a,
.section-heading.light span {
    color: #fff;
}

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading.compact h2 {
    font-size: 24px;
}

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

.catalog-grid {
    padding: 30px 0 60px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 8px 24px 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);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img {
    transform: scale(1.08);
}

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.38);
    font-size: 44px;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.card-category,
.duration {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-category {
    padding: 5px 10px;
    color: var(--orange);
    background: #ffedd5;
}

.card-category.floating {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    background: var(--orange);
}

.duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.76);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a {
    transition: color 0.2s ease;
}

.card-body h3 a:hover {
    color: var(--orange);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    justify-content: space-between;
    color: #4b5563;
    font-size: 13px;
}

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

.movie-card-horizontal .poster-wrap {
    aspect-ratio: auto;
    height: 100%;
    min-height: 160px;
}

.feature-band {
    padding: 54px 0;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 280px;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

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

.category-tile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    height: 92px;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
}

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

.category-tile strong {
    font-size: 20px;
}

.category-tile span {
    color: var(--muted);
    font-size: 14px;
}

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

.vertical-list {
    display: grid;
    gap: 20px;
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.09);
}

.rank-list {
    display: grid;
    gap: 18px;
    padding-bottom: 60px;
}

.compact-list {
    padding-bottom: 0;
}

.rank-row {
    display: grid;
    grid-template-columns: 74px 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.compact-list .rank-row {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--line);
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.rank-poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #111827;
}

.compact-list .rank-poster {
    display: none;
}

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

.rank-info h3 {
    margin: 8px 0 6px;
    font-size: 20px;
}

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

.compact-list .rank-info p,
.compact-list .rank-info .card-category,
.compact-list .rank-meta span:nth-child(n+3) {
    display: none;
}

.rank-meta {
    color: #4b5563;
    font-size: 13px;
}

.page-main {
    padding-bottom: 34px;
}

.page-hero {
    padding: 44px 0 20px;
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--orange);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #374151;
    font-weight: 750;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

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

.movie-card[hidden],
.rank-row[hidden],
.empty-state[hidden] {
    display: none;
}

.category-preview-list {
    display: grid;
    gap: 28px;
    padding-bottom: 54px;
}

.category-preview {
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-preview > p {
    margin: -12px 0 22px;
    color: var(--muted);
}

.detail-top {
    padding-top: 34px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    padding: 26px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, #1f2937, #7c2d12 55%, #991b1b);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    background: #111827;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

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

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-info .lead {
    max-width: 760px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.detail-meta {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.88);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.tag-row span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.player-section {
    padding: 42px 0 20px;
}

.player-section h2,
.prose-section h2 {
    margin: 0 0 18px;
    color: #1f2937;
    font-size: 30px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #030712;
    box-shadow: var(--shadow);
}

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #030712;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(234, 88, 12, 0.24), rgba(0, 0, 0, 0.56));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 18px 35px rgba(234, 88, 12, 0.34);
    font-size: 34px;
}

.prose-section {
    padding: 32px;
    margin-top: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.prose-section p {
    margin: 0 0 24px;
    color: #374151;
    font-size: 17px;
}

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

.info-table div {
    padding: 14px;
    border-radius: 14px;
    background: #f9fafb;
}

.info-table span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.info-table strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.site-footer {
    margin-top: 34px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 50px 0;
}

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

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 17px;
}

.site-footer p {
    margin: 14px 0 0;
    color: #cbd5e1;
    font-size: 14px;
}

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

.site-footer a:hover {
    color: #fdba74;
}

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

@media (max-width: 1024px) {
    .desktop-nav {
        gap: 16px;
        font-size: 14px;
    }

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

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

    .ranking-panel {
        position: static;
    }

    .detail-poster {
        max-width: 420px;
    }
}

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

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 82px;
    }

    .hero-nav {
        width: 42px;
        height: 42px;
        font-size: 32px;
    }

    .hero-prev {
        left: 12px;
    }

    .hero-next {
        right: 12px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 54px 96px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-info p,
    .rank-meta span:nth-child(n+4) {
        display: none;
    }

    .rank-info h3 {
        font-size: 16px;
    }

    .detail-hero {
        padding: 18px;
    }

    .detail-poster {
        max-width: none;
    }

    .prose-section {
        padding: 22px;
    }
}
