:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --accent: #f97316;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--ink);
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
}

.brand-text {
    font-size: 23px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 13px;
    border-radius: 999px;
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 190px;
    padding: 9px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.18s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 9px 11px;
    border-radius: 10px;
    color: #374151;
    font-size: 14px;
}

.dropdown-panel a:hover {
    color: var(--primary);
    background: #fff1f2;
}

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

.header-search input,
.mobile-search input,
.search-panel input,
.filter-input,
.page-filter-input {
    width: 230px;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0 16px;
    outline: none;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-input:focus,
.page-filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button,
.secondary-button {
    height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

.secondary-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.28);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 11px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #111827;
    border-radius: 10px;
}

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

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

.mobile-panel a {
    display: block;
    padding: 11px 0;
    color: #374151;
    font-weight: 650;
}

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

.mobile-search input {
    width: 100%;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 25%, rgba(249, 115, 22, 0.38), transparent 32%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.72) 46%, rgba(17, 24, 39, 0.18) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.85), rgba(17, 24, 39, 0.10));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 86px 22px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 46px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fed7aa;
    font-weight: 750;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 5vw, 70px);
    line-height: 1.06;
    letter-spacing: -0.055em;
}

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

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

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

.hero-meta span,
.detail-tags span,
.tag-row span,
.meta-chip,
.category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff1f2;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.hero-side {
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
}

.hero-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    background: linear-gradient(135deg, #111827, #991b1b);
}

.hero-side h2 {
    margin: 16px 0 6px;
    font-size: 21px;
    line-height: 1.25;
}

.hero-side small {
    color: rgba(255, 255, 255, 0.76);
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

.main-section,
.page-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 22px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

.movie-card a {
    display: block;
    height: 100%;
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card a:hover {
    transform: translateY(-5px);
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: var(--shadow);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #991b1b);
}

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

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

.card-badge,
.card-score {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.card-score {
    left: auto;
    right: 12px;
    background: rgba(17, 24, 39, 0.82);
}

.card-body {
    padding: 17px;
}

.card-body h3 {
    min-height: 54px;
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 850;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 30px;
    margin-bottom: 13px;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6b7280;
    font-size: 13px;
}

.feature-band {
    background:
        radial-gradient(circle at 15% 5%, rgba(249, 115, 22, 0.16), transparent 30%),
        linear-gradient(135deg, #fff7ed, #fff1f2);
    border-top: 1px solid rgba(254, 202, 202, 0.65);
    border-bottom: 1px solid rgba(254, 202, 202, 0.65);
}

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

.category-card {
    display: block;
    padding: 24px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 36px rgba(220, 38, 38, 0.20);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #9333ea, #db2777);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.category-card:nth-child(4n) {
    background: linear-gradient(135deg, #16a34a, #059669);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 44px rgba(15, 23, 42, 0.18);
}

.category-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 8px;
}

.category-card span {
    color: rgba(255, 255, 255, 0.82);
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
}

.rank-list,
.side-panel,
.detail-panel,
.search-box,
.category-hero,
.player-shell,
.detail-card {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.rank-list {
    padding: 18px;
}

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

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

.rank-row + .rank-row {
    border-top: 1px solid #f3f4f6;
}

.rank-index {
    font-size: 25px;
    font-weight: 900;
    color: var(--primary);
}

.rank-row img {
    width: 120px;
    height: 78px;
    border-radius: 14px;
    object-fit: cover;
    background: #111827;
}

.rank-row h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

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

.rank-score {
    font-size: 18px;
    font-weight: 900;
    color: #f59e0b;
}

.side-panel {
    position: sticky;
    top: 88px;
    padding: 20px;
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

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

.compact-card:hover {
    background: #f9fafb;
}

.compact-card img {
    width: 74px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.compact-card strong {
    display: block;
    font-size: 14px;
    line-height: 1.3;
}

.compact-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.rank-num {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #fff1f2;
    font-weight: 900;
}

.category-hero,
.search-box {
    padding: 32px;
    margin-bottom: 28px;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.17), transparent 30%),
        #fff;
}

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

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

.page-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.page-intro {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
}

.filter-bar,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 22px;
}

.filter-input,
.page-filter-input {
    width: min(460px, 100%);
}

.search-empty {
    display: none;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--line);
}

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

.detail-hero {
    color: #fff;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.76)),
        linear-gradient(135deg, var(--primary), var(--accent));
}

.detail-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 22px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-cover img {
    width: 260px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    background: #111827;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.detail-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

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

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

.detail-meta span {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.detail-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #030712;
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #030712;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(220, 38, 38, 0.22), transparent 40%),
        rgba(3, 7, 18, 0.38);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.play-button::before {
    content: "";
    display: block;
    margin-left: 32px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 23px solid #fff;
}

.detail-card {
    margin-top: 24px;
    padding: 26px;
}

.detail-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 14px;
    color: #374151;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.meta-table {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.meta-table div {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    color: #374151;
}

.meta-table strong {
    color: #111827;
}

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

.related-grid .movie-card .card-body h3 {
    min-height: auto;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, #111827, #030712);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 1.2fr 1.4fr auto;
    gap: 28px;
    align-items: start;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
}

.footer-inner p {
    max-width: 420px;
    margin: 14px 0 0;
    color: #9ca3af;
}

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

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

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

.footer-copy {
    color: #9ca3af;
}

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

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

    .ranking-layout,
    .detail-layout,
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-side {
        display: none;
    }

    .side-panel {
        position: static;
    }
}

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

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

    .header-inner {
        height: 64px;
    }

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

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

    .hero-content {
        padding-top: 70px;
    }

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

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

    .rank-row img {
        width: 90px;
        height: 62px;
    }

    .rank-score {
        grid-column: 3;
    }

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

    .detail-cover img {
        width: 200px;
    }

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

@media (max-width: 560px) {
    .main-section,
    .page-wrap,
    .detail-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-content {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .section-head {
        display: block;
    }

    .section-head .text-link {
        display: inline-block;
        margin-top: 12px;
    }

    .category-hero,
    .search-box,
    .detail-card {
        padding: 22px;
        border-radius: 18px;
    }

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

    .play-button::before {
        margin-left: 25px;
        border-top-width: 12px;
        border-bottom-width: 12px;
        border-left-width: 19px;
    }
}
