:root {
    --bg: #faf8f3;
    --surface: #ffffff;
    --surface-soft: #f9fafb;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --red-soft: #fef2f2;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    --radius: 18px;
    --max: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(17, 24, 39, 0.06);
}

.header-inner {
    max-width: var(--max);
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 34px;
    height: 34px;
    color: var(--red);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

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

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #374151;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: #ffffff;
    padding: 12px 24px 18px;
}

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

.mobile-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 650;
    color: #374151;
}

.mobile-link:hover {
    background: var(--surface-soft);
}

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

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

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
}

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

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    font-size: 19px;
    color: #e5e7eb;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

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

.hero-tags,
.detail-meta,
.movie-meta,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags {
    margin-bottom: 32px;
}

.hero-tags span {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #f9fafb;
    backdrop-filter: blur(8px);
    font-size: 14px;
}

.hero-actions,
.detail-copy .primary-button {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.primary-button,
.ghost-button,
.section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.primary-button {
    background: var(--red);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24);
}

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

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

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.25s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.category-strip {
    background: #f9fafb;
    padding: 36px 24px;
}

.category-strip-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.category-strip a,
.filter-pill {
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    color: #374151;
    padding: 12px 18px;
    font-weight: 750;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.category-strip a:hover,
.filter-pill:hover,
.filter-pill.active {
    background: var(--red-soft);
    color: var(--red);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.11);
}

.content-section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px 24px;
}

.white-section {
    max-width: none;
    background: #ffffff;
}

.white-section > .section-heading,
.white-section > .scroll-row,
.white-section > .ranking-list {
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
}

.glow-section {
    max-width: none;
    background: linear-gradient(135deg, #fef2f2, #f9fafb 55%, #ffffff);
}

.glow-section > .section-heading,
.glow-section > .movie-grid {
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
}

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

.section-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.center-heading {
    display: block;
    text-align: center;
}

.center-heading .eyebrow {
    margin: 0 auto;
}

.section-action {
    color: var(--red);
    background: var(--red-soft);
}

.section-action:hover {
    background: var(--red);
    color: #ffffff;
}

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

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

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

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

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

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    width: 286px;
    min-width: 286px;
    scroll-snap-align: start;
}

.movie-card {
    background: #ffffff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.06);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-cover {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: #111827;
}

.card-small .movie-cover {
    height: 210px;
}

.card-large .movie-cover {
    height: 330px;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
}

.year-badge {
    top: 12px;
    right: 12px;
    background: var(--red);
    padding: 4px 9px;
    font-size: 12px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    background: rgba(17, 24, 39, 0.82);
    padding: 5px 10px;
    font-size: 13px;
}

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.48));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}

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

.movie-info p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta span {
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 4px 8px;
    color: #4b5563;
    font-size: 12px;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.compact-list,
.ranking-list {
    display: grid;
    gap: 14px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.05);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

.compact-card img {
    width: 150px;
    height: 112px;
    object-fit: cover;
}

.compact-card div {
    padding: 14px 16px 14px 0;
}

.compact-card h3 {
    margin: 0 0 5px;
    font-size: 18px;
    line-height: 1.3;
}

.compact-card p {
    display: -webkit-box;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card span {
    color: #6b7280;
    font-size: 13px;
}

.compact-rank {
    display: inline-flex;
    margin-bottom: 6px;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff !important;
    padding: 2px 8px;
    font-weight: 800;
}

.ranking-card {
    position: sticky;
    top: 92px;
    border-radius: 24px;
    background: linear-gradient(145deg, #111827, #3f1414);
    color: #ffffff;
    padding: 34px;
    box-shadow: var(--shadow);
}

.ranking-card .eyebrow {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.ranking-card h2 {
    margin: 18px 0 12px;
    font-size: 34px;
    line-height: 1.1;
}

.ranking-card p {
    color: #e5e7eb;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #3f1414);
    color: #ffffff;
}

.page-hero {
    padding: 92px 24px;
}

.page-hero > div {
    max-width: var(--max);
    margin: 0 auto;
}

.page-hero h1 {
    margin: 18px 0 14px;
    max-width: 860px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    color: #e5e7eb;
    font-size: 18px;
}

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

.category-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 140px;
    background: #111827;
}

.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-body {
    padding: 22px;
}

.category-body h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
}

.category-body span {
    color: var(--red);
    font-weight: 800;
}

.search-panel {
    max-width: var(--max);
    margin: 0 auto;
    padding: 48px 24px 0;
}

.search-box {
    max-width: 720px;
    margin: 22px auto 0;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    padding: 17px 20px;
    outline: none;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus {
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.1);
}

.filter-pills {
    max-width: 980px;
    margin: 20px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.hidden-by-filter {
    display: none !important;
}

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

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

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    transform: scale(1.03);
}

.detail-backdrop div {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.35));
}

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 42px 24px 70px;
}

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

.breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.detail-grid {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-copy .lead {
    max-width: 800px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
}

.detail-meta {
    margin: 0 0 20px;
}

.detail-meta span,
.tag-cloud span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #f9fafb;
    backdrop-filter: blur(8px);
}

.tag-cloud {
    margin-bottom: 30px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.article-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #050505;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    pointer-events: auto;
}

.play-layer[hidden] {
    display: none;
}

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 18px 42px rgba(220, 38, 38, 0.36);
    transition: transform 0.25s ease, background 0.25s ease;
}

.play-button:hover {
    background: var(--red-dark);
    transform: scale(1.05);
}

.play-button span {
    display: inline-block;
    margin-left: 5px;
    font-size: 34px;
    line-height: 1;
}

.article-panel {
    padding: 30px;
}

.article-panel h2 {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.2;
}

.article-panel p {
    margin: 0 0 16px;
    color: #374151;
}

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

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

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 54px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1.4fr;
    gap: 36px;
}

.footer-about p {
    max-width: 560px;
    color: #d1d5db;
}

.footer-links {
    display: grid;
    gap: 9px;
    align-content: start;
}

.footer-links h2 {
    margin: 0 0 8px;
    color: #f87171;
    font-size: 18px;
}

.footer-links a {
    color: #d1d5db;
    font-size: 14px;
}

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

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

.footer-categories h2 {
    grid-column: 1 / -1;
}

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-control {
        display: none;
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .featured-grid,
    .movie-grid,
    .editor-grid,
    .all-grid,
    .top-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column-section,
    .detail-content,
    .detail-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        position: static;
    }

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

    .detail-poster img {
        height: 500px;
    }

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

@media (max-width: 640px) {
    .header-inner {
        padding: 0 16px;
    }

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

    .hero {
        min-height: 580px;
    }

    .hero-content {
        padding: 0 18px;
    }

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

    .hero-content p,
    .page-hero p,
    .detail-copy .lead {
        font-size: 16px;
    }

    .hero-tags span:nth-child(n + 5) {
        display: none;
    }

    .content-section,
    .search-panel {
        padding-left: 16px;
        padding-right: 16px;
    }

    .featured-grid,
    .movie-grid,
    .editor-grid,
    .all-grid,
    .top-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .movie-cover,
    .card-small .movie-cover,
    .card-large .movie-cover {
        height: 250px;
    }

    .compact-card {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .compact-card img {
        width: 118px;
        height: 118px;
    }

    .compact-card div {
        padding: 12px 12px 12px 0;
    }

    .compact-card h3 {
        font-size: 16px;
    }

    .page-hero {
        padding: 68px 16px;
    }

    .detail-inner {
        padding: 28px 16px 54px;
    }

    .detail-poster img {
        height: 420px;
    }

    .article-panel {
        padding: 22px;
    }

    .play-button {
        width: 72px;
        height: 72px;
    }
}
