:root {
    --red: #dc2626;
    --red-dark: #991b1b;
    --orange: #ea580c;
    --yellow: #facc15;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fff7ed;
    --bg: #f9fafb;
    --card: #ffffff;
    --shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.page {
    min-height: 100vh;
    overflow-x: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-weight: 650;
    font-size: 15px;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--red);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
}

.hero {
    position: relative;
    min-height: 720px;
    background: radial-gradient(circle at 12% 20%, rgba(250, 204, 21, 0.32), transparent 26%), linear-gradient(135deg, #991b1b 0%, #dc2626 45%, #f97316 100%);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -22% 42%;
    height: 380px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    filter: blur(50px);
}

.hero-slider {
    position: relative;
    z-index: 1;
    min-height: 720px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.24;
    filter: blur(2px) saturate(1.2);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.92), rgba(220, 38, 38, 0.72), rgba(249, 115, 22, 0.62));
}

.hero-content {
    position: relative;
    max-width: 1280px;
    min-height: 720px;
    margin: 0 auto;
    padding: 72px 24px 96px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 420px;
    align-items: center;
    gap: 56px;
}

.hero-copy {
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    margin-bottom: 22px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    font-weight: 750;
    font-size: 14px;
}

.eyebrow.dark {
    color: var(--red);
    background: #fee2e2;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h1 span {
    display: block;
    margin-top: 14px;
    color: #fde68a;
    font-size: clamp(28px, 4vw, 48px);
}

.hero p {
    max-width: 720px;
    margin: 28px 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 20px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.tag-row span {
    color: var(--red-dark);
    background: #fee2e2;
}

.tag-row.large span {
    min-height: 34px;
    padding: 7px 12px;
}

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

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

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

.btn.primary {
    color: var(--red);
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(255, 255, 255, 0.28);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn.full {
    width: 100%;
    margin-top: 12px;
}

.btn.dark-text {
    color: var(--red);
    border-color: #fecaca;
    background: #fff7ed;
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 900;
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #ffffff;
}

.search-panel {
    max-width: 1180px;
    margin: -36px auto 36px;
    padding: 20px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 460px);
    gap: 18px;
    align-items: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.search-panel strong {
    display: block;
    font-size: 19px;
}

.search-panel span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.search-panel input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: #f9fafb;
}

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

.sticky-search {
    position: sticky;
    top: 86px;
}

.section-shell,
.split-section {
    max-width: 1280px;
    margin: 0 auto 56px;
    padding: 0 24px;
}

.section-shell.warm {
    max-width: none;
    padding-top: 56px;
    padding-bottom: 56px;
    background: linear-gradient(135deg, #fff7ed, #fee2e2);
}

.section-shell.warm > .section-heading,
.section-shell.warm > .category-grid {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.section-shell.no-margin {
    margin: 0;
    padding: 0;
}

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

.section-heading h2 {
    margin: 0 0 6px;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-heading a {
    color: var(--red);
    font-weight: 850;
}

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

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

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

.movie-card {
    min-width: 0;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.9);
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.72), transparent);
}

.poster-link > span:not(.poster-glow),
.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-size: 12px;
    font-weight: 850;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
}

.movie-title:hover {
    color: var(--red);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
}

.movie-card p {
    display: -webkit-box;
    min-height: 60px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #4b5563;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.65;
    font-size: 13px;
}

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

.category-card {
    min-height: 168px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 20px 50px rgba(220, 38, 38, 0.18);
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

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

.category-card strong {
    font-size: 42px;
    letter-spacing: -0.06em;
}

.category-card em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.6;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.split-section.reverse {
    grid-template-columns: 360px minmax(0, 1fr);
}

.rank-panel,
.side-card {
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
}

.rank-panel.highlight {
    background: linear-gradient(180deg, #ffffff, #fff7ed);
}

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

.mini-card {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.mini-card:hover {
    background: #fff7ed;
}

.mini-card img {
    width: 76px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.mini-card strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    line-height: 1.45;
}

.mini-card em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.mini-rank {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--red);
    font-size: 12px;
    font-weight: 900;
}

.page-hero {
    max-width: 1280px;
    margin: 0 auto 42px;
    padding: 72px 24px 0;
}

.page-hero > div {
    min-height: 260px;
    padding: 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 34px;
    background: radial-gradient(circle at 80% 20%, rgba(250, 204, 21, 0.36), transparent 24%), linear-gradient(135deg, #fff7ed, #fee2e2);
}

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

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.8;
}

.detail-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

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

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

.player-card,
.detail-card {
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
    overflow: hidden;
}

.player-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111827;
    cursor: pointer;
}

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

.player-start {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.24));
}

.player-start span {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 20px 50px rgba(220, 38, 38, 0.35);
    font-size: 30px;
}

.player-start strong {
    font-size: 18px;
}

.player-shell.is-playing {
    cursor: default;
}

.player-shell.is-playing .player-start {
    display: none;
}

.detail-card {
    margin-top: 22px;
    padding: 26px;
}

.detail-head {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.detail-head img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.detail-head h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.05em;
}

.detail-head p {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.8;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0;
}

.info-grid div {
    padding: 16px;
    border-radius: 18px;
    background: #f9fafb;
    border: 1px solid var(--line);
}

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

.info-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 16px;
}

.story-content h2,
.side-card h2 {
    margin: 22px 0 10px;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.story-content p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 18px;
    position: sticky;
    top: 96px;
}

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 220px minmax(0, 1fr);
    gap: 34px;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    max-width: 520px;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

.footer-category-links {
    columns: 2;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 14px;
}

@media (max-width: 1120px) {
    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .hero-poster,
    .detail-side {
        position: relative;
        top: auto;
    }

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

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 12px;
        border-radius: 12px;
    }

    .nav-links a:hover {
        background: #fff7ed;
    }

    .hero,
    .hero-slider,
    .hero-content {
        min-height: 760px;
    }

    .hero-content {
        padding-top: 46px;
        gap: 32px;
    }

    .search-panel,
    .detail-head,
    .info-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .search-panel {
        margin-left: 16px;
        margin-right: 16px;
    }

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

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

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

    .detail-head img {
        max-width: 220px;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .section-shell,
    .split-section,
    .detail-layout,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand {
        font-size: 17px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p,
    .page-hero p {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .page-hero > div {
        padding: 30px 22px;
        border-radius: 24px;
    }

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