:root {
    --bg: #0f172a;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --dark: #020617;
    --dark-soft: #111827;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --orange: #ea580c;
    --radius: 22px;
    --shadow: 0 22px 70px rgba(15, 23, 42, 0.14);
    --shadow-strong: 0 30px 90px rgba(15, 23, 42, 0.32);
    --container: min(1180px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 18%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0));
    transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.site-header.is-scrolled,
body:not(.home-page) .site-header {
    color: var(--text);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 45px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.38);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.brand-text small {
    margin-top: 4px;
    color: currentColor;
    opacity: 0.72;
    font-size: 0.72rem;
}

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

.nav-link,
.mobile-nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: var(--container);
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.hero-carousel {
    position: relative;
    min-height: 100vh;
    padding: 118px max(16px, calc((100vw - 1180px) / 2)) 54px;
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
    align-items: center;
    gap: 42px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.42), transparent 28%), linear-gradient(135deg, #020617 0%, #111827 52%, #7c2d12 100%);
}

.hero-carousel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: 0.25;
}

.hero-intro,
.hero-stage {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--amber);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-intro h1 {
    margin: 0;
    max-width: 720px;
    font-size: clamp(2.6rem, 8vw, 6.2rem);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

.hero-intro p:not(.eyebrow) {
    max-width: 620px;
    margin: 24px 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.1rem;
    line-height: 1.85;
}

.hero-search {
    display: flex;
    width: min(100%, 620px);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 18px;
    color: #ffffff;
    background: transparent;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.hero-search button,
.btn-primary,
.btn-ghost,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.hero-search button,
.btn-primary {
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.3);
}

.hero-search button:hover,
.btn-primary:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(245, 158, 11, 0.38);
}

.btn-ghost {
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.hero-stage {
    min-height: 620px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-image,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: cover;
}

.hero-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.06) 0%, rgba(2, 6, 23, 0.64) 42%, rgba(2, 6, 23, 0.94) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: clamp(24px, 5vw, 54px);
}

.hero-content h2 {
    margin: 0;
    max-width: 720px;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 720px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.75;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    padding: 8px 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

.category-section,
.content-section,
.category-overview {
    width: var(--container);
    margin: 0 auto;
    padding: 74px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-copy h2 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.05em;
}

.section-heading h2,
.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-more {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card:hover,
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

.category-tile {
    display: grid;
    align-content: end;
    padding: 22px;
}

.category-tile::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -34px;
    top: -32px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.18);
}

.category-tile span {
    position: relative;
    color: var(--amber-dark);
    font-weight: 900;
}

.category-tile strong {
    position: relative;
    margin-top: 8px;
    font-size: 1.3rem;
}

.category-tile em {
    position: relative;
    margin-top: 8px;
    color: var(--muted);
    font-style: normal;
    line-height: 1.55;
}

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

