:root {
    --red: #dc2626;
    --red-dark: #991b1b;
    --red-soft: #fee2e2;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f9fafb;
    --black: #050505;
    --shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    backdrop-filter: blur(18px);
}

.nav-shell {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.3);
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel nav a:hover {
    color: var(--red);
    background: #fef2f2;
}

.nav-search {
    position: relative;
    width: 250px;
}

.nav-search input,
.mobile-search input,
.search-page-form input,
.filter-panel input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    outline: none;
    background: #fff;
    padding: 11px 48px 11px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.nav-search button,
.mobile-search button,
.search-page-form button {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: var(--red);
    padding: 7px 12px;
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    border: 0;
    margin-left: auto;
    padding: 9px 12px;
    border-radius: 12px;
    background: #f3f4f6;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: #fff;
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav,
.mobile-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-category-grid {
    margin-top: 12px;
}

.mobile-category-grid a {
    padding: 9px 12px;
    border-radius: 12px;
    background: #f9fafb;
    color: #4b5563;
}

.mobile-search {
    position: relative;
    margin-top: 14px;
}

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

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.45) 48%, rgba(0, 0, 0, 0.16)), linear-gradient(0deg, #050505, rgba(5, 5, 5, 0.03) 54%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 340px;
    align-items: center;
    gap: 60px;
    color: #fff;
}

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

.hero-copy h1,
.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-line {
    max-width: 760px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.hero-tags a,
.detail-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-link,
.row-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    padding: 13px 28px;
    color: #fff;
    background: var(--red);
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.32);
}

.ghost-button {
    padding: 12px 24px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.primary-button:hover,
.ghost-button:hover,
.row-button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 2 / 3;
}

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

.hero-poster span {
    position: absolute;
    left: 16px;
    bottom: 16px;
    border-radius: 999px;
    padding: 7px 13px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    font-weight: 800;
}

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

.hero-dots button {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.active {
    background: #fff;
}

.section {
    padding: 58px 0;
}

.section-soft {
    background: #fff;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: #111827;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.25s ease;
}

.play-float,
.small-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 38px;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-link img,
.small-media-card:hover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.movie-card:hover .poster-shade {
    background: rgba(0, 0, 0, 0.38);
}

.movie-card:hover .play-float,
.small-media-card:hover .small-play {
    opacity: 1;
    transform: scale(1);
}

.year-badge,
.rank-num {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    background: var(--red);
    font-size: 12px;
    font-weight: 800;
}

.rank-num {
    left: auto;
    right: 10px;
    background: rgba(0, 0, 0, 0.72);
}

.card-body h2 {
    margin: 12px 0 4px;
    font-size: 16px;
    line-height: 1.35;
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

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

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

.category-tile,
.category-overview-card {
    display: grid;
    gap: 16px;
    border: 1px solid #f3f4f6;
    border-radius: 24px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.category-covers,
.category-overview-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow: hidden;
    min-height: 128px;
}

.category-covers img,
.category-overview-cover img {
    width: 100%;
    height: 132px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.35s ease;
}

.category-tile h2,
.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-tile p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
}

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

.small-media-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border-radius: 20px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.small-media-card a:first-child {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
}

.small-media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.small-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    border-radius: 10px;
    padding: 3px 7px;
    color: #fff;
    background: var(--red);
    font-size: 12px;
    font-weight: 900;
}

.small-media-card h2 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.35;
}

.small-media-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

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

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

.page-hero {
    padding: 82px 0;
    color: #fff;
}

.red-hero {
    background: radial-gradient(circle at 20% 10%, #ef4444, transparent 30%), linear-gradient(135deg, #dc2626, #7f1d1d);
}

.dark-hero {
    background: radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.55), transparent 30%), linear-gradient(135deg, #111827, #050505);
}

.page-hero p:last-child {
    max-width: 780px;
    margin: 0;
    color: #fee2e2;
    font-size: 18px;
}

.filter-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 30px;
    border-radius: 24px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.filter-panel.slim {
    margin-top: 28px;
}

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

