:root {
    --red: #dc2626;
    --red-dark: #991b1b;
    --orange: #f97316;
    --yellow: #facc15;
    --blue: #2563eb;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: var(--ink);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.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.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark,
.footer-brand span {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 25px rgba(220, 38, 38, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

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

.brand-subtitle {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

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

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.filter-panel input,
.filter-panel select,
.search-panel select {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 210px;
    border-radius: 999px;
    padding: 10px 16px;
}

.header-search button,
.mobile-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
}

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

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

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    border-radius: 999px;
    padding: 10px 14px;
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f9fafb;
    color: #374151;
    font-weight: 700;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #991b1b 0%, #dc2626 42%, #f97316 75%, #facc15 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
        radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.36));
}

.hero-inner {
    position: relative;
    min-height: 610px;
    display: grid;
    align-items: center;
    padding: 74px 0 86px;
}

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

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

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

.hero h1,
.page-hero h1,
.detail-title-row h1 {
    margin: 16px 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero p,
.page-hero p,
.detail-title-row p {
    margin: 0;
    max-width: 680px;
    font-size: clamp(17px, 2.2vw, 22px);
    color: rgba(255, 255, 255, 0.9);
}

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

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

.hero-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 13px;
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

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

.btn,
.wide-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.wide-link:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.btn.primary {
    background: #fff;
    color: var(--red);
    box-shadow: 0 15px 35px rgba(127, 29, 29, 0.24);
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 28px;
    min-height: 430px;
    box-shadow: 0 32px 80px rgba(17, 24, 39, 0.38);
    isolation: isolate;
}

.hero-poster img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.82));
}

.hero-poster-caption {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 6px;
}

.hero-poster-caption strong {
    font-size: 28px;
    line-height: 1.15;
}

.hero-poster-caption em {
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 36px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

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

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

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

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

.section-heading span {
    display: block;
    color: var(--red);
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 5px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading a {
    color: var(--blue);
    font-weight: 800;
}

.section-heading.light h2,
.section-heading.light a,
.section-heading.light span {
    color: #fff;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.card-link,
.poster-wrap,
.card-body,
.card-title,
.card-meta,
.card-desc,
.tag-row {
    display: block;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.55));
}

.quality-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
}

.quality-badge {
    right: 12px;
    padding: 5px 9px;
    background: rgba(220, 38, 38, 0.94);
}

.rank-badge {
    left: 12px;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--yellow), var(--orange));
    color: #7c2d12;
}

.card-body {
    padding: 18px;
}

.card-title {
    min-height: 48px;
    color: #111827;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
}

.card-meta i {
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 8px 2px;
    border-radius: 999px;
    background: #d1d5db;
}

.card-desc {
    margin-top: 10px;
    min-height: 45px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span {
    display: inline-flex;
    margin: 0 6px 6px 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff1f2;
    color: #be123c;
    font-size: 12px;
    font-weight: 700;
}

.category-band {
    padding: 64px 0;
    background: linear-gradient(135deg, #111827, #7f1d1d 54%, #ea580c);
}

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

.category-tile,
.category-overview-card a {
    position: relative;
    overflow: hidden;
    min-height: 176px;
    border-radius: 22px;
    background: #111827;
    color: #fff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.category-tile {
    display: block;
}

.category-tile img,
.thumb-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tile::after,
.category-overview-card a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 10%, rgba(0,0,0,0.82));
}

.category-tile span,
.category-overview-copy {
    position: absolute;
    z-index: 1;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 7px;
}

.category-tile strong,
.category-overview-copy strong {
    font-size: 19px;
    line-height: 1.2;
}

.category-tile em,
.category-overview-copy em {
    color: rgba(255,255,255,0.76);
    font-style: normal;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
    padding: 62px 0;
}

