:root {
    color-scheme: dark;
    --bg: #08090d;
    --bg-soft: #11131a;
    --card: rgba(19, 22, 31, 0.86);
    --card-solid: #151923;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f7f7fb;
    --muted: #a9afbd;
    --primary: #ef4444;
    --primary-dark: #b91c1c;
    --orange: #f97316;
    --pink: #ec4899;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius-lg: 28px;
    --radius: 18px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at 10% 0%, rgba(239, 68, 68, 0.18), transparent 32%), radial-gradient(circle at 88% 16%, rgba(249, 115, 22, 0.16), transparent 28%), var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 9, 13, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
}

.header-shell,
.footer-shell,
.detail-shell,
.section-block,
.quick-categories,
.filter-bar,
.ranking-board,
.detail-content,
.player-section,
.page-hero {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.header-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    box-shadow: 0 16px 40px rgba(239, 68, 68, 0.35);
}

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

.nav-link,
.mobile-link {
    color: var(--muted);
    border-radius: 999px;
    padding: 10px 16px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.18);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(20, 23, 31, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

.hero {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    min-height: 720px;
    margin: 28px auto 68px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 38px;
    background: #07080c;
    box-shadow: var(--shadow);
}

.hero-glow {
    position: absolute;
    inset: auto auto -18% -8%;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.28);
    filter: blur(70px);
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0.82fr;
    align-items: stretch;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

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

.hero-media {
    position: relative;
    min-height: 100%;
}

.hero-media::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 9, 13, 0.1), rgba(8, 9, 13, 0.88) 72%), linear-gradient(0deg, rgba(8, 9, 13, 0.88), transparent 60%);
}

.hero-media img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 88px 72px 150px 24px;
}

.eyebrow {
    margin: 0;
    color: #ffb3b3;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-weight: 950;
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(34px, 5.3vw, 74px);
}

.hero h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 3.2vw, 46px);
    font-weight: 900;
}

.hero p,
.page-hero p,
.ranking-copy p,
.detail-info .lead-text {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    color: #ffd6d6;
    border: 1px solid rgba(239, 68, 68, 0.36);
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
}

.hero-actions,
.center-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    box-shadow: 0 18px 36px rgba(239, 68, 68, 0.28);
}

.ghost-button,
.section-more {
    color: #ffffff;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.movie-card:hover,
.category-tile:hover,
.ranking-item:hover {
    transform: translateY(-3px);
}

.hero-panel {
    position: absolute;
    right: 28px;
    bottom: 28px;
    left: 28px;
    z-index: 5;
    display: flex;
    gap: 16px;
    align-items: stretch;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(11, 13, 18, 0.72);
    backdrop-filter: blur(20px);
}

.hero-search {
    display: grid;
    gap: 8px;
    min-width: min(560px, 100%);
}

.hero-search label {
    color: #ffffff;
    font-weight: 800;
}

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

.hero-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    color: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.09);
    padding: 0 14px;
}

.hero-search button {
    min-width: 92px;
    color: #ffffff;
    border: 0;
    border-radius: 16px;
    background: var(--primary);
    cursor: pointer;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: flex-end;
    gap: 10px;
}

.hero-links a {
    padding: 10px 14px;
    color: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-dots {
    position: absolute;
    right: 38px;
    top: 38px;
    z-index: 6;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 32px;
    border-radius: 999px;
    background: #ffffff;
}

.section-block,
.quick-categories,
.filter-bar,
.ranking-board,
.detail-content,
.player-section,
.page-hero {
    margin-bottom: 72px;
}

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

.section-heading.centered {
    justify-content: center;
    text-align: center;
}

.section-heading h2,
.filter-copy h2,
.ranking-copy h2,
.story-card h2 {
    margin: 6px 0 0;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 920;
    letter-spacing: -0.03em;
}

.section-heading span,
.category-tile strong,
.category-tile em {
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.12), rgba(255, 255, 255, 0.035));
}

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

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

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

