:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-panel: rgba(15, 23, 42, 0.78);
    --bg-card: rgba(15, 23, 42, 0.92);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(245, 158, 11, 0.35);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-soft: #fcd34d;
    --accent-dark: #b45309;
    --danger: #fb7185;
    --radius: 24px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    --container: 1200px;
}

* {
    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 32rem),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b 50%, #d97706);
    border-radius: 14px;
    font-weight: 900;
    box-shadow: 0 0 36px rgba(245, 158, 11, 0.35);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fef3c7, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    position: relative;
    padding: 10px 14px;
    color: var(--muted-strong);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent-soft);
    background: rgba(245, 158, 11, 0.1);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--container));
    margin: 0 auto 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid var(--border);
    border-radius: 18px;
}

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

.mobile-nav a {
    padding: 10px 12px;
    color: var(--muted-strong);
    border-radius: 12px;
}

.mobile-nav a:hover {
    color: var(--accent-soft);
    background: rgba(245, 158, 11, 0.1);
}

.hero-carousel {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image {
    position: absolute;
    inset: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transform: scale(1.03);
}

.hero-image::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.16) 42%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 660px;
    align-items: center;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.55fr);
    gap: 48px;
    padding: 64px 0 84px;
}

.hero-kicker,
.section-heading span,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-title {
    margin: 18px 0 16px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

.hero-title strong {
    display: block;
    background: linear-gradient(90deg, #fff7ed, #fbbf24 55%, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    max-width: 720px;
    margin: 0 0 28px;
    color: var(--muted-strong);
    font-size: 18px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(245, 158, 11, 0.38);
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    font-weight: 800;
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.32);
}

.button.ghost {
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    border-color: var(--border);
    box-shadow: none;
}

.hero-feature {
    align-self: center;
    padding: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.58));
    border: 1px solid var(--border-strong);
    border-radius: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-feature img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
}

.hero-feature h2 {
    margin: 18px 0 8px;
    font-size: 26px;
}

.hero-feature p {
    margin: 0;
    color: var(--muted-strong);
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: calc((100% - min(100% - 32px, var(--container))) / 2);
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: calc((100% - min(100% - 32px, var(--container))) / 2);
    bottom: 48px;
    display: flex;
    gap: 8px;
}

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

.hero-dots button.is-active {
    background: var(--accent);
}

.section {
    padding: 72px 0;
}

.section.compact {
    padding-top: 42px;
}

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

.section-heading.slim {
    display: block;
    margin-bottom: 18px;
}

.section-heading h1,
.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
}

.section-heading p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted-strong);
}

.section-link {
    color: var(--accent-soft);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    padding: 24px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card::before {
    position: absolute;
    inset: auto -25% -50% 30%;
    height: 140px;
    content: "";
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3), transparent 62%);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    margin: 0;
    color: var(--muted-strong);
}

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

.movie-card {
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    box-shadow: 0 24px 54px rgba(245, 158, 11, 0.12);
}

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

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-height: 26px;
    padding: 3px 10px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 15px;
}

.card-body h2,
.card-body h3 {
    display: -webkit-box;
    min-height: 54px;
    margin: 10px 0 8px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 18px;
    line-height: 1.45;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
    color: var(--accent-soft);
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted-strong);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

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

.tag-row span {
    padding: 3px 8px;
    color: var(--accent-soft);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 999px;
    font-size: 12px;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 22px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(14px);
}

.filter-controls {
    display: grid;
    grid-template-columns: 2fr repeat(4, minmax(130px, 1fr));
    gap: 12px;
}

.filter-controls label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 44px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    padding: 0 12px;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.filter-status {
    min-height: 22px;
    margin: 14px 0 0;
    color: var(--muted-strong);
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
    gap: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 72px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.rank-number {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    border-radius: 16px;
    font-weight: 900;
}

.rank-item img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

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

.rank-item p {
    margin: 0 0 8px;
    color: var(--muted-strong);
}

.compact-panel {
    padding: 20px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.compact-panel h2 {
    margin-top: 0;
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
}

.compact-card:hover {
    border-color: var(--border-strong);
}

.compact-card img {
    width: 64px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card strong,
.compact-card small {
    display: block;
}

.compact-card small {
    margin-top: 4px;
    color: var(--muted);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--accent-soft);
}

.detail-hero {
    padding: 44px 0 34px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    margin: 14px 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
}

.detail-copy p {
    max-width: 860px;
    color: var(--muted-strong);
    font-size: 18px;
}

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

.player-shell {
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-strong);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    background: #000;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
    border: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.play-cover span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    border-radius: 50%;
    font-size: 30px;
    box-shadow: 0 0 48px rgba(245, 158, 11, 0.45);
}

.play-cover strong {
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.article-panel {
    padding: 28px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.article-panel h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.article-panel p {
    color: var(--muted-strong);
}

.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
    gap: 24px;
}

.info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: var(--muted-strong);
}

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

.site-footer {
    margin-top: 48px;
    padding: 44px 0 0;
    background: rgba(2, 6, 23, 0.88);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    max-width: 520px;
    color: var(--muted-strong);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--muted-strong);
}

.footer-links a:hover {
    color: var(--accent-soft);
}

.footer-bottom {
    margin-top: 36px;
    padding: 18px 16px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--border);
}

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

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

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

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

    .search-field {
        grid-column: 1 / -1;
    }
}

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

    .mobile-toggle {
        display: flex;
    }

    .hero-content,
    .detail-grid,
    .article-grid,
    .rank-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        align-items: end;
        min-height: 720px;
        padding-top: 46px;
    }

    .hero-feature {
        max-width: 360px;
    }

    .detail-poster {
        max-width: 320px;
    }

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

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

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

    .brand-subtitle {
        display: none;
    }

    .hero-carousel,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        gap: 24px;
        padding-bottom: 96px;
    }

    .hero-description,
    .detail-copy p {
        font-size: 16px;
    }

    .hero-controls {
        right: 12px;
        bottom: 24px;
    }

    .hero-dots {
        left: 12px;
        bottom: 42px;
    }

    .section {
        padding: 48px 0;
    }

    .section-heading {
        display: block;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-body h2,
    .card-body h3 {
        font-size: 16px;
        min-height: 46px;
    }

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

    .rank-item {
        grid-template-columns: 42px 58px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

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

    .rank-item p {
        display: none;
    }

    .article-panel {
        padding: 20px;
    }
}
