:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --red: #dc2626;
    --red-dark: #991b1b;
    --red-soft: #fee2e2;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.32);
    font-size: 15px;
}

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

.nav-link {
    position: relative;
    padding: 10px 14px;
    border-radius: 999px;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(220, 38, 38, 0.92);
}

.nav-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 20px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(220, 38, 38, 0.45), transparent 34%), var(--bg);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.76) 40%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 45%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    top: 48%;
    width: min(680px, calc(100% - 48px));
    transform: translateY(-50%);
    color: var(--white);
}

.hero-kicker,
.section-heading span,
.inner-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.16);
    border: 1px solid rgba(248, 113, 113, 0.28);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.hero-content p {
    max-width: 620px;
    margin: 24px 0 0;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    font-weight: 700;
}

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

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

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

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

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-light {
    color: var(--red-dark);
    background: var(--white);
}

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

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

.hero-dot.active {
    width: 34px;
    background: var(--red);
}

.hero-search-panel {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 82px;
    z-index: 6;
    width: min(430px, calc(100% - 48px));
    padding: 18px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search,
.search-page-panel,
.filter-bar {
    display: flex;
    gap: 10px;
}

.hero-search input,
.search-page-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 14px;
    outline: 0;
    color: var(--text);
    background: var(--white);
    font-size: 15px;
}

.hero-search button,
.search-page-panel button {
    min-width: 86px;
    border: 0;
    border-radius: 14px;
    color: var(--white);
    background: var(--red);
    font-weight: 800;
    cursor: pointer;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 700;
}

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

.section-dark,
.section-red {
    width: 100%;
    max-width: none;
    padding-inline: max(16px, calc((100vw - 1180px) / 2));
    background: var(--bg);
}

.section-soft {
    width: 100%;
    max-width: none;
    padding-inline: max(16px, calc((100vw - 1180px) / 2));
    background: #f1f5f9;
}

.section-red {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-dark .section-heading h2,
.section-dark .section-heading p,
.section-red .section-heading h2,
.section-red .section-heading p {
    color: var(--white);
}

.section-heading p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

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

.text-link {
    color: var(--red);
    font-weight: 900;
}

.movie-grid,
.wide-grid,
.category-grid,
.ranking-strip {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card {
    min-width: 0;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #1e293b;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.movie-card-wide .movie-poster {
    aspect-ratio: 16 / 10;
}

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

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

.movie-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.86));
    opacity: 0.88;
}

.movie-year,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 8px;
    color: var(--white);
    background: var(--red);
    font-size: 12px;
    font-weight: 900;
    font-style: normal;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: rgba(15, 23, 42, 0.86);
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--white);
    background: rgba(220, 38, 38, 0.9);
    transform: translate(-50%, -50%) scale(0.78);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
}

.section-dark .movie-card h2,
.section-dark .movie-card h2 a {
    color: var(--white);
}

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

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

.section-dark .movie-meta,
.section-dark .movie-line {
    color: #cbd5e1;
}

.movie-line {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 24px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    color: var(--white);
    box-shadow: var(--shadow);
}

.category-card img,
.category-card span {
    position: absolute;
    inset: 0;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-card span {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.9));
}

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

.category-card strong,
.category-card small {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 22px;
    font-weight: 900;
}

.category-card small {
    margin-top: 8px;
    color: #e2e8f0;
    line-height: 1.55;
}

.cta-box {
    width: min(920px, 100%);
    margin: 0 auto;
    text-align: center;
    color: var(--white);
}

.cta-box h2 {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    letter-spacing: -0.05em;
}

.cta-box p {
    max-width: 720px;
    margin: 18px auto 28px;
    color: #fee2e2;
    font-size: 18px;
    line-height: 1.8;
}

.inner-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 20% 10%, rgba(220, 38, 38, 0.42), transparent 35%),
        linear-gradient(135deg, #020617, #1e293b 55%, #7f1d1d);
}

.inner-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 82px 0;
}

.inner-hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 64px);
    letter-spacing: -0.05em;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    padding: 18px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.overview-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    overflow: hidden;
    border-radius: 18px;
    background: #1e293b;
}

.overview-cover img {
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
    font-size: 24px;
}

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

.filter-bar,
.search-page-panel {
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-bar select {
    max-width: 220px;
}

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

.detail-page {
    background: var(--bg);
    min-height: 100vh;
    color: var(--white);
}

.player-section {
    padding: 28px max(16px, calc((100vw - 1180px) / 2)) 0;
    background: radial-gradient(circle at 70% 0%, rgba(220, 38, 38, 0.24), transparent 28%), #020617;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
    z-index: 5;
}

.player-overlay.hide {
    display: none;
}

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

.player-dark {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 22px 46px rgba(220, 38, 38, 0.38);
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-size: 30px;
}

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-card,
.side-card {
    border-radius: 24px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.detail-card + .detail-card,
.side-card + .side-card {
    margin-top: 20px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 14px;
}

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

.detail-card h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 52px);
    letter-spacing: -0.04em;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 22px;
}

.detail-card p {
    color: #cbd5e1;
    line-height: 1.9;
    font-size: 16px;
}

.detail-card .lead {
    color: #f8fafc;
    font-size: 19px;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.14);
}

.cover-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
}

.cover-card .btn {
    width: 100%;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    align-items: center;
    gap: 12px;
    color: #e2e8f0;
}

.mini-card img {
    width: 76px;
    height: 108px;
    object-fit: cover;
    border-radius: 12px;
}

.mini-card span {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
}

.mini-card:hover span {
    color: #f87171;
}

.site-footer {
    color: #cbd5e1;
    background: #020617;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.footer-grid h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 17px;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

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

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }

    .side-card + .side-card {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        min-height: 64px;
    }

    .brand {
        font-size: 20px;
    }

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

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        border-radius: 12px;
    }

    .hero {
        min-height: 720px;
    }

    .hero-content {
        top: 42%;
    }

    .hero-search-panel {
        left: 16px;
        right: 16px;
        bottom: 70px;
        width: auto;
    }

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

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

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

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

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

    .filter-bar select {
        max-width: none;
    }

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

    .player-shell {
        border-radius: 18px;
    }

    .big-play {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .wide-grid,
    .ranking-list,
    .ranking-strip {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .section {
        padding: 50px 0;
    }

    .section-dark,
    .section-soft,
    .section-red {
        padding-inline: 16px;
    }

    .movie-card h2 {
        font-size: 14px;
    }

    .movie-meta,
    .movie-line {
        font-size: 12px;
    }
}
