:root {
    --bg: #f7f8fb;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f3f4f6;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --pink: #db2777;
    --shadow: 0 22px 70px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f9fafb 0%, #eef2f7 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    max-width: 1240px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.26);
    transition: transform 0.2s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08);
}

.brand-copy {
    display: grid;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--red);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(330px, 28vw);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft);
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.header-search button,
.mobile-search button,
.home-search-band button {
    border: 0;
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.22);
}

.header-search button {
    padding: 8px 14px;
    white-space: nowrap;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--soft);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: #374151;
}

.mobile-panel {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: var(--soft);
}

.mobile-search button {
    padding: 8px 16px;
    border: 0;
}

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

.mobile-panel nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #374151;
    font-weight: 700;
    background: #fff;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

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

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.8s ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at 30% 30%, rgba(220, 38, 38, 0.35), transparent 45%), #111827;
}

.hero-slide img.is-missing {
    opacity: 0;
}

.hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px 76px;
}

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

.hero-badges span,
.detail-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-badges span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-badges span:first-child {
    background: var(--red);
}

.hero-content h1 {
    max-width: 780px;
    margin: 18px 0 14px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.05em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}

.hero-one-line {
    max-width: 720px;
    margin: 0 0 10px;
    color: #f3f4f6;
    font-size: 20px;
    font-weight: 700;
}

.hero-summary {
    max-width: 720px;
    margin: 0 0 28px;
    color: #d1d5db;
    font-size: 16px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

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

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

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 44px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.home-search-band {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    max-width: 1180px;
    margin: -44px auto 26px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 5;
}

.home-search-band h2 {
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.home-search-band p {
    margin: 0;
    color: var(--muted);
}

.home-search-band form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 18px;
    background: var(--soft);
}

.home-search-band input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 0 10px;
    background: transparent;
}

.home-search-band button {
    padding: 12px 18px;
    border: 0;
    white-space: nowrap;
}

.content-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 24px;
}

.section-panel {
    max-width: 1192px;
    margin-top: 20px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

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

.section-heading span,
.eyebrow,
.page-hero-copy span {
    color: var(--red);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-content h1 {
    margin: 4px 0 0;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

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

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

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

.movie-card {
    min-width: 0;
    transition: transform 0.25s ease;
}

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

.poster-link {
    display: block;
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 20%, rgba(220, 38, 38, 0.35), transparent 35%), linear-gradient(135deg, #111827, #374151);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.poster-img.is-missing {
    opacity: 0;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 55%);
    opacity: 0.84;
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 18px 38px rgba(220, 38, 38, 0.28);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-meta,
.rank-mark {
    position: absolute;
    z-index: 2;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.poster-meta {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    background: rgba(0, 0, 0, 0.45);
}

.rank-mark {
    top: 10px;
    left: 10px;
    padding: 6px 9px;
    background: rgba(220, 38, 38, 0.88);
}

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

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

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

.movie-meta,
.movie-desc {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 42px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-list {
    margin-top: 10px;
}

.tag-list span,
.detail-tags span {
    color: #4b5563;
    background: #f3f4f6;
}

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

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

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

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

.category-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.category-name,
.category-desc {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-name {
    bottom: 76px;
    font-size: 23px;
    font-weight: 900;
}

.category-desc {
    bottom: 18px;
    color: #e5e7eb;
    font-size: 13px;
}

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

.rank-panel,
.recommend-panel {
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.small-heading {
    margin-bottom: 14px;
}

.small-heading h2 {
    font-size: 26px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #fef2f2;
    transform: translateX(4px);
}

.rank-row strong {
    color: var(--red);
}

.rank-row span {
    font-weight: 800;
}

.rank-row em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #f9fafb;
}

.mini-card img {
    width: 78px;
    height: 104px;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.mini-card strong,
.mini-card small {
    display: block;
}

.mini-card strong {
    margin-bottom: 6px;
}

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

.page-hero {
    max-width: 1240px;
    margin: 32px auto 0;
    padding: 58px 24px;
}

.page-hero-copy {
    padding: 46px;
    border-radius: 32px;
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d 54%, #831843);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 820px;
    font-size: clamp(38px, 5vw, 62px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #e5e7eb;
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.wide-filter {
    grid-template-columns: 1fr 180px 180px;
}

.filter-bar input,
.filter-bar select {
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

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

.detail-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 24px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--red);
    font-weight: 800;
}

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

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

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: #000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

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

.player-button {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 22px 48px rgba(220, 38, 38, 0.34);
    transition: transform 0.2s ease;
}

.player-button:hover {
    transform: scale(1.08);
}

.player-error {
    position: absolute;
    left: 50%;
    bottom: 20px;
    z-index: 4;
    max-width: calc(100% - 40px);
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    transform: translateX(-50%);
}

.player-error:empty {
    display: none;
}

.detail-side {
    display: grid;
    gap: 18px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    object-fit: cover;
    background: linear-gradient(135deg, #111827, #4b5563);
}

.detail-content {
    max-width: 900px;
    padding: 34px 0 10px;
}

.detail-content h1 {
    margin-top: 8px;
    font-size: clamp(36px, 5vw, 56px);
}

.lead-text {
    color: #374151;
    font-size: 20px;
    font-weight: 700;
}

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

.detail-meta-row span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 800;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
    margin: 28px 0 10px;
    font-size: 26px;
}

.detail-content p {
    color: #374151;
    font-size: 17px;
}

.related-section {
    padding-top: 24px;
}

.site-footer {
    margin-top: 34px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
    display: grid;
    grid-template-columns: 0.9fr 1.6fr;
    gap: 44px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 52px 24px;
}

.footer-brand p,
.footer-links p {
    color: #9ca3af;
}

.footer-logo .brand-copy strong {
    color: #fff;
}

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

.footer-links h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-links ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

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

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

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

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

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

    .detail-side {
        grid-template-columns: 220px 1fr;
        align-items: start;
    }
}

@media (max-width: 820px) {
    .header-inner {
        height: 64px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-carousel {
        height: 76vh;
        min-height: 560px;
    }

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

    .hero-control {
        display: none;
    }

    .home-search-band {
        grid-template-columns: 1fr;
        margin: 18px 18px 0;
    }

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

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

    .filter-bar,
    .wide-filter {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

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

    .rank-row em {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .brand-copy small {
        display: none;
    }

    .brand-copy strong {
        font-size: 17px;
    }

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

    .hero-one-line {
        font-size: 17px;
    }

    .content-section,
    .page-hero,
    .detail-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .detail-side {
        grid-template-columns: 1fr;
    }

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