.rank-panel,
.content-card,
.side-card,
.player-card,
.filter-panel,
.search-panel,
.search-status,
.ranking-section {
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-panel {
    padding: 24px;
    position: sticky;
    top: 96px;
}

.rank-panel-head span {
    color: var(--red);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.rank-panel-head h2 {
    margin: 3px 0 18px;
    font-size: 26px;
}

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

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

.rank-list-item:hover {
    background: #f9fafb;
}

.rank-list-item img {
    width: 74px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.list-rank {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fee2e2;
    color: var(--red);
    font-weight: 850;
    font-size: 13px;
}

.rank-list-item span {
    min-width: 0;
}

.rank-list-item strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-list-item em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.wide-link {
    width: 100%;
    margin-top: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #111827, #7f1d1d 58%, #ea580c);
}

.small-hero .container {
    padding: 74px 0;
}

.small-hero h1 {
    margin: 12px 0;
    font-size: clamp(36px, 5vw, 58px);
}

.small-hero p {
    color: rgba(255,255,255,0.82);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255,255,255,0.78);
    font-size: 14px;
}

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

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

.category-overview-card a {
    display: block;
    min-height: 230px;
}

.thumb-stack {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 230px;
}

.filter-panel,
.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    padding: 18px;
    margin-bottom: 26px;
}

.search-panel {
    grid-template-columns: minmax(0, 1fr) 170px 170px auto;
}

.filter-panel input,
.filter-panel select,
.search-panel input,
.search-panel select {
    min-width: 0;
    border-radius: 14px;
    padding: 12px 14px;
}

.search-panel button {
    border-radius: 14px;
    padding-inline: 24px;
}

.search-status {
    padding: 14px 18px;
    margin-bottom: 24px;
    color: #4b5563;
    font-weight: 700;
}

.ranking-wrap {
    display: grid;
    gap: 44px;
}

.ranking-section {
    padding: 28px;
}

.ranking-grid {
    margin-bottom: 22px;
}

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

.detail-hero {
    min-height: 420px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(2px);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17,24,39,0.94), rgba(127,29,29,0.78));
}

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

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

.detail-cover {
    width: 240px;
    height: 330px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-weight: 750;
    font-size: 13px;
}

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

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card {
    overflow: hidden;
    padding: 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: var(--radius);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2,6,23,0.12), rgba(2,6,23,0.7));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 36px rgba(220, 38, 38, 0.42);
    font-size: 26px;
}

.play-overlay strong {
    font-size: 18px;
}

.content-card,
.side-card {
    padding: 26px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    letter-spacing: -0.02em;
}

.content-card p {
    margin: 0;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
    text-align: justify;
}

.tag-cloud span {
    background: #fff1f2;
    color: #be123c;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 1fr 1fr;
    gap: 48px;
    padding: 54px 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 850;
    font-size: 22px;
    margin-bottom: 14px;
}

.footer-brand span {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 17px;
}

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

.site-footer p {
    margin: 0;
    max-width: 460px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

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

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

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

@media (max-width: 1040px) {
    .header-search {
        display: none;
    }

    .hero-slide,
    .split-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .rank-panel,
    .sticky-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-inner {
        min-height: auto;
        padding: 52px 0 76px;
    }

    .hero-slide {
        gap: 30px;
    }

    .hero h1,
    .page-hero h1,
    .detail-title-row h1 {
        font-size: 38px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 320px;
        height: 320px;
    }

    .four-col,
    .three-col,
    .category-grid,
    .category-overview-grid,
    .two-col-list,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .detail-cover {
        width: 180px;
        height: 250px;
    }
}

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

    .brand-subtitle {
        display: none;
    }

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

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

    .four-col,
    .three-col,
    .category-grid,
    .category-overview-grid,
    .two-col-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 280px;
        height: 280px;
    }

    .rank-list-item {
        grid-template-columns: auto 68px minmax(0, 1fr);
    }

    .rank-list-item img {
        width: 68px;
        height: 50px;
    }
}