.movie-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.78) 100%);
}

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

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

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

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 0.74rem;
    font-weight: 900;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rank-number {
    right: 12px;
    bottom: 12px;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

.movie-card-body h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card-body p {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 12px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
}

.tag-row span {
    padding: 6px 9px;
}

.ranking-section {
    padding-top: 84px;
}

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

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

.ranking-item {
    display: block;
    border-radius: 20px;
}

.ranking-link {
    display: grid;
    grid-template-columns: 54px 78px minmax(0, 1fr) 54px;
    align-items: center;
    gap: 16px;
    padding: 14px;
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.ranking-link img {
    width: 78px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-text {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.ranking-text strong,
.ranking-text em,
.ranking-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-text strong {
    font-size: 1rem;
}

.ranking-text em,
.ranking-text small {
    color: var(--muted);
    font-style: normal;
}

.ranking-score {
    color: var(--amber-dark);
    font-weight: 900;
    font-size: 1.25rem;
}

.page-main,
.detail-main {
    width: var(--container);
    margin: 0 auto;
    padding-top: 118px;
}

.page-hero {
    overflow: hidden;
    margin-bottom: 42px;
    padding: 56px;
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 88% 15%, rgba(245, 158, 11, 0.34), transparent 28%), linear-gradient(135deg, #020617, #111827 52%, #7c2d12);
    box-shadow: var(--shadow-strong);
}

.page-hero h1 {
    color: #ffffff;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.05rem;
    line-height: 1.8;
}

.compact-hero {
    padding: 48px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
    padding: 0 14px;
    color: var(--text);
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.category-card a {
    display: grid;
    height: 100%;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    min-height: 180px;
    padding: 10px;
    background: #111827;
}

.category-covers img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    border-radius: 14px;
    object-fit: cover;
}

.category-card-body {
    padding: 20px;
}

.category-card-body h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.category-card-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--muted);
    font-weight: 800;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 32px;
    align-items: center;
}

.player-card,
.detail-info,
.detail-copy,
.related-section {
    border-radius: 32px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
    background: #020617;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}

.video-shell video,
.player-cover,
.player-cover img,
.player-cover-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-shell video {
    object-fit: contain;
    background: #000000;
}

.player-cover {
    z-index: 4;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000000;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover img {
    object-fit: cover;
}

.player-cover-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.76));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 22px 60px rgba(245, 158, 11, 0.42);
    font-size: 2.4rem;
    transform: translate(-50%, -50%);
}

.detail-info {
    padding: clamp(26px, 4vw, 42px);
}

.detail-info h1 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.06;
}

.detail-one-line {
    margin: 20px 0;
    color: #475569;
    line-height: 1.9;
    font-size: 1.06rem;
}

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

.detail-meta span {
    padding: 8px 12px;
}

.detail-copy {
    display: grid;
    gap: 26px;
    margin-top: 32px;
    padding: clamp(26px, 4vw, 44px);
}

.detail-copy article + article {
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-copy h2 {
    margin-bottom: 14px;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.detail-copy p {
    margin: 0;
    color: #334155;
    font-size: 1.04rem;
    line-height: 2;
}

.related-section {
    padding: 32px;
}

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

.movie-card-compact .movie-card-body p {
    -webkit-line-clamp: 2;
}

.site-footer {
    margin-top: 86px;
    color: #ffffff;
    background: linear-gradient(180deg, #111827, #020617);
}

.footer-inner {
    width: var(--container);
    margin: 0 auto;
    padding: 54px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 46px;
}

.footer-brand p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.8;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-column h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.68);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.52);
}

[hidden],
.is-filter-hidden {
    display: none !important;
}

@media (max-width: 1080px) {
    .hero-carousel,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 560px;
    }

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

    .ranking-list-home {
        grid-template-columns: 1fr;
    }
}

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

    .menu-button {
        display: block;
    }

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

    .hero-carousel {
        padding-top: 102px;
        gap: 28px;
    }

    .hero-search,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search {
        border-radius: 24px;
    }

    .hero-search button {
        margin-top: 8px;
    }

    .hero-stage {
        min-height: 520px;
        border-radius: 24px;
    }

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

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

    .page-hero,
    .compact-hero,
    .related-section {
        padding: 26px;
        border-radius: 24px;
    }

    .ranking-link {
        grid-template-columns: 44px 64px minmax(0, 1fr);
    }

    .ranking-score {
        display: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    :root {
        --container: min(100vw - 22px, 1180px);
    }

    .header-inner {
        height: 68px;
    }

    .brand-text strong {
        font-size: 1.15rem;
    }

    .hero-intro h1 {
        font-size: 2.75rem;
    }

    .hero-carousel {
        padding-left: 11px;
        padding-right: 11px;
    }

    .hero-stage {
        min-height: 470px;
    }

    .hero-content {
        padding: 22px;
    }

    .hero-control {
        display: none;
    }

    .category-grid,
    .category-card-grid,
    .movie-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .page-main,
    .detail-main {
        padding-top: 92px;
    }

    .player-button {
        width: 72px;
        height: 72px;
    }
}
