* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --red-soft: #fee2e2;
    --blue: #2563eb;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --body: #f8fafc;
    --dark: #0f172a;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.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.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 900;
    color: var(--ink);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), #f97316);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #374151;
    font-weight: 700;
    white-space: nowrap;
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--red);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: 320px;
    padding: 6px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid transparent;
}

.header-search:focus-within {
    border-color: rgba(220, 38, 38, 0.35);
    background: #fff;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--ink);
}

.header-search button,
.mobile-search button {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 8px 14px;
    background: var(--red);
    color: #fff;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f3f4f6;
    color: var(--ink);
    font-size: 22px;
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

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

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background: #f3f4f6;
}

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

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

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #0b1120;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.64) 45%, rgba(0, 0, 0, 0.2) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.85), transparent 46%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-content-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    color: #fff;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 18px 36px rgba(220, 38, 38, 0.32);
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 80px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.06em;
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

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

.btn-primary {
    color: #fff;
    background: var(--red);
    box-shadow: 0 18px 32px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.btn-light {
    color: var(--red);
    background: #fff;
}

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

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    transform: translateY(-50%);
    font-size: 30px;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--red);
}

.section,
.page-hero,
.detail-layout,
.category-grid,
.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: 48px 0;
}

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

.section-header h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: var(--ink);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-header p,
.page-hero p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-header a {
    color: var(--red);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #374151);
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.rank-number {
    position: absolute;
    z-index: 3;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--red);
    color: #fff;
    font-style: normal;
    font-weight: 950;
}

.movie-card-body {
    padding: 14px;
}

.movie-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.movie-card-meta strong {
    margin-left: auto;
    color: #f59e0b;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 950;
}

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

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--red-dark);
    background: var(--red-soft);
    font-size: 12px;
    font-weight: 800;
}

.feature-band {
    border-radius: 30px;
    padding: 32px;
    background: linear-gradient(135deg, #fff1f2, #eff6ff);
}

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

.rank-panel {
    border-radius: 24px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.rank-panel h2,
.rank-panel h3 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 950;
}

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

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

.rank-item:hover {
    background: #fff1f2;
    transform: translateX(4px);
}

.rank-index {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-weight: 950;
}

.rank-item:nth-child(1) .rank-index,
.rank-item:nth-child(2) .rank-index,
.rank-item:nth-child(3) .rank-index {
    background: var(--red);
}

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

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info small {
    color: var(--muted);
}

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

.category-card {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 22px;
    border-radius: 28px;
    color: #fff;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 30%), linear-gradient(135deg, var(--red), #111827);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.category-card:nth-child(3n + 2) {
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 30%), linear-gradient(135deg, #2563eb, #111827);
}

.category-card:nth-child(3n) {
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 30%), linear-gradient(135deg, #f97316, #111827);
}

.category-card strong {
    font-size: 24px;
    font-weight: 950;
}

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

.page-hero {
    padding: 54px 0 22px;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px 160px;
    gap: 12px;
    padding: 16px;
    margin: 18px 0 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.filter-bar label {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    background: #f3f4f6;
}

.filter-empty {
    display: none;
    margin: 30px 0;
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

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

.breadcrumb {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--red);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 28px 0 50px;
}

.detail-main,
.detail-side,
.player-card,
.content-card {
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
    background: #050607;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.12));
}

.player-overlay.is-hidden {
    display: none;
}

.play-button {
    display: inline-flex;
    width: 88px;
    height: 88px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.95);
    box-shadow: 0 18px 50px rgba(220, 38, 38, 0.36);
    font-size: 34px;
    transform: translateZ(0);
}

.player-caption {
    padding: 18px 22px;
    color: #e5e7eb;
}

.player-caption h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 950;
}

.player-caption p {
    margin: 8px 0 0;
    color: #cbd5e1;
}

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

.content-card h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.content-card p {
    margin: 0 0 16px;
    color: #374151;
}

.detail-side {
    overflow: hidden;
    align-self: start;
}

.detail-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

.detail-info {
    padding: 22px;
}

.meta-list {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.meta-list dt {
    color: var(--muted);
}

.meta-list dd {
    margin: 0;
    text-align: right;
    font-weight: 900;
}

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

.related-grid .movie-card p {
    display: none;
}

.related-grid .movie-card-body {
    padding: 12px;
}

.related-grid .movie-card h3 {
    font-size: 15px;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-brand {
    display: grid;
    gap: 12px;
    align-content: start;
}

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

.footer-brand p {
    margin: 0;
    color: #9ca3af;
}

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

.footer-links div {
    display: grid;
    gap: 8px;
}

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

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

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

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        min-height: 560px;
    }

    .hero-control {
        display: none;
    }

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

    .detail-side {
        order: -1;
    }

    .detail-cover {
        max-height: 520px;
    }

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .header-inner {
        height: 64px;
    }

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

    .hero {
        min-height: 520px;
    }

    .hero p {
        font-size: 16px;
    }

    .section {
        padding: 34px 0;
    }

    .section-header {
        display: block;
    }

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

    .category-grid {
        grid-template-columns: 1fr;
        padding: 34px 0;
    }

    .feature-band {
        padding: 20px;
        border-radius: 22px;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card-body {
        padding: 12px;
    }

    .movie-card p {
        min-height: 40px;
        font-size: 13px;
    }
}
