:root {
    --page-bg: #07111f;
    --panel-bg: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(250, 204, 21, 0.16);
    --line-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --gold: #facc15;
    --gold-dark: #eab308;
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.24);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(250, 204, 21, 0.14), transparent 30rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 34rem),
        linear-gradient(135deg, #0f172a 0%, #172554 48%, #020617 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 70%);
}

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

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

button,
input {
    font: inherit;
}

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

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

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

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #111827;
    border-radius: 14px;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    box-shadow: 0 12px 30px rgba(250, 204, 21, 0.25);
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--gold);
    background: rgba(250, 204, 21, 0.11);
}

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

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.hero-slider {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(0deg, #07111f 0%, transparent 46%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    align-items: center;
    gap: 48px;
    padding-top: 60px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.8;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #fef9c3;
    border: 1px solid rgba(250, 204, 21, 0.24);
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.08);
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.text-button,
.row-action,
.hero-search button,
.player-cover button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button,
.hero-search button,
.player-cover button {
    color: #111827;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    box-shadow: 0 18px 42px rgba(250, 204, 21, 0.22);
}

.primary-button:hover,
.hero-search button:hover,
.player-cover button:hover,
.row-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 50px rgba(250, 204, 21, 0.28);
}

.ghost-button {
    color: var(--text);
    border: 1px solid var(--line-soft);
    background: rgba(15, 23, 42, 0.72);
}

.text-button {
    min-height: auto;
    padding: 0;
    color: var(--gold);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(360px, 100%);
    overflow: hidden;
    border: 1px solid rgba(250, 204, 21, 0.22);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.55);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 8px 12px;
    color: #111827;
    border-radius: 999px;
    background: var(--gold);
    font-size: 13px;
    font-weight: 900;
}

.hero-search-card {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-search,
.inline-filter {
    display: flex;
    width: min(640px, 100%);
    padding: 8px;
    border: 1px solid rgba(250, 204, 21, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search input,
.inline-filter input {
    flex: 1;
    min-width: 0;
    color: var(--text);
    border: 0;
    outline: 0;
    padding: 0 18px;
    background: transparent;
}

.hero-search input::placeholder,
.inline-filter input::placeholder {
    color: var(--soft);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.hero-dot.is-active {
    width: 34px;
    background: var(--gold);
}

.section-block {
    padding: 74px 0;
}

.section-muted {
    background: rgba(15, 23, 42, 0.28);
}

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

.section-heading h2,
.page-hero h1,
.category-overview-card h2,
.detail-card h1,
.detail-card h2,
.sidebar-card h2 {
    margin: 8px 0 0;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading a {
    color: var(--gold);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: var(--panel-bg);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.35);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.32);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.4), rgba(250, 204, 21, 0.14));
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img,
.category-card:hover img,
.row-cover:hover img,
.hero-poster:hover img {
    transform: scale(1.08);
}

.movie-score,
.movie-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.movie-score {
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    color: #111827;
    background: var(--gold);
}

.movie-play {
    right: 12px;
    bottom: 12px;
    padding: 6px 11px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(12px);
}

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

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.media-row h3 a:hover,
.category-overview-card h2 a:hover,
.mini-link-list a:hover {
    color: var(--gold);
}

.movie-card p,
.media-row p,
.category-card p,
.about-panel p,
.page-hero p,
.detail-card p,
.site-footer p,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    font-size: 14px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--soft);
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
}

.movie-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
    width: 4px;
    height: 4px;
    margin-left: 14px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.5);
    content: "";
}

.movie-card .tag-list {
    margin-top: 14px;
}

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

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

.movie-card-compact p {
    display: none;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--line-soft);
    border-radius: 26px;
    background: var(--panel-bg);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.25);
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: transform 0.35s ease;
}

.category-card::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.9));
}

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

.category-card span {
    display: block;
    margin-top: 66px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    margin: 10px 0 0;
    font-size: 14px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

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

.media-row {
    display: grid;
    grid-template-columns: auto 110px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: var(--panel-bg);
}

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

.row-cover {
    overflow: hidden;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.2);
}

