:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --white: #ffffff;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --red: #dc2626;
    --red-dark: #991b1b;
    --red-soft: #fee2e2;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, #0f172a, #1e293b);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 12px 25px rgba(220, 38, 38, 0.35);
    font-size: 16px;
}

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

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.menu-button {
    display: none;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
    flex-direction: column;
    gap: 6px;
}

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

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.45), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72) 48%, rgba(127, 29, 29, 0.55)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 380px);
    gap: 54px;
    align-items: center;
    color: #ffffff;
}

.hero-kicker,
.detail-kicker,
.section-heading span,
.ranking-head span,
.page-hero-inner span,
.category-overview-head span {
    display: inline-flex;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.28);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 780px;
    margin: 20px 0 20px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(18px, 2.2vw, 24px);
}

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

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

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

.primary-button,
.ghost-button,
.ghost-dark-button,
.hero-search button,
.filter-panel a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 12px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.primary-button:hover,
.hero-search button:hover,
.filter-panel a:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(220, 38, 38, 0.36);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

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

.ghost-dark-button {
    color: var(--slate-900);
    background: #f1f5f9;
}

.ghost-dark-button:hover {
    background: var(--red-soft);
    color: var(--red-dark);
}

.hero-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
    transition: transform 0.3s ease;
    background: rgba(15, 23, 42, 0.8);
}

.hero-poster:hover {
    transform: rotate(0deg) scale(1.02);
}

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

.hero-control-panel {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 108px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ffffff;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 28px;
    background: #ffffff;
}

.hero-search {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    width: min(780px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.hero-search input,
.filter-panel input {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--ink);
    background: #ffffff;
}

.hero-search button,
.filter-panel a {
    border: 0;
    color: #ffffff;
    background: var(--red);
    cursor: pointer;
}

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

.light-section {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: #ffffff;
}

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

.section-heading h2,
.ranking-head h2,
.page-hero-inner h1,
.category-overview-head h2 {
    margin: 12px 0 10px;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p,
.category-overview-head p,
.page-hero-inner p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

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

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

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

.category-tile {
    min-height: 158px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    border-radius: 22px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(248, 113, 113, 0.62), transparent 38%),
        linear-gradient(135deg, var(--slate-900), var(--slate-800));
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: #cbd5e1;
    font-style: normal;
    font-size: 14px;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

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

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: #e2e8f0;
    box-shadow: var(--shadow-soft);
}

.poster-frame img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 48%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--red);
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    display: block;
    padding: 12px 2px 0;
}

.movie-card strong {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

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

.movie-meta-line,
.movie-desc {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

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

.movie-card-small {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.movie-card-small .poster-frame {
    border-radius: 14px;
    box-shadow: none;
}

.movie-card-small .movie-card-body {
    padding: 2px 0 0;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.recommend-panel,
.ranking-panel,
.category-overview-card,
.detail-card,
.article-block,
.side-panel,
.filter-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.recommend-panel,
.ranking-panel,
.category-overview-card,
.article-block,
.side-panel {
    padding: 24px;
}

.ranking-panel {
    position: sticky;
    top: 96px;
}

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

.tall-rank-list {
    max-height: none;
}

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

.rank-row:hover {
    background: var(--red-soft);
    transform: translateX(3px);
}

.rank-number {
    color: var(--red);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 12px;
    background: #e2e8f0;
}

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

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 900;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-info em {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.full-button {
    width: 100%;
    margin-top: 18px;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 72% 20%, rgba(220, 38, 38, 0.48), transparent 30%),
        linear-gradient(135deg, var(--slate-900), var(--red-dark));
}

.small-hero {
    background:
        radial-gradient(circle at 70% 10%, rgba(248, 113, 113, 0.38), transparent 30%),
        linear-gradient(135deg, var(--slate-900), var(--slate-800));
}

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

.page-hero-inner h1,
.page-hero-inner p {
    color: #ffffff;
}

.page-hero-inner p {
    color: #e2e8f0;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    margin-bottom: 28px;
}

.big-filter {
    position: sticky;
    top: 88px;
    z-index: 20;
}

.empty-state {
    display: none;
    padding: 54px 20px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
    display: block;
}

.stacked-list {
    display: grid;
    gap: 26px;
}

.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.detail-main {
    background: #0f172a;
}

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

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

.detail-breadcrumb a:hover {
    color: #ffffff;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.46);
    aspect-ratio: 16 / 9;
}

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

.player-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000000;
}

.player-mask.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

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

.player-mask-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.24), rgba(0, 0, 0, 0.72));
}

.play-circle {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--red);
    box-shadow: 0 20px 46px rgba(220, 38, 38, 0.42);
    font-size: 34px;
    padding-left: 6px;
}

.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 78px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
    gap: 28px;
}

.detail-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 24px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 20px;
    background: #e2e8f0;
}

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

.detail-info h1 {
    margin: 16px 0 12px;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.detail-one-line {
    margin: 0 0 16px;
    color: var(--slate-700);
    font-size: 18px;
}

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

.detail-meta span {
    padding: 6px 10px;
    border-radius: 10px;
    color: var(--slate-700);
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 700;
}

.detail-tags span {
    color: var(--slate-700);
    background: #f8fafc;
    border-color: #e2e8f0;
}

.article-block {
    margin-top: 22px;
}

.article-block h2,
.side-panel h2 {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: 24px;
}

.article-block p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
    line-height: 1.9;
}

.detail-side {
    min-width: 0;
}

.side-panel {
    position: sticky;
    top: 96px;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-shell p {
    max-width: 520px;
    color: #94a3b8;
}

.footer-shell h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    background: rgba(220, 38, 38, 0.62);
    color: #ffffff;
}

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

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

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

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

    .ranking-panel,
    .side-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 54px;
        align-content: center;
    }

    .hero-poster {
        max-width: 260px;
        margin: 0 auto;
        transform: none;
    }

    .hero-control-panel {
        bottom: 128px;
    }

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

    .row-heading,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

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

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

@media (max-width: 520px) {
    .site-logo {
        font-size: 18px;
    }

    .section-shell {
        padding: 50px 0;
    }

    .six-grid,
    .wide-card-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-small {
        grid-template-columns: 78px 1fr;
    }

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

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

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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