:root {
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --yellow-400: #facc15;
    --yellow-500: #eab308;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.16);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
}

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: 50;
    background: linear-gradient(90deg, var(--red-600), var(--red-700));
    box-shadow: 0 12px 28px rgba(127, 29, 29, 0.24);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.site-logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--red-900);
    background: var(--yellow-400);
    box-shadow: 0 8px 18px rgba(250, 204, 21, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--yellow-400);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-900), var(--red-700));
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 32%, rgba(250, 204, 21, 0.18), transparent 28%),
        linear-gradient(90deg, rgba(3, 7, 18, 0.86), rgba(127, 29, 29, 0.72) 48%, rgba(3, 7, 18, 0.42));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
    padding: 72px 0;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--gray-950);
    background: var(--yellow-400);
    font-weight: 900;
    font-size: 14px;
}

.hero-content h1 {
    margin: 0 0 12px;
    max-width: 780px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    margin: 0 0 14px;
    color: var(--yellow-400);
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 900;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(18px, 2.6vw, 24px);
    line-height: 1.7;
}

.hero-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.detail-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--gray-950);
    background: var(--yellow-400);
    box-shadow: 0 16px 28px rgba(250, 204, 21, 0.25);
}

.primary-button:hover {
    transform: translateY(-2px) scale(1.02);
    background: var(--yellow-500);
}

.ghost-button {
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.ghost-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

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

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

.hero-dot.is-active {
    width: 36px;
    background: var(--yellow-400);
}

.stats-strip {
    margin-top: -38px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stats-strip div {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    text-align: center;
}

.stats-strip strong {
    display: block;
    color: var(--red-700);
    font-size: 30px;
    font-weight: 950;
}

.stats-strip span {
    color: var(--gray-600);
    font-weight: 700;
}

.section-block {
    padding: 64px 0;
}

.soft-section {
    background: linear-gradient(135deg, var(--white), #fff1f2);
}

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

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

.section-heading p {
    margin: 0;
    max-width: 680px;
    color: var(--gray-600);
    font-size: 18px;
    line-height: 1.7;
}

.section-link {
    color: var(--red-700);
    font-weight: 900;
    white-space: nowrap;
}

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

.category-card,
.category-overview-card {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    border-radius: var(--radius);
    color: var(--white);
    background: var(--gray-900);
    box-shadow: var(--shadow);
}

.category-card img,
.category-overview-card img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    opacity: 0.68;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img,
.category-overview-card:hover img {
    transform: scale(1.06);
    opacity: 0.82;
}

.category-card span,
.category-overview-body {
    position: absolute;
    inset: auto 0 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(3, 7, 18, 0.92));
}

.category-card strong,
.category-overview-body strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 950;
}

.category-card em,
.category-overview-body em {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    line-height: 1.6;
}

.category-overview-body span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--yellow-400);
    font-weight: 900;
}

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
}

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

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

.poster-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 34px;
    background: rgba(3, 7, 18, 0);
    opacity: 0;
    transition: opacity 0.24s ease, background 0.24s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    background: rgba(3, 7, 18, 0.36);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--gray-950);
    background: var(--yellow-400);
    font-weight: 950;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 13px;
}

.movie-card-body strong {
    color: var(--gray-900);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-body em {
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
    line-height: 1.4;
}

.movie-card-desc {
    color: var(--gray-700);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.movie-card-tags span,
.tag-list span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--red-700);
    background: #fee2e2;
    font-size: 12px;
    font-weight: 800;
}

.movie-card-compact {
    flex-direction: row;
    min-height: 132px;
}

.movie-card-compact .poster-frame {
    flex: 0 0 88px;
    aspect-ratio: auto;
}

.movie-card-compact .movie-card-body strong {
    -webkit-line-clamp: 1;
}

.movie-card-compact .movie-card-tags span:nth-child(n+3) {
    display: none;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--gray-900);
    box-shadow: var(--shadow);
}

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

.rank-panel .section-link {
    color: var(--yellow-400);
}

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

.page-hero {
    padding: 74px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 78% 20%, rgba(250, 204, 21, 0.2), transparent 28%),
        linear-gradient(135deg, var(--red-900), var(--red-700));
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
    line-height: 1.8;
}

.search-panel {
    margin-bottom: 28px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
}

.search-label {
    display: block;
    margin-bottom: 12px;
    color: var(--gray-900);
    font-size: 20px;
    font-weight: 950;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
}

.search-row input,
.search-row select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0 14px;
    color: var(--gray-900);
    background: var(--gray-50);
    outline: none;
}

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

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    color: var(--gray-800);
    background: var(--gray-100);
    font-weight: 900;
    cursor: pointer;
}

.filter-button.is-active {
    color: var(--gray-950);
    background: var(--yellow-400);
}

[data-card].is-hidden {
    display: none;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--gray-950);
}

.detail-bg,
.detail-bg-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.detail-bg {
    object-fit: cover;
    filter: blur(6px) saturate(1.08);
    transform: scale(1.06);
    opacity: 0.55;
}

.detail-bg-shade {
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(127, 29, 29, 0.76));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 34px 0 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

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

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

.detail-poster {
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

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

.detail-intro h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-intro p {
    max-width: 820px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
    line-height: 1.8;
}

.detail-main {
    padding: 54px 0 0;
}

.player-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--gray-950);
    box-shadow: var(--shadow);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    color: var(--gray-950);
    background: var(--yellow-400);
    font-size: 36px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.detail-content {
    margin-top: 34px;
    padding: 34px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
}

.detail-content h2 {
    margin: 0 0 14px;
    color: var(--gray-900);
    font-size: 26px;
    font-weight: 950;
}

.detail-content p {
    margin: 0 0 26px;
    color: var(--gray-700);
    font-size: 17px;
    line-height: 1.9;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.next-prev {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 24px;
}

.next-prev a {
    padding: 16px;
    border-radius: 14px;
    color: var(--red-700);
    background: #fff1f2;
    font-weight: 900;
}

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

.site-footer {
    margin-top: 72px;
    color: #d1d5db;
    background: var(--gray-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 50px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
    font-weight: 950;
}

.site-footer p,
.site-footer li {
    color: #d1d5db;
    line-height: 1.8;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: var(--yellow-400);
}

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

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

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

    .two-column-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .site-header-inner {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px 0 10px;
    }

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

    .nav-link {
        padding: 10px 0;
    }

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

    .hero-content {
        margin-left: 16px;
        margin-right: 16px;
        padding-top: 84px;
    }

    .stats-strip,
    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .mini-grid,
    .footer-grid,
    .detail-layout,
    .next-prev {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

    .section-link {
        display: inline-flex;
        margin-top: 12px;
    }

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

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

    .detail-content {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .movie-card-compact {
        flex-direction: column;
    }

    .movie-card-compact .poster-frame {
        flex-basis: auto;
        aspect-ratio: 2 / 3;
    }

    .stats-strip div {
        padding: 18px;
    }
}
