:root {
    --brand: #dc2626;
    --brand-dark: #7f1d1d;
    --brand-soft: #fee2e2;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f8fafc;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--soft);
    color: var(--ink);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
    white-space: nowrap;
}

.site-logo-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #7f1d1d);
    box-shadow: 0 12px 22px rgba(220, 38, 38, 0.28);
    letter-spacing: -0.05em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--brand);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 300px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f9fafb;
}

.header-search input,
.mobile-search input,
.quick-search-form input,
.filter-panel input,
.search-panel-large input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.header-search button,
.mobile-search button,
.quick-search-form button,
.search-panel-large button,
.primary-button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    font-weight: 800;
    padding: 10px 18px;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.quick-search-form button:hover,
.search-panel-large button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(220, 38, 38, 0.32);
}

.mobile-menu-button {
    display: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 12px;
    color: var(--ink);
    background: #ffffff;
}

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

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

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

.hero {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(248, 113, 113, 0.45), transparent 32%), linear-gradient(120deg, #7f1d1d, #991b1b 48%, #111827);
    color: #ffffff;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.84), rgba(127, 29, 29, 0.58), rgba(17, 24, 39, 0.68));
    z-index: 2;
}

.hero-track {
    position: relative;
    z-index: 3;
    min-height: 590px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
    gap: 44px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-copy {
    position: relative;
    z-index: 3;
    max-width: 720px;
}

.eyebrow,
.section-heading span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fecaca;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin-top: 16px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 670px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.detail-tags,
.side-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.side-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 750;
}

.tag-row span {
    color: #991b1b;
    background: #fee2e2;
}

.detail-tags span,
.side-tags span {
    color: #7f1d1d;
    background: #fee2e2;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    text-decoration: none;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px;
    color: #ffffff;
    padding: 10px 18px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
}

.ghost-button.dark {
    color: #7f1d1d;
    border-color: #fecaca;
    background: #fff7f7;
}

.hero-poster {
    position: relative;
    z-index: 3;
    display: block;
    aspect-ratio: 3 / 4.15;
    max-height: 480px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    height: 100%;
}

.hero-backdrop {
    position: absolute;
    inset: -90px -130px auto auto;
    z-index: 1;
    width: 62%;
    height: 122%;
    opacity: 0.2;
    filter: blur(4px) saturate(1.3);
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

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

.quick-search-section {
    position: relative;
    z-index: 8;
    margin-top: -48px;
}

.quick-search-card,
.filter-panel,
.search-panel-large,
.content-card,
.side-card,
.player-card,
.category-overview-block {
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.quick-search-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.8fr);
    gap: 22px;
    align-items: center;
    padding: 24px;
}

.quick-search-card h2,
.filter-panel h2 {
    font-size: 24px;
    font-weight: 900;
}

.quick-search-card p,
.filter-panel p,
.category-intro {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.75;
}

.quick-search-form,
.search-panel-large form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.category-pills {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pills a,
.filter-tags button {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 13px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    color: #991b1b;
    background: #fff7f7;
    font-weight: 750;
}

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

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

.section-heading h2 {
    margin-top: 6px;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--brand);
    font-weight: 850;
}

.section-heading.light {
    color: #ffffff;
}

.section-heading.light a {
    color: #fecaca;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #fecaca;
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    height: 100%;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.055);
    filter: saturate(1.12);
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    font-weight: 950;
}

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

.movie-card h3 {
    min-height: 52px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.45;
}

.movie-card h3 a:hover,
.ranking-content h3 a:hover {
    color: var(--brand);
}

.movie-meta {
    margin-top: 8px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
}

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

.ranking-band {
    background: radial-gradient(circle at 15% 20%, rgba(239, 68, 68, 0.32), transparent 28%), linear-gradient(135deg, #111827, #7f1d1d 62%, #111827);
}

.horizontal-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 260px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.horizontal-cards .movie-card {
    scroll-snap-align: start;
}

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

.category-tile {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-tile h3 {
    font-size: 24px;
    font-weight: 920;
}

.category-tile h3 a:hover {
    color: var(--brand);
}

.category-tile p {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.8;
}

.category-sample {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-sample a {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 13px;
    font-weight: 750;
}

.page-hero {
    padding: 86px 0 76px;
    color: #ffffff;
}

.page-hero-red {
    background: radial-gradient(circle at 25% 12%, rgba(248, 113, 113, 0.48), transparent 30%), linear-gradient(120deg, #7f1d1d, #b91c1c);
}

.page-hero-dark {
    background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.3), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d);
}

.page-hero h1 {
    margin-top: 10px;
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.categories-overview {
    display: grid;
    gap: 36px;
}

.category-overview-block {
    padding: 26px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(280px, 0.45fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
    padding: 22px;
}

.filter-panel input {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    background: #f3f4f6;
}

.filter-tags {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-panel-large {
    padding: 18px;
    margin-bottom: 26px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 72px 56px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.ranking-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

.ranking-cover img {
    height: 100%;
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #ffffff;
    background: #111827;
    font-weight: 950;
}

.ranking-content h3 {
    font-size: 19px;
    font-weight: 900;
}

.ranking-content p {
    display: -webkit-box;
    margin: 6px 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.6;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.ranking-content span {
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
}

.ranking-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    color: #991b1b;
    background: #fee2e2;
    font-weight: 850;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0;
    color: #ffffff;
    background: linear-gradient(130deg, #111827, #7f1d1d);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    filter: blur(3px) saturate(1.2);
}

.detail-backdrop img {
    height: 100%;
}

.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: 2;
    display: grid;
    grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 66px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 750;
}

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

.detail-copy h1 {
    margin-top: 18px;
    font-size: clamp(36px, 5vw, 62px);
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 780px;
    margin: 16px 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

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

.video-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.video-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.38), rgba(2, 6, 23, 0.38));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-start span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.94);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
    font-size: 30px;
    transform: translateX(3px);
}

.video-start.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.content-card h2,
.side-card h2 {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 930;
}

.content-card p {
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.side-card dl {
    display: grid;
    gap: 12px;
}

.side-card dl div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    font-weight: 850;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 30px;
}

.footer-logo {
    color: #ffffff;
}

.footer-inner p {
    max-width: 520px;
    margin-top: 12px;
    line-height: 1.8;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    text-align: center;
}

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

    .header-search {
        margin-left: auto;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

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

@media (max-width: 860px) {
    .site-header-inner {
        gap: 12px;
    }

    .header-search {
        display: none;
    }

    .hero {
        min-height: 720px;
    }

    .hero-track {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        align-content: center;
        padding: 42px 0 82px;
    }

    .hero-poster {
        max-width: 250px;
        max-height: none;
        margin: 0 auto;
    }

    .quick-search-card,
    .filter-panel,
    .detail-hero-inner,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .ranking-row {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .ranking-number {
        position: absolute;
        margin-left: 44px;
        margin-top: -44px;
        width: 34px;
        height: 34px;
    }

    .ranking-link {
        grid-column: 1 / -1;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .site-logo {
        font-size: 18px;
    }

    .site-logo-mark {
        width: 36px;
        height: 36px;
    }

    .hero h1,
    .hero h2 {
        font-size: 42px;
    }

    .movie-grid,
    .compact-grid,
    .category-page-grid,
    .search-grid {
        grid-template-columns: 1fr;
    }

    .quick-search-form,
    .search-panel-large form,
    .mobile-search {
        border-radius: 18px;
        flex-direction: column;
    }

    .detail-cover {
        max-width: 260px;
        margin: 0 auto;
    }
}
