:root {
    color-scheme: dark;
    --bg: #05070d;
    --bg-soft: #0b1020;
    --panel: rgba(17, 24, 39, 0.86);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f9fafb;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --amber: #f59e0b;
    --orange: #ea580c;
    --red: #ef4444;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at 82% 10%, rgba(234, 88, 12, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #05070d 38%, #080b14 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 13px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.24);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #d1d5db;
    font-weight: 700;
    font-size: 15px;
}

.nav-link {
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--amber);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.8);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 999px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    padding: 74px 0 50px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% -12% auto auto;
    width: 580px;
    height: 580px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 65%);
    filter: blur(8px);
    pointer-events: none;
}

.hero-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(340px, 0.78fr);
    gap: 34px;
    align-items: stretch;
}

.hero-copy {
    position: relative;
    z-index: 2;
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(3, 7, 18, 0.72));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.2);
    filter: blur(4px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.08);
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 22px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.gradient-text {
    background: linear-gradient(90deg, #ffffff, #fbbf24 46%, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-intro,
.page-hero p,
.detail-title p {
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.9;
    max-width: 760px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 900;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border: 0;
    box-shadow: 0 16px 40px rgba(234, 88, 12, 0.24);
    cursor: pointer;
}

.btn.secondary {
    color: var(--text);
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--line);
    box-shadow: none;
}

.hero-search,
.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 32px;
}

.hero-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.68);
    padding: 15px 16px;
    outline: none;
}

.filter-bar select {
    min-width: 150px;
}

.hero-slider {
    position: relative;
    min-height: 590px;
    border-radius: 32px;
    overflow: hidden;
    background: #111827;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 38%, rgba(0, 0, 0, 0.9) 100%);
}

.hero-slide-content {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 32px;
}

.hero-slide-content h2 {
    margin: 10px 0;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.1;
}

.hero-slide-content p {
    color: #e5e7eb;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    right: 28px;
    top: 28px;
    display: flex;
    gap: 9px;
}

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

.hero-dot.active {
    width: 26px;
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.section {
    padding: 44px 0;
}

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

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

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more {
    color: #fbbf24;
    font-weight: 900;
}

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

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

.movie-card {
    min-width: 0;
}

.poster-link {
    display: block;
    height: 100%;
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.poster-link:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

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

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.poster-link:hover img {
    transform: scale(1.07);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.54));
}

.poster-badge,
.rank-index,
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.poster-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 13px;
}

.poster-play {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
}

.card-body {
    display: flex;
    min-height: 142px;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.card-body strong {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
}

.card-body span {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
}

.card-body em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-box,
.rank-row,
.info-card,
.related-panel,
.detail-panel {
    border: 1px solid var(--line);
    background: rgba(17, 24, 39, 0.78);
    border-radius: var(--radius);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.category-box {
    padding: 22px;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.category-box h2,
.category-box h3,
.info-card h2,
.related-panel h2,
.detail-panel h2 {
    margin: 0;
}

.category-box p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
}

.tag {
    min-height: 28px;
    padding: 0 10px;
    font-size: 13px;
}

.page-hero {
    padding: 58px 0 20px;
}

.page-hero .panel {
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(3, 7, 18, 0.76));
    box-shadow: var(--shadow);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 12px 16px;
}

.rank-index {
    width: 40px;
    height: 40px;
}

.rank-row img {
    width: 96px;
    height: 132px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.rank-meta {
    color: #fbbf24;
    font-weight: 900;
    white-space: nowrap;
}

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

.detail-title {
    padding: 44px 0 16px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #fbbf24;
    font-weight: 800;
    font-size: 14px;
}

.player-card {
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: #020617;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.32);
}

.player-cover.hidden {
    display: none;
}

.play-button {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #111827;
    font-size: 34px;
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.36);
    cursor: pointer;
}

.detail-panel,
.related-panel,
.info-card {
    padding: 24px;
}

.detail-panel p,
.info-card p {
    color: #d1d5db;
    line-height: 1.95;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.meta-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.5);
}

.meta-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.meta-item strong {
    display: block;
    margin-top: 4px;
}

.related-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.related-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.48);
    transition: background 0.2s ease;
}

.related-item:hover {
    background: rgba(245, 158, 11, 0.1);
}

.related-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.related-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 70px;
    background: rgba(3, 7, 18, 0.86);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 1.1fr;
    gap: 34px;
    padding: 44px 0;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer a {
    display: block;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--amber);
}

.footer-tags {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.footer-bottom {
    padding: 18px 0 28px;
    color: #6b7280;
    text-align: center;
    border-top: 1px solid var(--line);
}

.no-results {
    display: none;
    padding: 20px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.no-results.show {
    display: block;
}

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

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

    .hero-shell,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        min-height: 520px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 76px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(3, 7, 18, 0.96);
    }

    .site-nav.open {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding-top: 34px;
    }

    .hero-copy,
    .page-hero .panel,
    .detail-panel,
    .related-panel,
    .info-card {
        padding: 22px;
    }

    .hero-search,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .card-body {
        min-height: 132px;
        padding: 12px;
    }

    .section-head,
    .footer-grid {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 12px;
    }

    .rank-row {
        grid-template-columns: 44px 74px minmax(0, 1fr);
    }

    .rank-row img {
        width: 74px;
        height: 102px;
    }

    .rank-meta {
        grid-column: 3;
        white-space: normal;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 20px;
    }

    .hero-slider {
        min-height: 430px;
    }

    .hero-slide-content {
        padding: 22px;
    }

    .play-button {
        width: 74px;
        height: 74px;
    }
}
