:root {
    color-scheme: light;
    --page: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #1f2937;
    --muted: #64748b;
    --border: #e2e8f0;
    --accent: #dc2626;
    --accent-dark: #b91c1c;
    --accent-soft: #fee2e2;
    --rose: #e11d48;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 45%, #f1f5f9 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

img {
    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: 100;
    background: linear-gradient(90deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

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

.brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--rose));
    border-radius: 12px;
    box-shadow: 0 12px 22px rgba(220, 38, 38, 0.25);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08) rotate(-2deg);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    color: #111827;
}

.brand-text small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
}

.main-nav a {
    color: #334155;
    font-weight: 650;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--accent-dark);
}

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

.header-search input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.mobile-panel input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.header-search button {
    position: absolute;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--accent);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #334155;
    background: transparent;
    font-size: 28px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 10px;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.mobile-panel input {
    min-width: 0;
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    outline: none;
}

.mobile-panel button,
.btn,
.filter-button {
    border: 0;
    color: #ffffff;
    background: var(--accent);
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.mobile-panel button {
    padding: 10px 18px;
}

.mobile-panel a {
    padding: 10px 14px;
    color: #334155;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
}

.mobile-panel a:hover {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.hero-slider {
    position: relative;
    height: 580px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55) 48%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 78px;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fecaca;
    font-weight: 750;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
}

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

.hero-meta span,
.detail-meta span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 13px;
    font-weight: 650;
}

.hero-meta .hero-category {
    background: var(--accent);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    box-shadow: 0 14px 24px rgba(220, 38, 38, 0.22);
}

.btn:hover,
.filter-button:hover {
    transform: translateY(-2px);
    background: var(--accent-dark);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
    backdrop-filter: blur(12px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.34);
    transform: translateY(-50%) scale(1.05);
}

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

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

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

.section {
    padding: 64px 0 0;
}

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

.section-header h2,
.page-title h1,
.detail-content h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.18;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.section-header p,
.page-title p,
.category-card p,
.detail-content p,
.search-panel p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-link {
    color: var(--accent-dark);
    font-weight: 750;
    white-space: nowrap;
}

.movie-rail {
    display: flex;
    gap: 22px;
    padding-bottom: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.movie-rail::-webkit-scrollbar {
    height: 8px;
}

.movie-rail::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

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

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

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

.movie-card-rail {
    flex: 0 0 310px;
    scroll-snap-align: start;
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #475569);
}

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

.movie-card:hover .movie-poster img {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.08);
}

.movie-score {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.movie-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(10px);
}

.movie-card:hover .movie-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    min-height: 52px;
    margin: 8px 0 6px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 820;
}

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-tags span {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.category-card::before {
    content: "";
    position: absolute;
    right: -42px;
    top: -42px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.2), transparent 62%);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 8px;
    color: #111827;
    font-size: 22px;
}

.category-card a {
    position: relative;
    display: inline-flex;
    margin-top: 18px;
    color: var(--accent-dark);
    font-weight: 800;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 44px 78px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-item:hover {
    border-color: rgba(220, 38, 38, 0.28);
    transform: translateX(4px);
}

.ranking-number {
    color: var(--accent);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

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

.ranking-info strong,
.ranking-info small {
    display: block;
}

.ranking-info strong {
    color: #111827;
    font-size: 16px;
}

.ranking-info small {
    margin-top: 4px;
    color: var(--muted);
}

.ranking-heat {
    color: var(--accent-dark);
    font-weight: 850;
}

.page-hero {
    padding: 72px 0 42px;
    background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.12), transparent 34%), linear-gradient(135deg, #ffffff, #f8fafc);
    border-bottom: 1px solid var(--border);
}

.page-title {
    max-width: 820px;
}

.search-panel,
.filter-bar {
    display: grid;
    gap: 14px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.search-panel {
    margin-top: 30px;
}

.search-panel form,
.filter-bar {
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
}

.search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    outline: none;
}

.filter-button {
    min-height: 44px;
    padding: 0 20px;
}

.filter-empty {
    display: none;
    padding: 26px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 58px 0;
    background: #020617;
    color: #ffffff;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.42;
}

.detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.1);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.55));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}

.detail-content h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
}

.detail-content p {
    max-width: 780px;
    color: #e2e8f0;
    font-size: 18px;
}

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

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

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

.player-section {
    padding-top: 46px;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.2), rgba(0, 0, 0, 0.72));
    opacity: 1;
    transition: opacity 0.25s ease;
}

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

.player-start {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.76);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.9);
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.38);
    font-size: 34px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-start:hover {
    background: var(--accent-dark);
    transform: scale(1.06);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    padding-top: 42px;
}

.prose-card,
.side-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.prose-card + .prose-card {
    margin-top: 22px;
}

.prose-card h2,
.side-card h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 24px;
}

.prose-card p {
    margin: 0;
    color: #475569;
    font-size: 17px;
}

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

.side-link {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
}

.side-link img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
}

.side-link strong,
.side-link small {
    display: block;
}

.side-link strong {
    color: #111827;
    line-height: 1.35;
}

.side-link small {
    margin-top: 5px;
    color: var(--muted);
}

.site-footer {
    margin-top: 72px;
    padding: 46px 0;
    color: #cbd5e1;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 34px;
}

.footer-brand {
    display: inline-flex;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 850;
}

.footer-grid p {
    max-width: 560px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-content: start;
}

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

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

    .mobile-toggle {
        display: block;
    }

    .header-search {
        flex: 0 0 230px;
        margin-left: auto;
    }

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

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

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

    .hero-slider {
        height: 520px;
    }

    .hero-control {
        display: none;
    }

    .hero-content {
        bottom: 68px;
    }

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

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

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

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

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

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

    .brand-text small {
        display: none;
    }

    .hero-slider {
        height: 500px;
    }

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

    .hero-actions {
        display: grid;
    }

    .section {
        padding-top: 46px;
    }

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

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

    .movie-card-rail {
        flex-basis: 82vw;
    }

    .ranking-item {
        grid-template-columns: 36px 72px 1fr;
    }

    .ranking-heat {
        display: none;
    }

    .prose-card,
    .side-card {
        padding: 22px;
    }
}
