:root {
    --bg: #080a12;
    --bg-soft: #111827;
    --panel: rgba(255, 255, 255, 0.9);
    --text: #111827;
    --muted: #6b7280;
    --line: rgba(148, 163, 184, 0.28);
    --amber: #d97706;
    --amber-soft: #f59e0b;
    --red: #dc2626;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 30rem),
        linear-gradient(180deg, #fff7ed 0%, #f8fafc 34%, #eef2ff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

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

.nav-wrap {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #dc2626 58%, #7c2d12);
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.03em;
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(360px, 32vw);
}

.top-search input,
.hero-search input,
.page-search input,
.filter-bar input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 999px;
    padding: 12px 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.92);
    transition: 0.2s ease;
}

.top-search input:focus,
.hero-search input:focus,
.page-search input:focus,
.filter-bar input:focus {
    border-color: rgba(245, 158, 11, 0.9);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.top-search button,
.hero-search button,
.page-search button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.top-search button,
.hero-search button,
.page-search button,
.primary-btn {
    color: white;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.2);
}

.ghost-btn {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.14);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #92400e;
}

.mobile-nav {
    display: none;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 12px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}

main,
.page-main,
.detail-main {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
    gap: 24px;
    padding: 28px 0 40px;
}

.hero-stage {
    position: relative;
    overflow: hidden;
    min-height: 590px;
    border-radius: 34px;
    background: var(--bg);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 10, 19, 0.92) 0%, rgba(7, 10, 19, 0.58) 45%, rgba(7, 10, 19, 0.2) 100%),
        radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.34), transparent 26rem);
}

.hero-copy {
    position: absolute;
    left: clamp(28px, 5vw, 72px);
    bottom: clamp(42px, 7vw, 92px);
    width: min(680px, calc(100% - 48px));
    color: white;
}

.eyebrow,
.panel-kicker,
.section-head span,
.category-overview-card span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b45309;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow {
    color: #fbbf24;
}

.hero-copy h1 {
    margin: 14px 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

.hero-copy p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.75;
}

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

.hero-controls {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
    border: 0;
    width: 44px;
    height: 44px;
    color: white;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 28px;
}

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

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.42) !important;
}

.hero-dot.is-active {
    width: 30px !important;
    border-radius: 999px !important;
    background: #f59e0b !important;
}

.hero-panel,
.section-wrap,
.category-panel,
.rank-panel,
.page-hero,
.category-overview-card,
.detail-hero,
.detail-content,
.player-section {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-panel h2,
.page-hero h1 {
    margin: 12px 0;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-panel p,
.page-hero p,
.category-overview-card p,
.detail-block p {
    color: var(--muted);
    line-height: 1.8;
}

.hero-search,
.page-search {
    display: flex;
    gap: 10px;
    margin: 28px 0 18px;
}

.quick-links,
.detail-tags,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.detail-tags a,
.tag-row span,
.footer-links a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
    font-size: 13px;
    font-weight: 800;
}

.section-wrap,
.split-section {
    margin: 26px 0;
}

.section-wrap {
    padding: 26px;
}

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

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

.section-head a,
.text-link {
    color: #b45309;
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: white;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 54px rgba(15, 23, 42, 0.16);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #111827, #7c2d12);
}

.poster img,
.category-card img,
.category-preview img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.2);
}

.card-body {
    padding: 14px;
}

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

.movie-card h3 {
    min-height: 44px;
    margin: 8px 0;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 58px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    padding: 5px 8px;
    font-size: 11px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 24px;
}

.category-panel,
.rank-panel {
    padding: 26px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 18px;
    color: white;
    border-radius: 22px;
    background: #111827;
}

.category-card img {
    position: absolute;
    inset: 0;
    opacity: 0.58;
    transition: transform 0.2s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.mini-rank,
.rank-strip {
    display: grid;
    gap: 10px;
}

.mini-rank a,
.rank-strip a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.1);
}

.mini-rank b,
.rank-strip b {
    color: #b45309;
    font-size: 20px;
}

.mini-rank span,
.rank-strip span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

.mini-rank em,
.rank-strip em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.page-main,
.detail-main {
    padding: 28px 0 44px;
}

.page-hero {
    margin-bottom: 26px;
    padding: clamp(28px, 5vw, 54px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 237, 0.88)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 28rem);
}

.slim-hero {
    display: block;
    text-align: center;
}

.search-main {
    max-width: 760px;
    margin: 28px auto 0;
}

.filter-bar {
    margin: 0 0 20px;
}

.filter-bar input {
    max-width: 620px;
}

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

.category-overview-card {
    padding: 18px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

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

.category-preview img {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: #111827;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 2px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #b45309;
    font-weight: 900;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 56px);
    padding: clamp(22px, 4vw, 44px);
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(92, 28, 10, 0.9)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.3), transparent 28rem);
    color: white;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    background: #111827;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.detail-copy h1 {
    margin: 14px 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.lead {
    max-width: 900px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

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

.info-grid div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
}

.info-grid dt {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 800;
}

.info-grid dd {
    margin: 4px 0 0;
    font-weight: 900;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    margin: 26px 0;
    padding: 18px;
    background: #050816;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.48));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    position: relative;
}

.play-overlay span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #dc2626;
}

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

.detail-content {
    padding: clamp(24px, 4vw, 42px);
}

.detail-block + .detail-block {
    margin-top: 26px;
}

.detail-block h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.related-wrap {
    margin-bottom: 0;
}

.rank-strip {
    width: min(600px, 100%);
    max-height: 360px;
    overflow: auto;
}

.site-footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    background: #080a12;
}

.footer-inner {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
}

.footer-inner strong {
    color: white;
    font-size: 22px;
}

.footer-inner p {
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.7;
}

.copyright {
    grid-column: 1 / -1;
    margin: 0;
}

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

    .hero,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 560px;
    }

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

@media (max-width: 860px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

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

    .hero-copy {
        left: 22px;
        bottom: 72px;
    }

    .hero-copy p {
        font-size: 15px;
    }

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

    .category-grid,
    .info-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .footer-inner {
        align-items: start;
    }
}

@media (max-width: 520px) {
    .nav-wrap,
    main,
    .page-main,
    .detail-main,
    .footer-inner,
    .mobile-nav {
        width: min(100% - 20px, 1440px);
    }

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

    .hero {
        padding-top: 14px;
    }

    .hero-stage {
        min-height: 480px;
    }

    .hero-panel,
    .section-wrap,
    .category-panel,
    .rank-panel,
    .page-hero,
    .detail-content {
        padding: 20px;
    }

    .movie-card h3 {
        min-height: 40px;
        font-size: 14px;
    }

    .movie-card p {
        display: none;
    }

    .meta-line {
        font-size: 11px;
    }

    .play-overlay span {
        width: 68px;
        height: 68px;
    }
}
