:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(245, 158, 11, 0.32);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #f97316;
    --red: #ef4444;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 16% 8%, rgba(245, 158, 11, 0.16), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(34, 211, 238, 0.10), transparent 26rem),
        linear-gradient(135deg, #020617 0%, #0f172a 44%, #020617 100%);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 18px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #111827;
    font-weight: 900;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.26);
}

.logo-text {
    font-size: 1.08rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--soft);
    padding: 10px 12px;
    border-radius: 10px;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.10);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    cursor: pointer;
}

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

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

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

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    border-bottom: 1px solid var(--line-strong);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.70) 46%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.20) 55%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 118px;
}

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

.hero-kicker,
.section-heading span,
.page-hero span,
.rank-panel-head span,
.category-overview-card span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 20px 0 18px;
    font-size: clamp(2.6rem, 7vw, 6rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    text-shadow: 0 24px 70px rgba(0, 0, 0, 0.60);
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: clamp(1rem, 2vw, 1.24rem);
    line-height: 1.8;
}

.hero-meta,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-tags span,
.tag-row span {
    color: #fde68a;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.85rem;
}

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

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

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

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

.btn-ghost {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(245, 158, 11, 0.26);
    backdrop-filter: blur(14px);
}

.full-btn {
    width: 100%;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.54);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 74px;
    z-index: 6;
    display: flex;
    width: min(560px, calc(100% - 32px));
    padding: 8px;
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
    box-shadow: var(--shadow);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--text);
    border: 1px solid var(--line);
    outline: none;
    background: rgba(15, 23, 42, 0.86);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0 14px;
}

.hero-search button {
    color: #111827;
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    cursor: pointer;
}

.page-section {
    padding: 68px 0 0;
}

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

.section-heading h2,
.rank-panel-head h2 {
    margin: 12px 0 8px;
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.category-overview-card p,
.footer-grid p,
.card-line,
.detail-one-line,
.content-card p,
.side-card p {
    color: var(--muted);
    line-height: 1.78;
}

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

.card-grid-six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

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

.spaced-grid {
    margin-top: 24px;
}

.movie-card,
.rank-row,
.category-tile,
.category-overview-card,
.content-card,
.side-card,
.rank-panel,
.player-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
}

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.52);
    background: rgba(30, 41, 59, 0.82);
    box-shadow: 0 24px 54px rgba(245, 158, 11, 0.12);
}

.card-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.card-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .card-poster::after {
    opacity: 1;
}

.card-poster img,
.category-tile img,
.category-overview-card img,
.rank-row img,
.side-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-poster img,
.category-tile img {
    transition: transform 0.5s ease;
}

.movie-card:hover .card-poster img,
.category-tile:hover img {
    transform: scale(1.09);
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    color: var(--amber-light);
    font-weight: 900;
    font-size: 0.76rem;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin: 0 0 8px;
    min-height: 2.8em;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

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

.card-meta {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.card-line {
    display: -webkit-box;
    margin: 0 0 12px;
    font-size: 0.86rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row span {
    padding: 4px 7px;
    color: var(--soft);
    font-size: 0.72rem;
}

.movie-card-large .card-poster {
    aspect-ratio: 16 / 10;
}

.movie-card-large .card-body h3 {
    font-size: 1.24rem;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.category-grid,
.category-overview-grid {
    display: grid;
    gap: 18px;
}

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

.category-tile {
    position: relative;
    min-height: 186px;
    overflow: hidden;
    border-radius: 22px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.22));
}

.category-tile img {
    position: absolute;
    inset: 0;
}

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

.category-tile span {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--soft);
    line-height: 1.6;
}

.rank-panel {
    position: sticky;
    top: 92px;
    border-radius: 22px;
    padding: 22px;
}

.rank-panel-head {
    margin-bottom: 18px;
}

.rank-panel-head a {
    color: var(--amber-light);
    font-weight: 800;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 64px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    border-radius: 16px;
    padding: 10px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.48);
    background: rgba(30, 41, 59, 0.82);
}

.rank-number {
    color: var(--amber-light);
    font-size: 1.05rem;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
}

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

.rank-content strong {
    display: block;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-content em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-score {
    color: #111827;
    font-weight: 900;
    text-align: center;
    border-radius: 10px;
    padding: 7px 0;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line-strong);
    background:
        radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.22), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.page-hero .container {
    padding: 72px 0;
}

.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #cbd5e1;
    font-size: 1.05rem;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    border-radius: 24px;
    padding: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

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

.category-covers img {
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 12px 0 8px;
    font-size: 1.6rem;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px 170px auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(14px);
}

.filter-bar input,
.filter-bar select {
    height: 44px;
    border-radius: 12px;
    padding: 0 12px;
}

.filter-count {
    color: var(--amber-light);
    font-weight: 800;
    white-space: nowrap;
}

.empty-state {
    display: none;
    margin-top: 28px;
    padding: 40px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 18px;
}

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

.detail-hero {
    padding: 42px 0 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: stretch;
}

.player-card {
    border-radius: 26px;
    padding: 12px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.14), transparent 14rem),
        #020617;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: var(--text);
    border: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.30)),
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 18rem);
    cursor: pointer;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    color: #111827;
    font-size: 2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.32);
}

.player-overlay strong {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.66);
}

.detail-info {
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 28px;
    background: var(--panel-strong);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.detail-one-line {
    font-size: 1.02rem;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.detail-meta-grid span {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.36);
    font-weight: 900;
}

.detail-meta-grid em {
    color: var(--muted);
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 600;
}

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

.content-card,
.side-card {
    border-radius: 24px;
    padding: 28px;
}

.content-card h2 {
    margin: 0 0 12px;
    color: var(--amber-light);
    font-size: 1.5rem;
}

.content-card h2:not(:first-child) {
    margin-top: 28px;
}

.content-card p {
    margin: 0;
    color: #dbeafe;
    font-size: 1.02rem;
}

.side-card {
    position: sticky;
    top: 92px;
}

.side-card img {
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    margin-bottom: 18px;
}

.side-card h3 {
    margin: 0 0 8px;
    font-size: 1.3rem;
}

.side-card p {
    margin: 0 0 18px;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--line-strong);
    background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--amber-light);
}

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

.footer-links a {
    color: var(--muted);
    transition: color 0.25s ease;
}

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

.footer-bottom {
    padding: 18px 0 28px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

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

@media (max-width: 1120px) {
    .card-grid-six,
    .card-grid-five {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .rank-panel,
    .side-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        align-items: center;
        padding-bottom: 112px;
    }

    .hero-search {
        bottom: 54px;
    }

    .hero-dots {
        bottom: 20px;
    }

    .card-grid-six,
    .card-grid-five,
    .category-overview-grid,
    .full-rank-list,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .nav-bar {
        min-height: 64px;
    }

    .logo-text {
        font-size: 0.98rem;
    }

    .hero-slider {
        height: auto;
        min-height: 720px;
    }

    .hero-overlay {
        background:
            linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.74) 55%, rgba(2, 6, 23, 0.32) 100%),
            linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.20));
    }

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

    .hero-copy h1 {
        font-size: 3rem;
    }

    .hero-actions,
    .page-hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-search {
        flex-direction: column;
        gap: 8px;
    }

    .hero-search input,
    .hero-search button {
        min-height: 42px;
    }

    .card-grid-six,
    .card-grid-five,
    .card-grid-four,
    .feature-grid,
    .category-grid,
    .category-overview-grid,
    .full-rank-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-score {
        display: none;
    }

    .detail-info,
    .content-card,
    .side-card {
        padding: 20px;
    }

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