:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --gold: #f59e0b;
    --orange: #f97316;
    --red: #ef4444;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.18), transparent 34rem),
        radial-gradient(circle at 95% 8%, rgba(239, 68, 68, 0.13), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.main-nav a,
.quick-cats a {
    color: #cbd5e1;
    border-radius: 999px;
    transition: 0.25s ease;
}

.main-nav a {
    padding: 10px 15px;
    font-weight: 700;
}

.main-nav a:hover,
.main-nav a.active,
.quick-cats a:hover {
    color: #fff;
    background: rgba(245, 158, 11, 0.16);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    padding: 9px 12px;
    font-size: 20px;
}

.quick-cats {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 12px;
}

.quick-cats a {
    white-space: nowrap;
    padding: 7px 12px;
    background: rgba(148, 163, 184, 0.08);
    font-size: 13px;
}

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

.hero {
    position: relative;
    min-height: 640px;
    margin: 26px 0 36px;
    border-radius: 32px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stage,
.hero-slide {
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 40px;
    padding: 76px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(16px) brightness(0.42) saturate(1.3);
    transform: scale(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 42%, rgba(245, 158, 11, 0.24), transparent 24rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76) 46%, rgba(2, 6, 23, 0.34));
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 800px;
    margin: 18px 0 20px;
    font-size: clamp(44px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.9;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    border: 1px solid transparent;
    transition: transform 0.25s ease, background 0.25s ease, border 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 34px rgba(249, 115, 22, 0.26);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

.btn.text {
    color: #fde68a;
    padding-inline: 8px;
}

.btn.small {
    min-height: 38px;
    padding: 9px 15px;
    font-size: 14px;
}

.hero-tags,
.movie-tags {
    margin-top: 18px;
}

.hero-tags span,
.movie-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.18);
    font-size: 12px;
    font-weight: 800;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.hero-poster {
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster img,
.poster-link img,
.category-cover img,
.rank-item img,
.rank-row-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #111827);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 74px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
}

.hero-dots button.active {
    background: linear-gradient(90deg, #fbbf24, #f97316);
}

.search-panel,
.section-block,
.page-hero,
.filter-bar,
.detail-content article,
.player-section,
.category-card,
.rank-row {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 24px;
    margin-bottom: 24px;
}

.search-panel h2,
.section-head h2,
.page-hero h1 {
    margin: 6px 0 0;
}

.search-inline,
.filter-bar {
    display: flex;
    gap: 12px;
}

.search-inline input,
.filter-bar input,
.filter-bar select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    padding: 0 14px;
    outline: none;
}

.search-inline input {
    width: min(420px, 52vw);
}

.search-inline button {
    border: 0;
    border-radius: 14px;
    padding: 0 20px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    cursor: pointer;
}

.category-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin-bottom: 28px;
}

.category-strip a {
    flex: 0 0 auto;
    padding: 12px 18px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.16);
    font-weight: 900;
}

.section-block {
    padding: 26px;
    margin: 28px 0;
}

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

.section-head a {
    color: #fbbf24;
    font-weight: 800;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.34);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
}

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

.poster-link img {
    transition: transform 0.45s ease;
}

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 46px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: #cbd5e1;
    font-size: 12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-num {
    color: #fbbf24;
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
}

.rank-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-score {
    color: #fbbf24;
    font-size: 12px;
}

.page-hero.compact {
    padding: 44px;
    margin: 28px 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 24rem),
        rgba(15, 23, 42, 0.82);
}

.page-hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    color: #cbd5e1;
    line-height: 1.8;
}

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

.category-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
}

.category-cover {
    position: relative;
    min-height: 250px;
    overflow: hidden;
}

.category-cover span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.category-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 54%);
}

.category-card-body {
    padding: 22px;
}

.category-card-body p {
    color: #cbd5e1;
    line-height: 1.75;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.category-samples a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
    font-size: 13px;
}

.filter-bar {
    flex-wrap: wrap;
    padding: 18px;
    margin-bottom: 22px;
}

.filter-bar input {
    flex: 1 1 280px;
}

.filter-bar select {
    flex: 0 1 180px;
}

.list-all {
    margin-bottom: 38px;
}

.rank-page-list {
    display: grid;
    gap: 16px;
    margin-bottom: 38px;
}

.rank-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
}

.rank-row-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
}

.rank-row-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: #fbbf24;
    font-weight: 900;
}

.rank-row h2 {
    margin: 12px 0 8px;
}

.rank-row p {
    color: #cbd5e1;
    line-height: 1.75;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    margin: 26px 0;
    border-radius: 32px;
    background: #0f172a;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-image: var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.35) saturate(1.25);
    transform: scale(1.08);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72));
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    padding: 52px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 72px);
    letter-spacing: -0.05em;
    line-height: 1;
}

.detail-one-line {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
    color: #cbd5e1;
}

.detail-meta span {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-section {
    padding: 18px;
    margin: 28px 0;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

.play-mask span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 50px rgba(249, 115, 22, 0.34);
    font-size: 28px;
}

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

.video-shell.playing .play-mask {
    opacity: 0;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 28px 0;
}

.detail-content article {
    padding: 28px;
}

.detail-content h2 {
    margin-top: 0;
}

.detail-content p {
    color: #dbeafe;
    line-height: 2;
}

.site-footer {
    margin-top: 44px;
    background: #020617;
    border-top: 1px solid var(--line);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    padding: 42px 0;
}

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

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

.site-footer h3 {
    margin-top: 0;
}

.site-footer a {
    display: block;
    color: #cbd5e1;
    margin: 9px 0;
}

.copyright {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

@media (max-width: 880px) {
    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid var(--line);
    }

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

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

    .hero,
    .hero-stage,
    .hero-slide {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 34px;
        align-content: end;
    }

    .hero-poster {
        width: 210px;
        grid-row: 1;
    }

    .hero-dots {
        left: 34px;
    }

    .search-panel,
    .section-head,
    .detail-content {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .detail-layout {
        padding: 30px;
    }

    .detail-poster {
        width: min(260px, 100%);
    }
}

@media (max-width: 640px) {
    main,
    .header-inner,
    .quick-cats,
    .footer-grid,
    .copyright {
        width: min(100% - 22px, 1280px);
    }

    .brand {
        font-size: 18px;
    }

    .hero {
        border-radius: 24px;
    }

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

    .hero p {
        font-size: 16px;
    }

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

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

    .movie-card p,
    .movie-meta {
        display: none;
    }

    .rank-item {
        grid-template-columns: 34px 48px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

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

    .page-hero.compact,
    .section-block,
    .detail-content article {
        padding: 20px;
    }

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