:root {
    --red: #dc2626;
    --red-dark: #991b1b;
    --red-soft: #fee2e2;
    --yellow: #f59e0b;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f8fafc;
    --night: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff 0%, #fff7f7 46%, #f8fafc 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(220, 38, 38, 0.12);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.nav-shell {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

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

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.28);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.desktop-nav a {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--red);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.header-search input,
.inline-search input,
.filter-bar input,
.filter-bar select,
.mobile-panel input {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 14px;
}

.header-search button,
.inline-search button,
.mobile-panel button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 700;
}

.header-search input:focus,
.inline-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.mobile-panel input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    font-size: 26px;
    color: var(--ink);
    cursor: pointer;
}

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

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

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-panel a {
    padding: 10px 0;
    color: #374151;
    font-weight: 700;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.mobile-panel input {
    min-width: 0;
    flex: 1;
    padding: 11px 14px;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #fff;
    background: var(--night);
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1);
    transform: scale(1.04);
}

.hero-overlay,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 22%, rgba(220, 38, 38, 0.55), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.82) 42%, rgba(15, 23, 42, 0.35) 100%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.92));
}

.hero-content {
    position: relative;
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 58px;
    padding: 88px 0 72px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0;
    font-size: clamp(36px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 0 0 16px;
    color: #fecaca;
    font-size: clamp(26px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 750;
}

.hero-tags span {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 13px;
    backdrop-filter: blur(10px);
}

.tag-row span {
    color: var(--red-dark);
    background: var(--red-soft);
    padding: 6px 10px;
}

.hero-actions,
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

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

.primary-btn,
.secondary-btn {
    min-height: 48px;
    padding: 0 22px;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 16px 30px rgba(220, 38, 38, 0.34);
}

.secondary-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

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

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    border-radius: 999px;
    padding: 9px 14px;
    color: #fff;
    background: rgba(220, 38, 38, 0.9);
    font-weight: 800;
}

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

.hero-controls button {
    width: 38px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-controls button.is-active {
    background: #fff;
}

.search-panel,
.section-block,
.split-section,
.category-overview-grid,
.detail-content,
.player-section {
    margin-top: 36px;
}

.search-panel {
    position: relative;
    z-index: 10;
    margin-top: -46px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    align-items: center;
    gap: 24px;
    border-radius: var(--radius);
    padding: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.feature-copy h2,
.detail-article h2,
.detail-side h2 {
    margin: 6px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.inline-search {
    display: flex;
    gap: 10px;
}

.inline-search input {
    min-width: 0;
    flex: 1;
    padding: 14px 18px;
}

.section-block {
    border-radius: var(--radius);
    padding: 28px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 14px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.82);
}

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

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background: var(--night);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.92));
}

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

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

.category-tile span,
.category-tile small {
    position: absolute;
    left: 16px;
    right: 16px;
    z-index: 1;
}

.category-tile span {
    bottom: 56px;
    font-size: 20px;
    font-weight: 850;
}

.category-tile small {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.45;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 24px;
}

.hot-board,
.feature-copy {
    margin-top: 0;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 44px 52px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover,
.movie-card:hover,
.ranking-card:hover,
.compact-card:hover,
.category-overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
}

.rank-row strong {
    color: var(--red);
    font-size: 18px;
}

.rank-row img {
    width: 52px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
}

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

.rank-row em {
    color: var(--muted);
    font-style: normal;
    text-align: right;
}

.feature-copy {
    color: #fff;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #991b1b, #111827);
}

.feature-copy .section-kicker {
    color: #fecaca;
}

.feature-copy p {
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
}

.mini-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.mini-link-grid a {
    border-radius: 16px;
    padding: 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.84);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    font-size: 12px;
    font-weight: 850;
}

.movie-info {
    padding: 14px;
}

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta-line a {
    color: var(--red);
    font-weight: 800;
}

.movie-info h3 {
    margin: 9px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--night);
}

.page-hero {
    padding: 82px 0 64px;
}

.small-hero {
    padding: 64px 0 52px;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 12%, rgba(220, 38, 38, 0.48), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(127, 29, 29, 0.86));
}

.page-hero .container {
    position: relative;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 700;
}

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

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

.filter-bar input {
    min-width: 0;
    flex: 1;
    padding: 14px 16px;
}

.filter-bar select {
    width: 170px;
    padding: 14px 16px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    border-radius: var(--radius);
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overview-posters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.overview-posters img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 8px 0;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.75;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.ranking-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.ranking-poster strong {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 1;
    border-radius: 999px;
    padding: 6px 9px;
    color: #fff;
    background: rgba(220, 38, 38, 0.94);
}

.ranking-info span {
    color: var(--red);
    font-weight: 800;
    font-size: 13px;
}

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

.ranking-info p {
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    min-height: 560px;
}

.detail-hero-inner {
    position: relative;
    padding: 56px 0 70px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 65px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-copy h1 {
    max-width: 860px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}

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

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.72));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 18px 35px rgba(220, 38, 38, 0.45);
    font-size: 34px;
}

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

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

.detail-article,
.detail-side {
    border-radius: var(--radius);
    padding: 28px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 16px;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card img {
    grid-row: span 2;
    width: 72px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card span {
    min-width: 0;
    overflow: hidden;
    font-weight: 850;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-card small {
    color: var(--muted);
}

.site-footer {
    margin-top: 54px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 42px;
    padding: 48px 0;
}

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

.site-footer p {
    max-width: 460px;
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 16px;
    color: #fff;
}

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

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

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

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

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero-content,
    .search-panel,
    .split-section,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .nav-shell {
        height: 62px;
    }

    .brand {
        font-size: 19px;
    }

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

    .hero-content {
        padding: 60px 0 84px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(32px, 11vw, 48px);
    }

    .section-block,
    .search-panel,
    .detail-article,
    .detail-side {
        padding: 20px;
    }

    .section-heading,
    .filter-bar,
    .inline-search,
    .hero-actions,
    .page-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar select {
        width: 100%;
    }

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

    .category-overview-card,
    .detail-layout,
    .ranking-card {
        grid-template-columns: 1fr;
    }

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

    .detail-cover {
        width: min(280px, 78vw);
    }

    .detail-layout {
        gap: 24px;
    }

    .ranking-poster {
        max-width: 180px;
    }
}

@media (max-width: 460px) {
    .category-grid,
    .movie-grid,
    .all-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-row {
        grid-template-columns: 36px 48px minmax(0, 1fr);
    }

    .rank-row em {
        display: none;
    }
}
