:root {
    --night-950: #020617;
    --night-925: #07111f;
    --night-900: #0f172a;
    --night-850: #172036;
    --night-800: #1e293b;
    --night-700: #334155;
    --gold-300: #fde047;
    --gold-400: #facc15;
    --gold-500: #eab308;
    --gold-600: #ca8a04;
    --blue-400: #60a5fa;
    --red-400: #f87171;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --border-soft: rgba(113, 63, 18, 0.28);
    --shadow-glow: 0 0 32px rgba(234, 179, 8, 0.22);
    --shadow-card: 0 18px 48px rgba(2, 6, 23, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--night-950), var(--night-900));
    color: var(--text-main);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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;
    background: rgba(2, 6, 23, 0.95);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(14px);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(234, 179, 8, 0.12);
    color: var(--gold-400);
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.24);
}

.logo-text {
    font-size: 1.24rem;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    color: var(--text-soft);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--gold-400);
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input,
.mobile-search input,
.filter-bar input {
    width: 240px;
    border: 1px solid var(--night-700);
    border-radius: 12px;
    outline: none;
    background: var(--night-900);
    color: var(--text-main);
    padding: 10px 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.12);
}

.site-search button,
.mobile-search button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    background: var(--gold-500);
    color: var(--night-950);
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease;
}

.site-search button:hover,
.mobile-search button:hover {
    background: var(--gold-600);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--night-900);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: var(--text-soft);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 18px;
    border-top: 1px solid var(--night-800);
}

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

.mobile-panel nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search input {
    width: 100%;
}

.home-hero {
    position: relative;
    min-height: 70vh;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg,
.hero-bg img,
.hero-gradient {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-gradient {
    background: linear-gradient(0deg, var(--night-950) 0%, rgba(2, 6, 23, 0.86) 45%, rgba(2, 6, 23, 0.42) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1060px, calc(100% - 32px));
    margin: 0 auto;
    text-align: center;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--gold-400);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-subtitle {
    width: min(760px, 100%);
    margin: 0 auto 22px;
    color: var(--text-soft);
    font-size: clamp(1.08rem, 2vw, 1.55rem);
}

.hero-feature {
    width: min(780px, 100%);
    margin: 0 auto 30px;
    color: var(--text-muted);
}

.hero-feature a {
    color: var(--gold-400);
    font-weight: 800;
}

.hero-actions,
.hero-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-chips {
    margin-top: 22px;
}

.hero-chips a {
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text-soft);
    border: 1px solid rgba(234, 179, 8, 0.18);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-chips a:hover {
    color: var(--gold-400);
    border-color: rgba(234, 179, 8, 0.42);
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-gold {
    background: var(--gold-500);
    color: var(--night-950);
    box-shadow: var(--shadow-glow);
}

.btn-gold:hover {
    background: var(--gold-600);
}

.btn-dark {
    background: var(--night-800);
    color: #fff;
}

.btn-dark:hover {
    background: var(--night-700);
}

.btn-ghost {
    border: 1px solid rgba(234, 179, 8, 0.28);
    color: var(--gold-400);
    background: rgba(2, 6, 23, 0.45);
}

.btn-ghost:hover {
    border-color: var(--gold-400);
    background: rgba(234, 179, 8, 0.08);
}

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

.content-section {
    margin-bottom: 78px;
}

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

.section-head h2,
.page-heading h1,
.player-section h2,
.detail-panel h2 {
    margin: 0;
    color: #fff;
    letter-spacing: -0.03em;
}

.section-head h2 {
    font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.section-head p,
.page-heading p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

.section-more {
    color: var(--gold-400);
    font-weight: 800;
    white-space: nowrap;
}

.section-more span {
    margin-left: 6px;
}

.card-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card,
.movie-list-card,
.category-overview-card,
.ranking-row,
.detail-panel {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(51, 65, 85, 0.72);
    box-shadow: var(--shadow-card);
}

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(234, 179, 8, 0.38);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    background: var(--night-850);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--night-800);
}

.movie-cover img,
.list-cover img,
.ranking-thumb img,
.overview-cover img,
.category-tile img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img,
.movie-list-card:hover .list-cover img,
.category-overview-card:hover .overview-cover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.cover-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: translateX(-120%);
    transition: transform 0.5s ease;
}

.movie-card:hover .cover-shine {
    transform: translateX(120%);
}

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

.movie-title,
.list-title,
.ranking-info > a {
    display: block;
    color: #fff;
    font-weight: 800;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-title {
    min-height: 2.7em;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card:hover .movie-title,
.movie-list-card:hover .list-title,
.ranking-row:hover .ranking-info > a {
    color: var(--gold-400);
}

.movie-card-body p,
.list-body p,
.ranking-info p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.movie-tags,
.detail-tags,
.genre-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.detail-tags span,
.genre-pills span {
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(234, 179, 8, 0.1);
    color: var(--gold-400);
    font-size: 0.78rem;
}

.movie-meta,
.meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: #64748b;
    font-size: 0.82rem;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--night-950);
    font-weight: 900;
    box-shadow: var(--shadow-glow);
}

.list-stack {
    display: grid;
    gap: 16px;
}

.movie-list-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.movie-list-card:hover {
    transform: translateY(-2px);
    background: var(--night-800);
    border-color: rgba(234, 179, 8, 0.34);
}

.list-cover {
    height: 132px;
    overflow: hidden;
}

.list-body {
    padding: 15px 18px 15px 0;
}

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

.category-tile {
    position: relative;
    height: 168px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(51, 65, 85, 0.7);
    box-shadow: var(--shadow-card);
}

.category-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58), transparent);
}

