:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
    --line: rgba(15, 23, 42, 0.08);
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --accent: #f97316;
    --gold: #f59e0b;
    --radius: 22px;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 0%, rgba(248, 113, 113, 0.16), transparent 32rem),
        radial-gradient(circle at 90% 8%, rgba(249, 115, 22, 0.12), transparent 30rem),
        var(--bg);
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    height: 72px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.26);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-panel a:hover {
    color: var(--primary);
    background: #fee2e2;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fee2e2;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-button span {
    width: 18px;
    height: 2px;
    background: var(--primary-dark);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 8px 22px 20px;
    background: white;
    border-bottom: 1px solid var(--line);
}

.mobile-panel a {
    display: block;
}

main {
    min-height: 70vh;
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 32px 22px 10px;
}

.hero-shell {
    position: relative;
    max-width: 1240px;
    min-height: 640px;
    margin: 0 auto;
    padding: 56px;
    border-radius: 38px;
    color: white;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.86) 52%, rgba(249, 115, 22, 0.82)),
        #0f172a;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
    overflow: hidden;
}

.hero-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.28;
}

.hero-glow-one {
    left: -120px;
    top: 40px;
    background: #ef4444;
}

.hero-glow-two {
    right: -110px;
    bottom: 80px;
    background: #f97316;
}

.hero-slide {
    position: absolute;
    inset: 56px 56px 126px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.62fr);
    gap: 42px;
    align-items: center;
    opacity: 0;
    transform: translateY(18px) scale(0.99);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 900;
}

.hero-copy .eyebrow,
.sub-hero .eyebrow,
.detail-hero .eyebrow,
.ranking-hero .eyebrow {
    color: #fecaca;
}

.hero-copy h1 {
    margin: 16px 0;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.08em;
    max-width: 720px;
}

.hero-copy p {
    max-width: 680px;
    color: #fee2e2;
    line-height: 1.85;
    font-size: 17px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff7ed;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.22s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

.primary-button:hover,
.text-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(220, 38, 38, 0.25);
}

.ghost-button {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    aspect-ratio: 3 / 4.15;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    top: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: white;
    background: rgba(220, 38, 38, 0.88);
    font-size: 13px;
    font-weight: 900;
}

.hero-bottom {
    position: absolute;
    left: 56px;
    right: 56px;
    bottom: 46px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.hero-search,
.filter-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(560px, 100%);
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
}

.hero-search input,
.filter-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
    padding: 0 10px;
}

.hero-search input::placeholder,
.filter-search input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.hero-search button {
    border: 0;
    color: white;
    background: var(--primary);
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 900;
    cursor: pointer;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-dot.active {
    width: 34px;
    background: white;
}

.section-block {
    max-width: 1240px;
    margin: 0 auto;
    padding: 52px 22px;
}

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

.section-heading h2,
.sub-hero h1,
.detail-copy h1,
.story-card h2 {
    margin: 6px 0 0;
    letter-spacing: -0.05em;
}

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

.section-heading p,
.sub-hero p,
.story-card p,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.8;
}

.section-heading a {
    color: var(--primary);
    font-weight: 900;
}

.wide-heading {
    display: block;
    max-width: 780px;
}

.quick-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pill-link {
    padding: 11px 16px;
    border-radius: 999px;
    background: white;
    color: #374151;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
    transition: 0.2s ease;
}

.pill-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

.movie-card:hover img {
    transform: scale(1.04);
}

.score-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
}

.score-pill {
    right: 12px;
    bottom: 12px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(12px);
}

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

.meta-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.meta-line a {
    color: var(--primary);
}

.movie-card h3 {
    min-height: 48px;
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

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

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

.tag-row span {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

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

.compact-card h3 {
    font-size: 16px;
    min-height: 42px;
}

.compact-card p {
    display: none;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    color: white;
    box-shadow: var(--shadow-soft);
}

.category-card img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) brightness(0.78);
    transition: transform 0.28s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.82), transparent 65%);
}

.category-card span,
.category-card p {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
}

.category-card span {
    bottom: 58px;
    font-size: 20px;
    font-weight: 900;
}

