:root {
    --brand-red: #dc2626;
    --brand-orange: #f97316;
    --brand-yellow: #f59e0b;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

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

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: var(--brand-red);
    background: #fff;
    font-size: 15px;
}

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

.main-nav a,
.mobile-nav a {
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    opacity: 1;
    transform: translateY(-1px);
}

.site-search {
    position: relative;
    margin-left: auto;
    width: min(320px, 32vw);
}

.site-search input,
.filter-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.search-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: none;
    width: min(440px, 92vw);
    max-height: 520px;
    overflow: auto;
    border-radius: 18px;
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow);
    padding: 10px;
}

.search-panel.is-open {
    display: block;
}

.search-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.search-item:hover {
    background: #fff7ed;
}

.search-item img {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
}

.search-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--dark);
}

.search-item span,
.search-empty {
    color: var(--muted);
    font-size: 13px;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

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

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

.mobile-nav a {
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.12);
}

main {
    min-height: 68vh;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 100px max(24px, calc((100vw - 1180px) / 2)) 84px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    max-width: 780px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    border-radius: 999px;
    padding: 7px 14px;
    color: #fff;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.hero-title,
.page-hero h1,
.detail-intro h1 {
    margin: 0 0 16px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h1 {
    font-size: clamp(36px, 7vw, 72px);
}

.hero-title {
    font-size: clamp(30px, 4.5vw, 50px);
}

.hero p,
.page-hero p,
.detail-intro .lead {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

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

.hero-actions,
.section-heading,
.filter-buttons,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

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

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

.btn.primary {
    color: #fff;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.34);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    font-size: 35px;
    line-height: 1;
    cursor: pointer;
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

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

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

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

.section.color-strip {
    width: 100%;
    max-width: none;
    padding: 52px max(16px, calc((100vw - 1180px) / 2));
    background: linear-gradient(90deg, #2563eb, #0891b2);
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 0;
    color: var(--dark);
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading > a {
    color: var(--brand-orange);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 26px 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);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7c2d12);
}

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.55));
}

.movie-badge,
.movie-duration,
.rank-mark,
.movie-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-badge {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    background: var(--brand-orange);
}

.movie-duration {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-mark {
    left: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #facc15, var(--brand-red));
}

.movie-play {
    left: 50%;
    top: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card-body h3 {
    margin: 0 0 8px;
    color: var(--dark);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
}

.movie-card-body p,
.rank-row p,
.content-card p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-card-body p {
    min-height: 52px;
    margin: 0 0 14px;
    font-size: 14px;
}

.movie-meta {
    color: var(--muted);
    font-size: 13px;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 1fr);
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

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

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 28px;
    color: #fff;
    background: #111827;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.1));
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
}

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

.category-tile p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.65;
}

.page-hero {
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, #ea580c, #991b1b);
    overflow: hidden;
}

.page-hero.compact {
    padding: 80px max(24px, calc((100vw - 1180px) / 2));
}

.page-hero.compact::before {
    content: "";
    position: absolute;
    inset: -20% 45% auto -10%;
    height: 280px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    filter: blur(12px);
}

.page-hero > div {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.filter-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 26px;
    border-radius: var(--radius);
    padding: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel input {
    border: 1px solid var(--line);
    background: #fff;
}

.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    color: var(--ink);
    background: #f3f4f6;
    cursor: pointer;
    font-weight: 800;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
}

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

.rank-row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    border-radius: var(--radius);
    padding: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    background: #111827;
}

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

.rank-cover strong {
    position: absolute;
    left: 10px;
    top: 10px;
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
}

.rank-title {
    display: inline-block;
    margin: 6px 0 8px;
    color: var(--dark);
    font-size: 22px;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: var(--dark);
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px);
    transform: scale(1.04);
    opacity: 0.62;
}

.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.64), rgba(17, 24, 39, 0.88));
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
    aspect-ratio: 3 / 4;
    background: #111827;
}

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

.breadcrumb {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.76);
}

.detail-intro h1 {
    font-size: clamp(36px, 6vw, 66px);
}

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

.detail-meta span,
.tag-list span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.tag-list {
    margin-bottom: 26px;
}

.player-section {
    padding-top: 46px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.18), rgba(0, 0, 0, 0.36));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.38);
    font-size: 32px;
}

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

.article-section {
    padding-top: 0;
}

.content-card {
    border-radius: 24px;
    padding: clamp(22px, 4vw, 40px);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
    margin: 28px 0 12px;
    color: var(--dark);
    font-size: 26px;
    font-weight: 900;
}

.content-card h2:first-child {
    margin-top: 0;
}

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

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

.info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

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

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

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

.site-footer p {
    margin: 0;
    line-height: 1.75;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .site-search {
        width: min(420px, 50vw);
    }

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

    .category-grid.large,
    .footer-grid,
    .detail-wrap {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 0;
    }

    .logo {
        font-size: 22px;
    }

    .site-search {
        order: 3;
        width: 100%;
    }

    .hero {
        min-height: 660px;
    }

    .hero-shade {
        padding: 110px 18px 82px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-actions .btn {
        width: 100%;
    }

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

    .rank-row {
        grid-template-columns: 1fr;
    }

    .detail-wrap {
        padding: 46px 0;
    }

    .info-list {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 40px 0;
    }
}