.filter-links a {
    border-radius: 999px;
    padding: 7px 14px;
    background: #f3f4f6;
    color: #4b5563;
    font-weight: 700;
}

.filter-links a.active,
.filter-links a:hover {
    color: #fff;
    background: var(--red);
}

.rank-leads {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.rank-lead-card {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border-radius: 26px;
    color: #fff;
    box-shadow: var(--shadow);
}

.rank-lead-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-lead-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 60%);
}

.rank-lead-card div {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
}

.rank-lead-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.rank-lead-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #e5e7eb;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 76px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 16px;
    border-radius: 18px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

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

.rank-thumb {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-row h2 {
    margin: 0 0 4px;
    font-size: 17px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.row-button {
    padding: 8px 14px;
    color: #fff;
    background: var(--red);
}

.search-page-form {
    position: relative;
    max-width: 720px;
    margin: 0 auto 24px;
}

.search-page-form input {
    padding: 17px 94px 17px 20px;
    border-radius: 18px;
    font-size: 18px;
}

.search-page-form button {
    right: 8px;
    padding: 10px 20px;
}

.search-summary {
    margin-bottom: 24px;
    color: var(--muted);
    text-align: center;
}

.player-strip {
    padding: 16px 0;
    background: #050505;
}

.back-link {
    color: #fff;
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 340px;
    gap: 30px;
    padding: 34px 0 10px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.14), transparent 35%), rgba(0, 0, 0, 0.32);
    cursor: pointer;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    padding-left: 6px;
    background: var(--red);
    font-size: 42px;
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.4);
}

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

.player-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 40px 40px minmax(0, 1fr) 40px;
    gap: 12px;
    align-items: center;
    padding: 18px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.control-button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.progress-shell {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
}

.progress-shell span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--red);
}

.detail-card,
.info-panel {
    margin-top: 24px;
    border-radius: 24px;
    padding: 26px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb a {
    color: var(--red);
    font-weight: 700;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
}

.detail-card .detail-meta span {
    color: #374151;
    background: #f3f4f6;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.action-row button {
    border: 0;
    border-radius: 14px;
    padding: 10px 18px;
    color: #374151;
    background: #f3f4f6;
    cursor: pointer;
    font-weight: 750;
}

.action-row button.active,
.action-row button:hover {
    color: #fff;
    background: var(--red);
}

.detail-card section {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 22px;
}

.detail-card h2,
.info-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-card p {
    margin: 0 0 12px;
    color: #4b5563;
}

.lead-text {
    color: #1f2937 !important;
    font-size: 18px;
    font-weight: 700;
}

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

.info-panel img {
    width: 100%;
    border-radius: 18px;
    margin-bottom: 18px;
}

.info-panel dl {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
}

.info-panel dl div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
}

.info-panel dt {
    color: var(--muted);
}

.info-panel dd {
    margin: 0;
    font-weight: 750;
}

.info-panel .tag-list span {
    color: #374151;
    background: #f3f4f6;
}

.site-footer {
    margin-top: 50px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 42px;
    padding: 52px 0;
}

.footer-brand {
    margin-bottom: 14px;
    color: #fff;
}

.site-footer p {
    margin: 0;
    max-width: 450px;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
}

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

.footer-links a {
    color: #d1d5db;
}

.footer-links a:hover {
    color: #fff;
}

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

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

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

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

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

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

    .sticky-side {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .nav-shell {
        height: 64px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 680px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-poster {
        display: none;
    }

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

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

    .rank-leads {
        grid-template-columns: 1fr;
    }

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

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

    .hero-carousel {
        min-height: 620px;
    }

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

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

    .category-covers img,
    .category-overview-cover img {
        height: 108px;
    }

    .rank-row {
        grid-template-columns: 40px 62px minmax(0, 1fr);
    }

    .row-button {
        display: none;
    }

    .player-bar {
        grid-template-columns: 36px 36px minmax(0, 1fr) 36px;
        gap: 8px;
        padding: 12px;
    }

    .control-button {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 420px) {
    .six-cols,
    .category-grid,
    .category-overview-grid,
    .wide-grid {
        grid-template-columns: 1fr;
    }
}
