:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-solid: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --red: #ef4444;
    --blue: #38bdf8;
    --green: #22c55e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 24px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max);
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: #fff;
    font-size: 15px;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

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

.nav-link {
    padding: 10px 14px;
    color: var(--muted);
    border-radius: 999px;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.14);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 10px 24px 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    color: var(--muted);
    border-radius: 12px;
}

.mobile-nav a:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #fff;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.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-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.94));
}

img.is-missing {
    opacity: 0;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 36%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.26));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px 84px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-light);
    font-weight: 800;
    margin-bottom: 16px;
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 19px;
}

.hero-meta,
.detail-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.rating-pill {
    background: var(--amber) !important;
    border-color: rgba(245, 158, 11, 0.75) !important;
    color: #fff !important;
    font-weight: 800;
}

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

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    background: linear-gradient(135deg, var(--amber), #f97316);
    color: #fff;
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.25);
}

.button-secondary {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
    color: #fff;
}

.button-primary:hover,
.button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 42px rgba(245, 158, 11, 0.28);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    font-size: 26px;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 32px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--amber);
}

.page-section,
.page-hero,
.detail-layout,
.player-section {
    max-width: var(--max);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.page-section {
    padding-top: 64px;
}

.page-hero {
    padding-top: 54px;
    padding-bottom: 24px;
}

.page-hero-inner {
    overflow: hidden;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
    box-shadow: var(--shadow);
}

.page-hero h1,
.section-head h2,
.search-panel h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.page-hero p,
.section-head p,
.search-panel p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--muted);
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: "";
    width: 6px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--amber), var(--red));
}

.section-link {
    color: var(--amber-light);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--bg-card);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 22px 70px rgba(245, 158, 11, 0.12);
    transform: translateY(-5px);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.28), transparent 54%),
        linear-gradient(135deg, #1e293b, #020617);
}

.movie-card-featured .movie-cover {
    aspect-ratio: 16 / 9;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 62%);
}

.movie-score {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.95);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.movie-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.95);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .movie-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    padding: 17px;
}

.movie-meta-line {
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
}

.movie-meta-line span {
    min-height: 24px;
    padding: 2px 8px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.32;
}

.movie-info h3 a:hover {
    color: var(--amber-light);
}

.movie-info p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--subtle);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-tags span {
    max-width: 100%;
    overflow: hidden;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.search-controls {
    display: flex;
    gap: 10px;
}

.search-box {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.55);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
}

.search-controls select {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.88);
    color: #fff;
    padding: 0 12px;
}

.filter-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-row button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: var(--muted);
    padding: 8px 12px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-row button:hover,
.filter-row button.is-active {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.16);
    color: #fff;
}

.empty-state {
    display: none;
    margin: 26px 0;
    padding: 28px;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 44%),
        rgba(15, 23, 42, 0.82);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    transform: translateY(-4px);
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 25px;
}

.category-card p {
    margin: 0 0 22px;
    color: var(--muted);
}

.category-card span {
    color: var(--amber-light);
    font-weight: 800;
}

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

.mini-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.mini-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.mini-card span,
.mini-card small {
    display: block;
    padding: 0 12px;
}

.mini-card span {
    margin-top: 10px;
    overflow: hidden;
    color: #fff;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card small {
    margin: 2px 0 12px;
    color: var(--subtle);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 68px 130px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-number {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--amber), #f97316);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.rank-item img {
    width: 130px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.rank-copy h2 {
    margin: 0 0 7px;
    font-size: 22px;
}

.rank-copy p {
    margin: 0;
    color: var(--muted);
}

.rank-score {
    color: var(--amber-light);
    font-size: 22px;
    font-weight: 900;
}

.player-section {
    padding-top: 38px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.22), transparent 28%),
        rgba(0, 0, 0, 0.34);
}

.player-overlay.is-hidden {
    display: none;
}

.player-button {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), #f97316);
    color: #fff;
    font-size: 30px;
    box-shadow: 0 16px 50px rgba(245, 158, 11, 0.35);
    transition: transform 0.2s ease;
}

.player-button:hover {
    transform: scale(1.08);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
    gap: 28px;
    padding-top: 36px;
}

.detail-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.detail-card {
    padding: 30px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-card h2,
.side-card h2 {
    margin: 28px 0 12px;
    color: #fff;
    font-size: 22px;
}

.detail-card p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.detail-card p + p {
    margin-top: 14px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.detail-tags a {
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.09);
    color: var(--muted);
}

.detail-tags a:hover {
    border-color: rgba(245, 158, 11, 0.45);
    color: #fff;
}

.side-card {
    padding: 20px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.side-poster {
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.fact-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.fact-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.fact-list strong {
    color: #fff;
    white-space: nowrap;
}

.related-section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 58px 24px 0;
}

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

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

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

    .menu-button {
        display: block;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .hero {
        min-height: 620px;
        height: 76vh;
    }

    .hero-content {
        padding-bottom: 78px;
    }

    .hero-control {
        display: none;
    }

    .feature-grid,
    .search-panel,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

    .side-card {
        position: static;
    }

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

    .rank-score {
        grid-column: 3;
        font-size: 18px;
    }
}

@media (max-width: 680px) {
    .header-inner,
    .page-section,
    .page-hero,
    .detail-layout,
    .player-section,
    .related-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand {
        font-size: 22px;
    }

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

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

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

    .movie-info {
        padding: 13px;
    }

    .movie-info h3 {
        font-size: 16px;
    }

    .movie-info p {
        font-size: 13px;
    }

    .page-hero-inner,
    .detail-card,
    .search-panel {
        padding: 22px;
    }

    .section-head {
        display: block;
    }

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

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

    .rank-item img {
        display: none;
    }

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

@media (max-width: 430px) {
    .movie-grid,
    .category-grid,
    .mini-strip {
        grid-template-columns: 1fr;
    }
}
