:root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-slate-950: #020617;
    --color-slate-900: #0f172a;
    --color-slate-800: #1e293b;
    --color-slate-700: #334155;
    --color-slate-600: #475569;
    --color-slate-500: #64748b;
    --color-slate-200: #e2e8f0;
    --color-slate-100: #f1f5f9;
    --color-red: #dc2626;
    --color-red-dark: #b91c1c;
    --color-orange: #fb923c;
    --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 14px 35px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: min(1180px, calc(100% - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

.navbar {
    width: var(--container);
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: white;
    background: var(--color-red);
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, #f87171, var(--color-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    color: #cbd5e1;
    transition: 0.22s ease;
}

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

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: white;
    transition: 0.22s ease;
}

.mobile-menu {
    display: none;
    padding: 10px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.open {
    display: grid;
    gap: 8px;
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    padding: 72px 0 52px;
    color: white;
    background: radial-gradient(circle at 80% 20%, rgba(248, 113, 113, 0.25), transparent 34%), linear-gradient(135deg, #020617 0%, #7f1d1d 54%, #0f172a 100%);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.8) 2px, transparent 0);
    background-size: 58px 58px;
}

.hero-bg-glow {
    position: absolute;
    right: -120px;
    top: 40px;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.32);
    filter: blur(80px);
}

.hero-slider {
    position: relative;
    z-index: 1;
    width: var(--container);
    margin: 0 auto;
}

.hero-slide {
    display: none;
    min-height: 468px;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
    align-items: center;
    gap: 56px;
}

.hero-slide.active {
    display: grid;
    animation: fadeIn 0.45s ease both;
}

.hero-copy {
    max-width: 700px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fecaca;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.hero-description,
.page-hero p,
.detail-one-line {
    margin: 24px 0 0;
    max-width: 720px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 21px);
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 11px;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 700;
}

.tag-row span {
    color: var(--color-slate-600);
    background: var(--color-slate-100);
    border-color: var(--color-slate-200);
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-button {
    color: white;
    background: var(--color-red);
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.35);
}

.primary-button:hover {
    background: var(--color-red-dark);
    transform: translateY(-2px) scale(1.02);
}

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

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

.hero-poster {
    position: relative;
    display: block;
    max-width: 390px;
    justify-self: end;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: 0.35s ease;
}

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

.hero-play,
.play-mask,
.big-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(0, 0, 0, 0.34);
    font-size: 54px;
    opacity: 0;
    transition: 0.25s ease;
}

.hero-poster:hover .hero-play,
.poster-link:hover .play-mask {
    opacity: 1;
}

.hero-dots {
    position: relative;
    z-index: 3;
    width: var(--container);
    margin: 28px auto 0;
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    background: var(--color-red);
}

.hero-strip {
    position: relative;
    z-index: 2;
    width: var(--container);
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.stats-section {
    width: var(--container);
    margin: -28px auto 42px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 24px;
    text-align: center;
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow-card);
}

.stat-card strong {
    display: block;
    color: var(--color-red);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1;
}

.stat-card span {
    color: var(--color-slate-500);
    font-weight: 700;
}

.section-block,
.split-section,
.detail-content-grid,
.watch-section {
    width: var(--container);
    margin: 0 auto 52px;
}

.section-block {
    padding: 34px;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.section-block.no-margin {
    margin: 0;
}

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

.section-heading.small {
    margin-bottom: 18px;
}

.section-heading h2,
.detail-article h2,
.side-panel h2 {
    margin: 0;
    color: var(--color-slate-950);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: white;
    border: 1px solid var(--color-slate-200);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    transition: 0.24s ease;
}

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

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

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: 0.28s ease;
}

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

.rating-badge,
.view-badge {
    position: absolute;
    right: 10px;
    z-index: 2;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 7px 9px;
}

.rating-badge {
    top: 10px;
    background: var(--color-red);
}

.view-badge {
    left: 10px;
    right: auto;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.78);
}

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

.movie-card h3 {
    margin: 0 0 5px;
    color: var(--color-slate-950);
    font-size: 15px;
    line-height: 1.35;
}

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

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--color-slate-500);
    font-size: 12px;
}

.movie-desc {
    margin-top: 8px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
}

.compact-card .movie-desc,
.compact-card .tag-row {
    display: none;
}

.compact-card .movie-card-body {
    padding: 11px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    gap: 26px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    border-radius: 18px;
    color: white;
    background: #111827;
}

.category-tile img {
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: 0.28s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.54;
}