.row-cover img {
    width: 110px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.media-row h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.media-row p {
    margin: 0 0 8px;
    font-size: 14px;
}

.row-action {
    min-height: 38px;
    padding: 0 14px;
    color: #111827;
    background: var(--gold);
    font-size: 14px;
}

.about-panel,
.sidebar-card,
.detail-card,
.page-hero,
.category-overview-card {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.about-panel {
    align-self: start;
    position: sticky;
    top: 96px;
    padding: 30px;
}

.about-panel h2 {
    margin: 10px 0 12px;
    font-size: 32px;
}

.page-main {
    padding: 42px 0 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--soft);
    font-size: 14px;
}

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

.page-hero {
    margin-bottom: 28px;
    padding: 42px;
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 26rem),
        var(--panel-bg);
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 58px);
}

.page-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    font-size: 18px;
}

.small-hero {
    min-height: 260px;
}

.inline-filter {
    margin-top: 24px;
}

.inline-filter input {
    min-height: 44px;
}

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

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

.category-overview-cover {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(37, 99, 235, 0.22);
}

.category-overview-cover img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.mini-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-link-list a {
    padding: 7px 10px;
    color: var(--muted);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.5);
    font-size: 13px;
}

.category-movie-grid {
    margin-top: 24px;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    color: var(--muted);
    text-align: center;
}

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

.is-hidden {
    display: none !important;
}

.full-ranking {
    margin-top: 24px;
}

.search-result-grid {
    margin-top: 26px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid rgba(250, 204, 21, 0.18);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
    filter: blur(1px);
}

.player-cover::after {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(circle, rgba(250, 204, 21, 0.18), rgba(2, 6, 23, 0.78));
}

.player-cover button {
    position: relative;
    z-index: 2;
    min-width: 138px;
    min-height: 54px;
    font-size: 17px;
}

.detail-card {
    padding: 30px;
}

.detail-title-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
}

.detail-card h1 {
    font-size: clamp(32px, 5vw, 52px);
}

.detail-score {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    place-items: center;
    color: #111827;
    border-radius: 18px;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    font-size: 22px;
    font-weight: 900;
}

.detail-meta {
    margin: 16px 0;
}

.detail-tags {
    margin: 18px 0;
}

.one-line {
    padding: 18px 20px;
    border: 1px solid rgba(250, 204, 21, 0.16);
    border-radius: 20px;
    background: rgba(250, 204, 21, 0.08);
    color: #fef9c3 !important;
    font-size: 17px;
}

.detail-card h2 {
    margin-top: 28px;
    font-size: 26px;
}

.inner-section {
    padding: 34px 0 0;
}

.detail-sidebar {
    position: sticky;
    top: 96px;
}

.sidebar-card {
    padding: 22px;
}

.sidebar-card h2 {
    margin-bottom: 18px;
    font-size: 24px;
}

.sidebar-ranking .media-row {
    grid-template-columns: 86px minmax(0, 1fr);
}

.sidebar-ranking .rank-number,
.sidebar-ranking .row-action {
    display: none;
}

.sidebar-ranking .row-cover img {
    width: 86px;
}

.sidebar-ranking .media-row p {
    display: none;
}

.sidebar-ranking .movie-meta {
    font-size: 12px;
}

.site-footer {
    border-top: 1px solid var(--line-soft);
    background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 0;
}

.footer-inner strong {
    font-size: 20px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: var(--soft);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

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

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

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

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

    .about-panel,
    .detail-sidebar {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 20px;
    }

    .hero-poster {
        justify-self: start;
        width: 210px;
        transform: none;
    }

    .hero-search-card {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-dots {
        justify-content: center;
    }

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

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

    .media-row {
        grid-template-columns: auto 94px minmax(0, 1fr);
    }

    .row-action {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .section-heading,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

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

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

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

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button,
    .text-button {
        width: 100%;
    }

    .hero-search,
    .inline-filter {
        border-radius: 22px;
        flex-direction: column;
    }

    .hero-search input,
    .inline-filter input {
        min-height: 44px;
    }

    .movie-grid,
    .dense-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-card {
        padding: 24px;
    }

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

    .rank-number {
        position: absolute;
        margin: 8px;
    }

    .row-cover img {
        width: 84px;
    }
}
