:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #f97316;
    --red: #ef4444;
    --amber: #f59e0b;
    --dark: #111827;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 26%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.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.86);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.brand-text {
    font-size: 22px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
    font-weight: 700;
    color: #374151;
}

.main-nav a {
    padding: 9px 10px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--orange);
    background: #fff7ed;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    color: var(--orange);
    font-size: 22px;
    cursor: pointer;
}

main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    margin: 28px auto 48px;
    border-radius: 34px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.44), transparent 30%), linear-gradient(135deg, #111827 0%, #312e81 48%, #7f1d1d 100%);
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.08), transparent 30%, rgba(249,115,22,0.16));
    pointer-events: none;
}

.hero-inner {
    position: relative;
    min-height: 560px;
    padding: clamp(26px, 5vw, 58px);
}

.hero-slide {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 5vw, 76px);
    min-height: 390px;
}

.hero-slide.is-active {
    display: flex;
    animation: fadeUp 0.55s ease both;
}

.hero-copy {
    flex: 1 1 58%;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 12px;
    color: var(--orange);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 8px 12px;
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.btn,
.hero-search button,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
}

.btn.primary,
.hero-search button {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.28);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
    position: relative;
    flex: 0 1 360px;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    transform: rotate(2deg);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
}

.hero-play,
.play-dot {
    position: absolute;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.hero-play {
    left: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    font-size: 24px;
}

.hero-search {
    position: absolute;
    left: clamp(22px, 5vw, 58px);
    right: clamp(22px, 5vw, 58px);
    bottom: 30px;
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

.hero-search input {
    min-width: 0;
    flex: 1;
    height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    color: #111827;
    font-size: 16px;
    outline: none;
}

.hero-dots {
    position: absolute;
    right: clamp(22px, 5vw, 58px);
    bottom: 104px;
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 34px;
    background: #fff;
}

.content-section,
.page-hero,
.detail-layout,
.player-card {
    margin-bottom: 42px;
}

.page-hero {
    padding: 44px;
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #7c2d12 58%, #ef4444);
    box-shadow: var(--shadow);
}

.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p,
.detail-title p {
    max-width: 850px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.9;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.section-more {
    color: var(--orange);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.88);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

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

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    box-shadow: 0 12px 22px rgba(239, 68, 68, 0.28);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, 0.74);
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--orange);
    font-size: 12px;
    font-weight: 900;
}

.card-body h3 {
    min-height: 48px;
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.42;
}

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

.tag-row span,
.detail-tags span {
    padding: 6px 9px;
    color: #9a3412;
    background: #ffedd5;
}

.filter-panel {
    margin: 24px 0;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.search-box input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
    outline: none;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

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

.category-card {
    padding: 22px;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #7c2d12 64%, #f97316);
    box-shadow: var(--shadow);
}

.category-card strong {
    font-size: 24px;
}

.category-card p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.category-count {
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 900;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-line {
    display: grid;
    grid-template-columns: 62px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
}

.list-rank {
    color: var(--orange);
    font-weight: 1000;
}

.rank-title {
    font-weight: 900;
}

.rank-meta {
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb {
    margin: 26px 0 16px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--orange);
    font-weight: 800;
}

.detail-title {
    margin-bottom: 24px;
    padding: 40px;
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #7f1d1d 72%, #f97316);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.info-card {
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    background: #020617;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.64));
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.player-card.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
}

.play-toggle {
    width: 82px;
    height: 82px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-size: 34px;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.34);
}

.player-body,
.info-card {
    padding: 24px;
}

.player-body h2,
.info-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.player-body p,
.info-card p,
.summary-text {
    color: var(--muted);
    line-height: 1.9;
}

.meta-table {
    display: grid;
    gap: 12px;
}

.meta-row {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}

.meta-row span:first-child {
    color: var(--muted);
    font-weight: 800;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
}

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

.site-footer {
    margin-top: 64px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937 60%, #0f172a);
}

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 32px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 38px;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #fb923c;
    font-size: 18px;
}

.site-footer p {
    line-height: 1.8;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
}

.footer-links li {
    margin: 0 0 9px;
}

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    color: var(--muted);
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1120px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .main-nav {
        gap: 8px;
        font-size: 14px;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        border-radius: 20px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

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

    .hero-slide.is-active,
    .detail-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-poster {
        width: min(320px, 100%);
        margin: 0 auto 86px;
    }

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

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

    .rank-line {
        grid-template-columns: 44px 1fr;
    }

    .rank-meta {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    main,
    .nav-wrap,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1240px);
    }

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

    .hero-inner,
    .page-hero,
    .detail-title {
        padding: 24px;
    }

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

    .hero-dots {
        bottom: 146px;
    }

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

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