.category-tile span,
.category-tile strong {
    position: absolute;
    left: 16px;
    z-index: 2;
}

.category-tile span {
    bottom: 42px;
    font-size: 18px;
    font-weight: 900;
}

.category-tile strong {
    bottom: 18px;
    color: #fecaca;
    font-size: 13px;
}

.ranking-panel,
.side-panel {
    padding: 26px;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--color-slate-200);
    background: white;
}

.compact-rank-list .rank-item {
    grid-template-columns: auto 58px 1fr;
    padding: 9px;
}

.rank-number {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 10px;
    font-weight: 900;
    background: var(--color-red);
}

.rank-cover {
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

.rank-cover img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 3px;
    color: var(--color-slate-950);
    font-size: 15px;
}

.rank-item p,
.rank-item span {
    display: block;
    margin: 0;
    color: var(--color-slate-500);
    font-size: 12px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    width: var(--container);
    margin: 42px auto 34px;
    padding: 58px;
    color: white;
    border-radius: 32px;
    background: radial-gradient(circle at 78% 0%, rgba(251, 146, 60, 0.35), transparent 30%), linear-gradient(135deg, #020617, #7f1d1d 54%, #0f172a);
    box-shadow: var(--shadow-soft);
}

.slim-hero {
    min-height: 280px;
}

.category-hero {
    min-height: 330px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px 120px;
    gap: 14px;
    margin-bottom: 28px;
    align-items: end;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--color-slate-600);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-slate-200);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--color-slate-900);
    background: white;
    outline: 0;
}

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

.clear-filter {
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    color: white;
    font-weight: 800;
    background: var(--color-slate-900);
    cursor: pointer;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 18px;
    text-align: center;
    border-radius: 18px;
    color: var(--color-slate-600);
    background: var(--color-slate-100);
}

.empty-state.show {
    display: block;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--color-slate-200);
    border-radius: 22px;
    background: white;
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
}

.category-cover img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    color: var(--color-slate-950);
}

.category-overview-card p {
    margin: 0 0 10px;
    color: var(--color-slate-600);
}

.category-overview-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--color-red);
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    color: white;
    background: var(--color-slate-950);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    height: 100%;
    object-fit: cover;
    filter: blur(12px);
    transform: scale(1.08);
    opacity: 0.32;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62), rgba(127, 29, 29, 0.48));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: var(--container);
    margin: 0 auto;
    padding: 38px 0 56px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    border-radius: 26px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
}

.detail-tags {
    margin-top: 22px;
}

.detail-score {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    color: #e2e8f0;
}

.detail-score strong {
    color: #fde68a;
    font-size: 28px;
}

.watch-section {
    margin-top: -70px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.35);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    color: white;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.player-cover img {
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    filter: saturate(1.1);
}

.player-cover .big-play {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
    font-size: clamp(54px, 8vw, 96px);
}

.player-cover strong {
    position: absolute;
    left: 28px;
    bottom: 24px;
    z-index: 2;
    font-size: clamp(20px, 3vw, 34px);
    text-align: left;
}

.player-cover.is-hidden {
    display: none;
}

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

.detail-article {
    padding: 34px;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.detail-article p {
    color: var(--color-slate-700);
    font-size: 17px;
}

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

.info-table div {
    padding: 14px;
    border-radius: 16px;
    background: var(--color-slate-100);
}

.info-table span {
    display: block;
    color: var(--color-slate-500);
    font-size: 12px;
    font-weight: 800;
}

.info-table strong {
    display: block;
    margin-top: 4px;
    color: var(--color-slate-950);
}

.related-block {
    margin-top: 0;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    width: var(--container);
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
}

.site-footer p {
    color: #94a3b8;
}

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

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

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

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

.footer-bottom p {
    margin: 0;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 70;
    display: none;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: var(--color-red);
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.back-to-top.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

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

    .nav-links {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    .hero-section {
        min-height: 0;
        padding: 44px 0 32px;
    }

    .hero-slide,
    .hero-slide.active {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-poster {
        justify-self: start;
        max-width: 260px;
    }

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

    .stats-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 20px;
    }

    .section-block,
    .page-hero,
    .detail-article,
    .ranking-panel,
    .side-panel {
        padding: 24px;
        border-radius: 24px;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .watch-section {
        margin-top: -28px;
    }

    .info-table {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 520px) {
    .brand-text {
        font-size: 17px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .hero-strip {
        display: none;
    }

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

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

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

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

    .rank-item {
        grid-template-columns: auto 58px 1fr;
    }

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