:root {
    --accent: #dc2626;
    --accent-dark: #991b1b;
    --accent-soft: #fee2e2;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 1.25rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    backdrop-filter: blur(18px);
}

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

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

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.30);
}

.logo-text {
    font-size: 1.18rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
    white-space: nowrap;
}

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

.header-search {
    position: relative;
    width: min(260px, 26vw);
}

.header-search input,
.mobile-search input,
.inline-filter input,
.filter-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    padding: 11px 48px 11px 18px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.inline-filter input:focus,
.filter-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;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--accent-soft);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--accent-dark);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

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

.mobile-link {
    display: block;
    padding: 12px 0;
    color: #374151;
    font-weight: 700;
}

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

.mobile-search input {
    padding-right: 18px;
}

.mobile-search button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    padding: 0 18px;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    color: #fff;
    overflow: hidden;
    background: #0f172a;
}

.hero-stage,
.hero-slide,
.hero-backdrop,
.detail-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.38)), var(--hero-poster);
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    background: radial-gradient(circle at 22% 18%, rgba(220, 38, 38, 0.34), transparent 34%), linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.55));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 560px;
    padding-top: 78px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 56px;
}

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

.hero-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.95);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.eyebrow {
    margin-bottom: 12px;
}

.hero-copy h1,
.simple-hero h1,
.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.4rem, 6vw, 4.75rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p,
.simple-hero p,
.detail-copy p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.12rem;
}

.hero-tags,
.detail-meta,
.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.detail-meta span {
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-weight: 650;
}

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

.primary-btn,
.ghost-btn,
.ghost-light-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
    padding: 0 24px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.34);
}

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

.ghost-btn {
    padding: 0 22px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.10);
}

.ghost-light-btn {
    padding: 0 22px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-poster,
.detail-poster {
    position: relative;
    border: 4px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
    transform: rotate(1.5deg);
    transition: transform 0.25s ease;
}

.hero-poster:hover,
.detail-poster:hover {
    transform: rotate(0deg) scale(1.025);
}

.hero-poster img,
.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #111827;
}

.hero-controls {
    position: relative;
    z-index: 4;
    padding-bottom: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    width: 34px;
    background: var(--accent);
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(76px, 1fr));
    gap: 12px;
    max-width: 640px;
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    opacity: 0.70;
}

.hero-thumb.active,
.hero-thumb:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.42);
}

.hero-thumb img {
    width: 42px;
    height: 58px;
    border-radius: 10px;
    object-fit: cover;
    background: #111827;
}

.hero-thumb span {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.section-heading .eyebrow,
.simple-hero .eyebrow,
.detail-copy .eyebrow {
    color: var(--accent);
    background: var(--accent-soft);
}

.section-heading h2,
.cta-panel h2,
.content-block h2,
.side-card h2 {
    margin: 8px 0 0;
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

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

.section-more {
    min-width: 118px;
    padding: 0 18px;
    color: var(--accent);
    background: var(--accent-soft);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.66));
    opacity: 0.75;
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, var(--accent));
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

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

.movie-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-meta span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 7px;
    border-radius: 999px;
    background: #fecaca;
    vertical-align: middle;
}

.movie-card h2 {
    margin: 10px 0 8px;
    font-size: 1.03rem;
    line-height: 1.35;
}

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

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

.tag-row span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #7f1d1d;
    background: #fee2e2;
    font-size: 0.78rem;
    font-weight: 700;
}

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

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

.category-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 24px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #7f1d1d 55%, #dc2626);
    box-shadow: 0 18px 35px rgba(127, 29, 29, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    right: -36px;
    top: -36px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 44px rgba(127, 29, 29, 0.26);
}

.category-tile span {
    position: relative;
    display: block;
    margin-bottom: 10px;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-tile p {
    position: relative;
    margin: 0;
    color: rgba(255, 255, 255, 0.80);
}

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

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

.horizontal-card .poster-link img {
    height: 100%;
}

.horizontal-card .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cta-panel {
    margin-bottom: 56px;
    border-radius: 32px;
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24), transparent 32%), linear-gradient(135deg, #991b1b, #dc2626 52%, #f97316);
    padding: 54px;
    text-align: center;
    box-shadow: 0 25px 55px rgba(220, 38, 38, 0.22);
}

