:root {
    --bg: #fff7ed;
    --bg-soft: #fff1e6;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(15, 23, 42, 0.08);
    --brand: #dc2626;
    --brand-dark: #7f1d1d;
    --orange: #ea580c;
    --gold: #facc15;
    --panel: rgba(255, 255, 255, 0.86);
    --shadow: 0 24px 70px rgba(127, 29, 29, 0.18);
    --radius: 26px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(254, 240, 138, 0.55), transparent 34rem),
        radial-gradient(circle at top right, rgba(248, 113, 113, 0.28), transparent 32rem),
        linear-gradient(135deg, #f8fafc 0%, #fff7ed 46%, #f1f5f9 100%);
}

body.menu-open {
    overflow: hidden;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(127, 29, 29, 0.84);
    color: #ffffff;
    backdrop-filter: blur(20px);
    box-shadow: 0 16px 40px rgba(127, 29, 29, 0.2);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #7f1d1d;
    background: linear-gradient(135deg, #fde68a, #ffffff 45%, #fca5a5);
    box-shadow: 0 14px 30px rgba(250, 204, 21, 0.22);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #7f1d1d;
    background: #ffffff;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(127, 29, 29, 0.92);
}

main,
.page-main,
.detail-main {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    margin-top: 28px;
    overflow: hidden;
    border-radius: 34px;
    color: #ffffff;
    background:
        linear-gradient(120deg, rgba(127, 29, 29, 0.98), rgba(124, 45, 18, 0.94) 48%, rgba(153, 27, 27, 0.96)),
        repeating-radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px);
    box-shadow: var(--shadow);
}

.hero-glow {
    position: absolute;
    inset: auto -160px -180px auto;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: rgba(250, 204, 21, 0.2);
    filter: blur(8px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
    gap: 48px;
    padding: clamp(32px, 7vw, 78px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(32px) scale(0.98);
    transition: opacity 520ms ease, transform 520ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
}

.hero-copy h1 {
    margin: 18px 0 22px;
    max-width: 780px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.08em;
    background: linear-gradient(90deg, #fde68a, #ffffff 45%, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.8;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #facc15;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border: 1px solid rgba(220, 38, 38, 0.12);
    border-radius: 999px;
    color: #991b1b;
    background: rgba(254, 226, 226, 0.8);
    font-size: 12px;
    font-weight: 800;
}

.hero-carousel .tag {
    color: #fff7ed;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
}

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

.primary-button,
.secondary-button,
.line-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
    color: #7f1d1d;
    background: linear-gradient(135deg, #fef3c7, #ffffff 48%, #fecaca);
    box-shadow: 0 18px 40px rgba(250, 204, 21, 0.18);
}

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

.line-button {
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.18);
    background: rgba(255, 255, 255, 0.7);
}

.primary-button:hover,
.secondary-button:hover,
.line-button:hover {
    transform: translateY(-2px);
}

.hero-art {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 12px solid rgba(255, 255, 255, 0.12);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.18);
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.34);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.42));
}

.hero-dots {
    position: absolute;
    left: clamp(32px, 7vw, 78px);
    bottom: 34px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
    transition: width 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
    width: 36px;
    background: #facc15;
}

.quick-search {
    width: min(1040px, calc(100% - 24px));
    margin: -34px auto 38px;
    position: relative;
    z-index: 3;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 60px rgba(127, 29, 29, 0.14);
    backdrop-filter: blur(18px);
}

.quick-search form,
.filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.quick-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(127, 29, 29, 0.12);
    border-radius: 18px;
    padding: 0 16px;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.quick-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: rgba(220, 38, 38, 0.42);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.quick-search button {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--orange));
    font-weight: 900;
    cursor: pointer;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-links a {
    padding: 8px 13px;
    border-radius: 999px;
    color: #7f1d1d;
    background: #fff7ed;
    font-weight: 800;
    font-size: 13px;
}

.content-section,
.page-hero,
.detail-content,
.player-section {
    margin: 38px 0;
}

.content-section {
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 55px rgba(127, 29, 29, 0.08);
}

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