.category-name,
.category-desc {
    position: absolute;
    left: 16px;
    right: 16px;
}

.category-name {
    bottom: 47px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
}

.category-desc {
    bottom: 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-heading {
    margin-bottom: 40px;
    padding: 42px;
    border-radius: 24px;
    background: radial-gradient(circle at top left, rgba(234, 179, 8, 0.16), transparent 36%), var(--night-900);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
}

.page-heading.compact {
    padding: 34px;
}

.page-heading h1 {
    font-size: clamp(2.2rem, 4.5vw, 4.4rem);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    overflow: hidden;
    border-radius: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-card:hover {
    transform: translateY(-3px);
    border-color: rgba(234, 179, 8, 0.34);
}

.overview-cover {
    min-height: 190px;
    overflow: hidden;
}

.overview-body {
    padding: 22px;
}

.overview-body h2 {
    margin: 0 0 10px;
}

.overview-body h2 a:hover {
    color: var(--gold-400);
}

.overview-body p {
    color: var(--text-muted);
}

.overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.overview-links a {
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--text-soft);
    background: var(--night-800);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-bar {
    position: sticky;
    top: 79px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(51, 65, 85, 0.7);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(12px);
}

.filter-bar input {
    width: min(560px, 100%);
}

.filter-bar span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.empty-state {
    display: none;
    margin: 40px 0;
    padding: 28px;
    border-radius: 18px;
    background: var(--night-900);
    color: var(--text-muted);
    text-align: center;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

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

.detail-shell {
    padding-top: 42px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 38px;
    align-items: center;
    margin-bottom: 54px;
}

.detail-poster {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(234, 179, 8, 0.22);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    background: var(--night-800);
}

.detail-intro h1 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    color: var(--text-soft);
    font-size: 1.12rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--night-800);
    color: var(--text-soft);
}

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

.player-section {
    margin-bottom: 46px;
}

.player-section h2 {
    margin-bottom: 18px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    border: 1px solid rgba(234, 179, 8, 0.25);
    box-shadow: var(--shadow-card);
    aspect-ratio: 16 / 9;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.16), rgba(2, 6, 23, 0.42) 45%, rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--gold-500);
    color: var(--night-950);
    font-size: 2.3rem;
    box-shadow: var(--shadow-glow);
    padding-left: 5px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 70px;
}

.detail-panel {
    border-radius: 18px;
    padding: 26px;
}

.detail-panel p {
    color: var(--text-soft);
}

.detail-side-panel {
    grid-column: 1 / -1;
}

.detail-panel dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

.detail-panel dl div {
    padding: 14px;
    border-radius: 14px;
    background: var(--night-800);
}

.detail-panel dt {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.detail-panel dd {
    margin: 4px 0 0;
    color: #fff;
    font-weight: 700;
}

.related-section {
    margin-bottom: 36px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 54px 130px 1fr 76px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-2px);
    border-color: rgba(234, 179, 8, 0.34);
    background: var(--night-850);
}

.ranking-number {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--night-950);
    font-weight: 900;
}

.ranking-thumb {
    height: 76px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--night-800);
}

.ranking-row strong {
    color: var(--gold-400);
    font-size: 1.35rem;
    text-align: right;
}

.site-footer {
    margin-top: 84px;
    border-top: 1px solid var(--night-800);
    background: var(--night-950);
}

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

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1rem;
    color: #fff;
}

.site-footer p,
.footer-bottom {
    color: var(--text-muted);
    font-size: 0.92rem;
}

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

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid var(--night-800);
    text-align: center;
}

.animate-fade-in {
    animation: fadeIn 0.7s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .site-header-inner {
        justify-content: space-between;
    }

    .mobile-toggle {
        display: block;
    }

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

    .detail-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .home-hero {
        height: auto;
        min-height: 620px;
        padding: 88px 0 70px;
    }

    .page-shell {
        padding-top: 46px;
    }

    .section-head,
    .filter-bar,
    .mobile-search,
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .section-more {
        align-self: flex-start;
    }

    .grid-four,
    .grid-three,
    .category-grid,
    .category-overview-grid,
    .footer-grid,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .movie-list-card,
    .category-overview-card,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .list-cover,
    .ranking-thumb,
    .overview-cover {
        height: 180px;
    }

    .list-body {
        padding: 0 18px 18px;
    }

    .ranking-row strong {
        text-align: left;
    }

    .detail-panel dl {
        grid-template-columns: 1fr 1fr;
    }

    .play-circle {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media (max-width: 460px) {
    .logo-text {
        font-size: 1.05rem;
    }

    .detail-panel dl {
        grid-template-columns: 1fr;
    }

    .page-heading {
        padding: 26px;
    }
}