.category-card p {
    bottom: 14px;
    margin: 0;
    color: #fee2e2;
    font-size: 13px;
    line-height: 1.45;
}

.category-card:hover img {
    transform: scale(1.06);
}

.filter-panel {
    margin: 0 0 24px;
    padding: 16px;
    border-radius: 24px;
    background: white;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.filter-panel .filter-search {
    width: 100%;
    background: #f3f4f6;
    border: 1px solid var(--line);
}

.filter-panel .filter-search input {
    color: var(--text);
}

.filter-panel .filter-search input::placeholder {
    color: var(--muted);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 800;
    cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.hidden-card {
    display: none;
}

.sub-hero {
    max-width: 1240px;
    margin: 32px auto 0;
    padding: 72px 48px;
    border-radius: 34px;
    color: white;
    background: linear-gradient(135deg, #0f172a, #991b1b 58%, #f97316);
    box-shadow: var(--shadow);
}

.sub-hero h1 {
    max-width: 780px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1;
}

.sub-hero p {
    max-width: 720px;
    color: #fee2e2;
    font-size: 17px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 22px;
    padding: 18px;
    border-radius: 26px;
    background: white;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.text-button {
    min-height: 40px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: white;
}

.detail-hero {
    max-width: 1240px;
    margin: 32px auto 0;
    padding: 42px;
    display: grid;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    border-radius: 34px;
    color: white;
    background: linear-gradient(135deg, #0f172a, #7f1d1d 54%, #f97316);
    box-shadow: var(--shadow);
}

.detail-visual {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
}

.detail-visual img {
    aspect-ratio: 3 / 4.1;
    height: 100%;
    object-fit: cover;
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
}

.detail-copy p {
    color: #fee2e2;
    font-size: 17px;
    line-height: 1.85;
    max-width: 760px;
}

.detail-copy .primary-button {
    margin-top: 26px;
}

.player-section {
    padding-bottom: 24px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
    border: 1px solid rgba(15, 23, 42, 0.12);
}

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

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.68), rgba(127, 29, 29, 0.48));
    cursor: pointer;
}

.play-mask.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.play-icon {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 38px rgba(220, 38, 38, 0.42);
}

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

.play-mask strong {
    font-size: 18px;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 24px;
}

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

.story-card p {
    color: #374151;
}

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

.site-footer {
    margin-top: 38px;
    padding: 46px 22px;
    background: #111827;
    color: white;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.footer-brand {
    font-weight: 900;
    font-size: 22px;
}

.footer-inner p {
    max-width: 560px;
    color: #d1d5db;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    color: #fee2e2;
    font-weight: 800;
}

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

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

    .hero-slide {
        grid-template-columns: 1fr 280px;
    }
}

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

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

    body.menu-open .mobile-panel {
        display: block;
    }

    .hero-shell {
        min-height: 760px;
        padding: 30px;
        border-radius: 28px;
    }

    .hero-slide {
        inset: 30px 30px 150px;
        grid-template-columns: 1fr;
        align-content: start;
        gap: 22px;
    }

    .hero-poster {
        max-width: 280px;
    }

    .hero-bottom {
        left: 30px;
        right: 30px;
        bottom: 28px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-dots {
        justify-content: center;
    }

    .section-heading,
    .footer-inner {
        display: block;
    }

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

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

    .category-overview-card,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .sub-hero,
    .detail-hero {
        margin-left: 16px;
        margin-right: 16px;
        padding: 34px 24px;
        border-radius: 28px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

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

    .hero-section {
        padding: 16px 12px 0;
    }

    .hero-shell {
        min-height: 780px;
        padding: 22px;
    }

    .hero-slide {
        inset: 22px 22px 150px;
    }

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

    .hero-actions {
        gap: 10px;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .section-block {
        padding: 38px 14px;
    }

    .movie-grid,
    .featured-grid,
    .ranking-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 260px;
    }

    .detail-hero {
        gap: 24px;
    }

    .detail-copy h1,
    .sub-hero h1 {
        font-size: 40px;
    }

    .movie-card h3,
    .movie-card p {
        min-height: auto;
    }
}
