:root {
    color-scheme: dark;
    --bg: #030712;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-light: #1f2937;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --amber-soft: rgba(245, 158, 11, 0.14);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 22px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.16), transparent 26%), linear-gradient(180deg, #030712 0%, #0f172a 42%, #000000 100%);
    color: var(--text);
}

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: linear-gradient(90deg, rgba(3, 7, 18, 0.94), rgba(15, 23, 42, 0.94), rgba(3, 7, 18, 0.94));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

.brand-name {
    font-size: 26px;
    letter-spacing: 0.04em;
    background: linear-gradient(90deg, #fde68a, #ffffff, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber-light);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

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

.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: var(--muted);
    font-weight: 700;
}

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

.home-hero {
    position: relative;
    min-height: calc(100vh - 68px);
    overflow: hidden;
    background: #000000;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.05);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.12)), linear-gradient(0deg, #030712 0%, transparent 42%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(32px, calc((100vw - 1180px) / 2));
    top: 50%;
    width: min(640px, calc(100% - 48px));
    transform: translateY(-50%);
}

.hero-kicker,
.category-eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2,
.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    font-size: clamp(30px, 5vw, 54px);
}

.hero-content h1 + h2 {
    margin-top: -4px;
}

.hero-content p,
.page-hero p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(16px, 2.2vw, 21px);
    line-height: 1.8;
}

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

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

.primary-button {
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.22);
}

.ghost-button {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.34);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

.search-band {
    margin-top: 34px;
    padding: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.8);
    box-shadow: var(--shadow);
}

.search-band h2,
.section-title-row h2,
.category-strip h2,
.text-panel h2,
.side-panel h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 34px);
}

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

.search-box {
    flex: 0 1 420px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.72);
}

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

.search-box input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

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

.compact-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
    padding: clamp(34px, 6vw, 76px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.24), transparent 28%), linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(3, 7, 18, 0.96));
    box-shadow: var(--shadow);
}

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

.page-search {
    margin-top: 28px;
    max-width: 560px;
}

.section-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 58px 0 24px;
}

.section-title-row a,
.text-button {
    color: var(--amber-light);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.88);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(31, 41, 55, 0.94);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #020617;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #111827;
    background: var(--amber-light);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: rgba(251, 191, 36, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

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

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--soft);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-small h3 {
    font-size: 15px;
}

.movie-card-small p {
    min-height: 42px;
    font-size: 13px;
}

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

.movie-meta span,
.detail-meta span,
.tag-row span {
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: var(--amber-light);
    font-size: 12px;
}

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

.latest-list,
.ranking-full-list,
.side-list {
    display: grid;
    gap: 12px;
}

.ranking-full-list {
    margin-top: 32px;
}

.rank-row {
    display: grid;
    grid-template-columns: auto 92px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.86);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(31, 41, 55, 0.94);
}

.rank-row img {
    width: 92px;
    height: 62px;
    border-radius: 10px;
    object-fit: cover;
    background: #020617;
}

.rank-number {
    min-width: 34px;
    color: var(--amber-light);
    font-weight: 900;
    text-align: center;
}

.rank-content {
    min-width: 0;
}

.rank-content strong,
.rank-content em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-content strong {
    color: #ffffff;
    font-size: 16px;
}

.rank-content em {
    margin-top: 6px;
    color: var(--soft);
    font-size: 13px;
    font-style: normal;
}

.category-stack {
    padding-bottom: 70px;
}

.category-strip {
    margin-top: 28px;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    min-height: 260px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.86);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.category-card-large h2 {
    margin: 0 0 12px;
    font-size: 30px;
}

.category-card-large p {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-thumbs img {
    width: 100%;
    height: 112px;
    border-radius: 12px;
    object-fit: cover;
    background: #020617;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--soft);
    font-size: 14px;
}

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

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

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

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    cursor: pointer;
    box-shadow: 0 18px 46px rgba(245, 158, 11, 0.35);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-start span {
    margin-left: 5px;
    font-size: 34px;
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.86fr);
    gap: 28px;
}

.detail-main,
.detail-side,
.text-panel,
.side-panel,
.related-section {
    min-width: 0;
}

.detail-title-card,
.text-panel,
.side-panel,
.related-section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.88);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.detail-title-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
}

.detail-poster {
    width: 180px;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    object-fit: cover;
    background: #020617;
}

.detail-title-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
}

.detail-title-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.8;
}

.detail-tags {
    margin-top: 16px;
}

.text-panel,
.side-panel,
.related-section {
    margin-top: 22px;
    padding: 24px;
}

.text-panel h2,
.side-panel h2 {
    margin-bottom: 14px;
    color: var(--amber-light);
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.95;
    font-size: 16px;
}

.side-panel {
    margin-top: 0;
    position: sticky;
    top: 92px;
}

.side-panel .rank-row {
    grid-template-columns: 0 88px minmax(0, 1fr);
    gap: 10px;
}

.side-panel .rank-number {
    display: none;
}

.side-panel .rank-row img {
    width: 88px;
    height: 58px;
}

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

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.32), rgba(0, 0, 0, 0.95));
}

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

.footer-brand {
    margin-bottom: 12px;
    color: var(--amber-light);
    font-size: 24px;
    font-weight: 900;
}

.site-footer p,
.site-footer li,
.site-footer a {
    color: var(--soft);
    line-height: 1.8;
}

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

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer a:hover {
    color: var(--amber-light);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
}

.is-filtered-out {
    display: none !important;
}

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

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

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

    .side-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .home-hero {
        min-height: 660px;
    }

    .hero-content {
        left: 20px;
        width: calc(100% - 40px);
    }

    .hero-actions,
    .search-band,
    .section-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        flex: 1 1 auto;
        width: 100%;
    }

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

    .rank-grid,
    .footer-grid,
    .detail-title-card {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(220px, 100%);
    }

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

    .rank-row img {
        width: 82px;
        height: 58px;
    }

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

@media (max-width: 480px) {
    .brand-name {
        font-size: 22px;
    }

    .movie-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .poster-link {
        aspect-ratio: 16 / 11;
    }

    .hero-dot {
        width: 10px;
        height: 10px;
    }
}
