:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --orange: #f97316;
    --gold: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.86);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    box-shadow: 0 12px 25px rgba(239, 68, 68, 0.28);
    font-size: 16px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-dark);
    background: #fff1f2;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff1f2;
    color: var(--primary-dark);
}

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

.hero-track,
.hero-slide {
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    align-items: center;
    gap: 54px;
    padding: 80px max(32px, calc((100vw - 1180px) / 2)) 72px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    background-image: linear-gradient(110deg, rgba(15, 23, 42, 0.92), rgba(127, 29, 29, 0.78) 48%, rgba(249, 115, 22, 0.52)), var(--hero-bg);
    background-size: cover;
    background-position: center;
}

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

.hero-content {
    max-width: 760px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fed7aa;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.08em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.card-tags span {
    color: #b91c1c;
    background: #fff1f2;
}

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

.primary-btn,
.secondary-btn,
.section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    box-shadow: 0 18px 35px rgba(239, 68, 68, 0.3);
}

.secondary-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
}

.primary-btn:hover,
.secondary-btn:hover,
.section-action:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(160deg, #7f1d1d, #f97316);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster span,
.poster-play {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(239, 68, 68, 0.9);
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.3);
}

.hero-poster span {
    left: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
}

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

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

.hero-dot.is-active {
    width: 36px;
    background: #fff;
}

.search-panel,
.section-block {
    margin-top: 48px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    align-items: center;
    gap: 24px;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
}

.search-panel h2,
.section-heading h2,
.rank-card h2,
.side-card h2,
.text-card h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.search-panel p,
.section-heading p,
.footer-grid p,
.page-hero p,
.text-card p,
.ranking-info p,
.one-line {
    color: var(--muted);
}

.search-panel p,
.section-heading p {
    margin: 6px 0 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 18px;
    background: #f3f4f6;
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.search-box:focus-within {
    background: #fff;
    border-color: #fecaca;
    box-shadow: 0 0 0 4px #fee2e2;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

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

.section-action {
    color: #b91c1c;
    background: #fff1f2;
}

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

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

.movie-card {
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.26), transparent 28%), linear-gradient(145deg, #ef4444, #f97316 54%, #111827);
}

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

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.66));
}

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, 0.72);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.86);
    transition: 0.2s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.card-body h3 a:hover,
.ranking-info h2 a:hover {
    color: var(--primary-dark);
}

.card-body p {
    min-height: 46px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
}

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

.category-tile {
    min-height: 124px;
    padding: 20px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #991b1b, #ef4444);
}

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

.category-tile span {
    display: block;
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    display: block;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    line-height: 1.5;
}

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

.rank-card,
.side-card,
.text-card {
    padding: 22px;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(229, 231, 235, 0.88);
}

.rank-card {
    position: sticky;
    top: 96px;
}

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

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

.rank-list.small .rank-row {
    grid-template-columns: 30px minmax(0, 1fr);
}

.rank-list.small .rank-meta {
    display: none;
}

.rank-row:hover {
    background: #fff1f2;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-meta {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
}

.page-hero {
    padding: 72px 0;
    color: #fff;
    background: linear-gradient(135deg, #111827, #7f1d1d 54%, #f97316);
}

.page-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    align-items: end;
    gap: 28px;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 5vw, 64px);
    letter-spacing: -0.07em;
    line-height: 1.04;
}

.page-hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.page-search {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
}

.page-search input,
.page-search span {
    color: #fff;
}

.page-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

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

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

.side-card {
    position: sticky;
    top: 96px;
    margin-bottom: 18px;
}

.side-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 22px;
}

.side-links a {
    padding: 8px 11px;
    border-radius: 999px;
    color: #b91c1c;
    background: #fff1f2;
    font-size: 13px;
    font-weight: 800;
}

.ranking-list-page {
    display: grid;
    gap: 18px;
    margin-top: 42px;
    margin-bottom: 64px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(229, 231, 235, 0.88);
}

.ranking-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(145deg, #ef4444, #f97316 54%, #111827);
}

.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-topline {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 800;
}

.ranking-info h2 {
    margin: 12px 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.ranking-info p {
    margin: 0 0 14px;
}

.player-section {
    padding: 34px 0;
    background: #050505;
}

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

.player-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.22), rgba(0, 0, 0, 0.44));
    font-size: 72px;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    font-size: 18px;
    letter-spacing: 0.08em;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: 36px;
    margin-bottom: 70px;
    align-items: start;
}

.detail-head {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 26px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(229, 231, 235, 0.88);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, #ef4444, #f97316 54%, #111827);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.07em;
}

.detail-tags span {
    color: #b91c1c;
    background: #fff1f2;
    border-color: #fee2e2;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 0;
}

.meta-list div {
    padding: 14px;
    border-radius: 16px;
    background: #f9fafb;
}

.meta-list dt {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 900;
}

.meta-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.text-card {
    margin-top: 20px;
}

.text-card p {
    margin: 12px 0 0;
    font-size: 16px;
}

.related-block {
    margin-top: 28px;
}

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

.site-footer {
    margin-top: 70px;
    padding: 42px 0;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 560px);
    gap: 30px;
    align-items: start;
}

.footer-logo {
    color: #fff;
}

.footer-grid p {
    margin: 12px 0 0;
    color: #9ca3af;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #f3f4f6;
    background: rgba(255, 255, 255, 0.08);
}

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

.empty-state {
    padding: 28px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--soft-shadow);
}

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

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

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

    .rank-card,
    .side-card,
    .detail-side {
        position: static;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 82px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-radius: 22px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    body.menu-open .site-nav {
        display: flex;
    }

    .nav-link {
        padding: 13px 14px;
    }

    .hero,
    .hero-track,
    .hero-slide {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 54px 18px 78px;
    }

    .hero-poster {
        width: min(280px, 72vw);
        justify-self: center;
    }

    .search-panel,
    .page-hero-inner,
    .detail-head,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .logo,
    .footer-logo {
        font-size: 18px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.05em;
    }

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

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .ranking-item {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 14px;
    }

    .ranking-info h2 {
        font-size: 21px;
    }

    .detail-head {
        padding: 18px;
    }

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

    .meta-list {
        grid-template-columns: 1fr;
    }

    .play-overlay {
        font-size: 50px;
    }
}