.poster-year,
.poster-type {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(10px);
}

.poster-year {
    left: 12px;
}

.poster-type {
    right: 12px;
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.card-meta {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    color: #ffb3b3;
    font-size: 13px;
}

.card-body h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

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

.category-tile {
    display: grid;
    gap: 12px;
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.13), rgba(249, 115, 22, 0.05));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    border-color: rgba(249, 115, 22, 0.45);
}

.category-tile span {
    color: #ffffff;
    font-size: 23px;
    font-weight: 900;
}

.category-tile strong,
.category-tile em {
    font-style: normal;
    font-weight: 500;
}

.ranking-strip {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 26px;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 72px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(17, 19, 26, 0.96));
}

.ranking-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 42px 56px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
    transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-item img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-number {
    color: #ffb3b3;
    font-size: 20px;
    font-weight: 950;
    text-align: center;
}

.rank-title {
    color: #ffffff;
    font-weight: 850;
}

.ranking-item small {
    color: var(--muted);
}

.page-hero {
    margin-top: 38px;
    padding: 64px 48px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(255, 255, 255, 0.035));
    box-shadow: var(--shadow);
}

.page-hero.slim h1 {
    margin: 8px 0 14px;
    font-size: clamp(34px, 5vw, 66px);
}

.filter-bar {
    display: grid;
    grid-template-columns: 0.68fr 1.32fr;
    gap: 24px;
    align-items: end;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.045);
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 0.8fr);
    gap: 12px;
}

.filter-controls select {
    color: #ffffff;
}

.filter-controls option {
    color: #11131a;
}

.page-list {
    margin-top: -36px;
}

.detail-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    margin-bottom: 52px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.58;
}

.detail-backdrop::after {
    background: linear-gradient(90deg, rgba(8, 9, 13, 0.98) 0%, rgba(8, 9, 13, 0.68) 46%, rgba(8, 9, 13, 0.2)), linear-gradient(0deg, #08090d 0%, transparent 55%);
}

.detail-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding-top: 68px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.detail-info h1 {
    font-size: clamp(38px, 6vw, 78px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
}

.breadcrumb a {
    color: #ffffff;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.18), rgba(0, 0, 0, 0.68));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    box-shadow: 0 20px 55px rgba(239, 68, 68, 0.35);
}

.play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.story-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--card);
}

.story-card.accent {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(255, 255, 255, 0.04));
}

.story-card p:last-child {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.9;
}

.related-section {
    margin-bottom: 88px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.28);
}

.footer-shell {
    display: grid;
    gap: 16px;
    padding: 38px 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #ffffff;
}

.is-hidden-card {
    display: none !important;
}

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

    .hero-slide,
    .ranking-strip,
    .filter-bar,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 80px 46px 190px;
    }

    .hero-media {
        position: absolute;
        inset: 0;
        opacity: 0.46;
    }

    .hero-panel {
        flex-direction: column;
    }

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

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

    .menu-button {
        display: flex;
    }

    .header-shell {
        height: 66px;
    }

    .hero {
        min-height: 760px;
        border-radius: 26px;
    }

    .hero-content {
        padding: 62px 24px 250px;
    }

    .hero-panel {
        right: 16px;
        bottom: 16px;
        left: 16px;
        padding: 14px;
        border-radius: 22px;
    }

    .hero-search div,
    .hero-links,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search button,
    .primary-button,
    .ghost-button,
    .section-more {
        width: 100%;
    }

    .movie-grid,
    .movie-grid.wide,
    .category-grid,
    .ranking-list.full,
    .filter-controls,
    .detail-shell {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 42px 24px;
        border-radius: 26px;
    }

    .ranking-item {
        grid-template-columns: 34px 50px 1fr;
    }

    .ranking-item small {
        grid-column: 3;
    }

    .detail-hero {
        min-height: auto;
        padding-bottom: 48px;
    }

    .detail-shell {
        padding-top: 34px;
    }

    .detail-poster {
        max-width: 260px;
    }
}