.section-title-row h2,
.filter-head h2,
.ranking-head h2,
.article-panel h2,
.category-overview-title h2 {
    margin: 6px 0 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-title-row a {
    color: #991b1b;
    font-weight: 900;
}

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

.library-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(127, 29, 29, 0.08);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(127, 29, 29, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(220, 38, 38, 0.2);
    box-shadow: 0 26px 70px rgba(127, 29, 29, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #7f1d1d, #ea580c);
}

.movie-poster img {
    transition: transform 260ms ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.55));
    opacity: 0.7;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #991b1b;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 180ms ease, transform 180ms ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #7f1d1d;
    background: #facc15;
    font-weight: 950;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h3 a:hover {
    color: var(--brand);
}

.movie-meta,
.movie-line {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-line {
    min-height: 40px;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(127, 29, 29, 0.1);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 237, 0.9)),
        radial-gradient(circle at top right, rgba(248, 113, 113, 0.2), transparent 16rem);
    box-shadow: 0 16px 42px rgba(127, 29, 29, 0.08);
    transition: transform 180ms ease, border-color 180ms ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(220, 38, 38, 0.22);
}

.category-tile strong {
    display: block;
    color: #111827;
    font-size: 22px;
    font-weight: 950;
}

.category-tile p,
.category-overview-title p,
.ranking-head p,
.filter-head p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.category-samples span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #991b1b;
    background: rgba(254, 226, 226, 0.82);
    font-size: 12px;
    font-weight: 800;
}

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

.ranking-panel,
.article-panel,
.filter-panel {
    padding: 24px;
    border: 1px solid rgba(127, 29, 29, 0.1);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 48px rgba(127, 29, 29, 0.08);
}

.sticky-panel {
    position: sticky;
    top: 96px;
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #fff7ed;
    transition: transform 180ms ease, background 180ms ease;
}

.compact-card:hover {
    transform: translateX(4px);
    background: #fee2e2;
}

.compact-card img {
    width: 58px;
    height: 76px;
    border-radius: 14px;
}

.compact-card strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

.compact-card small {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-card > span {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #7f1d1d;
    background: #facc15;
    font-weight: 950;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 7vw, 72px);
    border-radius: 32px;
    color: #ffffff;
    background:
        linear-gradient(120deg, rgba(127, 29, 29, 0.98), rgba(154, 52, 18, 0.92)),
        repeating-radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 20px);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 840px;
    margin: 12px 0 16px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.small-hero {
    min-height: 280px;
}

.filter-panel {
    margin-bottom: 24px;
}

.filter-controls {
    grid-template-columns: minmax(0, 1fr) 170px 170px;
    margin-top: 18px;
}

.inline-filter {
    margin-bottom: 22px;
}

.empty-state {
    display: none;
    margin: 16px 0 0;
    padding: 16px;
    border-radius: 18px;
    color: #991b1b;
    background: #fee2e2;
    font-weight: 800;
}

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

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

.detail-main {
    width: 100%;
    margin: 0;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(6px);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(127, 29, 29, 0.82) 52%, rgba(17, 24, 39, 0.9));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 54px 0;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.68);
    font-weight: 800;
}

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

.detail-copy h1 {
    margin: 14px 0 14px;
    max-width: 900px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.07em;
}

.detail-one-line {
    max-width: 840px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
    line-height: 1.75;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

.player-section,
.detail-content,
.detail-main > .content-section {
    width: min(1220px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.video-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.28);
    aspect-ratio: 16 / 9;
}

.video-box video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #7f1d1d;
    background: #ffffff;
    font-size: 34px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}

.play-overlay strong {
    margin-top: 110px;
    font-size: 20px;
}

.play-overlay.is-hidden {
    display: none;
}

.article-panel p {
    color: #374151;
    font-size: 17px;
    line-height: 1.95;
}

.detail-side {
    position: sticky;
    top: 96px;
}

.site-footer {
    margin-top: 64px;
    color: #ffffff;
    background: linear-gradient(135deg, #7f1d1d, #991b1b 54%, #7c2d12);
}

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 34px;
    padding: 42px 0;
}

.site-footer strong {
    font-size: 24px;
    font-weight: 950;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.74);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

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

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

    .mobile-menu-button {
        display: grid;
        place-items: center;
    }

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-art {
        max-width: 280px;
        justify-self: center;
    }

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

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

    .filter-controls,
    .quick-search form {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .header-inner,
    main,
    .page-main,
    .player-section,
    .detail-content,
    .detail-main > .content-section,
    .detail-hero-inner,
    .footer-inner {
        width: min(100% - 22px, 1220px);
    }

    .brand {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 780px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 28px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-dots {
        left: 28px;
        bottom: 24px;
    }

    .quick-search {
        width: calc(100% - 22px);
    }

    .content-section,
    .ranking-panel,
    .article-panel,
    .filter-panel,
    .page-hero {
        border-radius: 22px;
        padding: 20px;
    }

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

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

    .movie-line,
    .tag-row {
        display: none;
    }

    .compact-card {
        grid-template-columns: 50px minmax(0, 1fr) auto;
    }

    .compact-card img {
        width: 50px;
        height: 66px;
    }
}