.cta-panel p {
    max-width: 650px;
    margin: 10px auto 26px;
    color: rgba(255, 255, 255, 0.84);
}

.cta-panel div {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.simple-hero {
    color: #fff;
    background: radial-gradient(circle at 15% 20%, rgba(248, 113, 113, 0.35), transparent 32%), linear-gradient(135deg, #111827, #7f1d1d);
    padding: 84px 0 76px;
}

.simple-hero .container {
    max-width: 950px;
}

.simple-hero .eyebrow {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.inline-filter {
    max-width: 560px;
    margin-top: 28px;
}

.inline-filter input,
.filter-input {
    padding-right: 18px;
}

.empty-state {
    margin-top: 28px;
    border-radius: 18px;
    background: #fff;
    color: var(--muted);
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.35)), var(--detail-poster);
    background-size: cover;
    background-position: center;
}

.detail-shade {
    background: radial-gradient(circle at 18% 18%, rgba(220, 38, 38, 0.28), transparent 35%), linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.70));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: center;
    gap: 50px;
    min-height: 560px;
    padding: 68px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.92rem;
}

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

.detail-copy h1 {
    max-width: 820px;
}

.detail-copy p {
    max-width: 780px;
}

.detail-meta {
    margin: 24px 0 30px;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #030712;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.32);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #030712;
    object-fit: contain;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.04), rgba(3, 7, 18, 0.32));
    cursor: pointer;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.94);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
    font-size: 2rem;
    transition: transform 0.2s ease;
}

.play-overlay:hover span {
    transform: scale(1.08);
}

.play-overlay.is-hidden,
.play-overlay[hidden] {
    display: none;
}

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

.detail-article,
.side-card {
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-article {
    padding: 30px;
}

.content-block + .content-block {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.content-block h2,
.side-card h2 {
    font-size: 1.5rem;
}

.content-block p,
.side-card p {
    margin: 12px 0 0;
    color: #374151;
    font-size: 1.02rem;
    line-height: 1.86;
}

.detail-sidebar {
    display: grid;
    gap: 18px;
}

.side-card {
    padding: 24px;
}

.tag-cloud {
    margin-top: 18px;
}

.side-link {
    display: inline-flex;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
    padding-top: 58px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    color: #fff;
    font-size: 1.12rem;
}

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

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 1.05rem;
}

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

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

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

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 12px;
    }

    .nav-link {
        font-size: 0.92rem;
    }

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

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

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

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

    .header-inner {
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
        min-height: auto;
    }

    .hero-slide.active {
        display: block;
    }

    .hero-content,
    .detail-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 34px;
        padding: 56px 0;
    }

    .hero-poster,
    .detail-poster {
        max-width: 280px;
        transform: none;
    }

    .hero-controls {
        display: block;
        padding-top: 18px;
    }

    .hero-dots {
        justify-content: center;
        margin-bottom: 18px;
    }

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

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

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

    .hero-copy h1,
    .simple-hero h1,
    .detail-copy h1 {
        font-size: 2.35rem;
    }

    .page-section {
        padding: 42px 0;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        margin-top: 16px;
    }

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

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

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

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

    .movie-card h2 {
        font-size: 0.96rem;
    }

    .movie-card p {
        font-size: 0.84rem;
    }

    .hero-thumbs {
        display: none;
    }

    .cta-panel {
        padding: 34px 20px;
        border-radius: 24px;
    }

    .detail-article,
    .side-card {
        border-radius: 22px;
        padding: 22px;
    }

    .play-overlay span {
        width: 70px;
        height: 70px;
        font-size: 1.55rem;
    }
}

@media (max-width: 440px) {
    .movie-grid,
    .compact-grid,
    .ranking-grid {
        grid-template-columns: 1fr;
    }

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