:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-soft: #1f2937;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-dark: #64748b;
    --line: rgba(255, 255, 255, 0.12);
    --brand: #f59e0b;
    --brand-strong: #d97706;
    --brand-light: #fef3c7;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #0f172a 0%, #111827 34%, #f8fafc 34%, #f8fafc 100%);
    color: #111827;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(146, 64, 14, 0.98), rgba(217, 119, 6, 0.98), rgba(245, 158, 11, 0.98));
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.35);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--brand-strong);
    background: var(--white);
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.15), 0 12px 24px rgba(120, 53, 15, 0.26);
}

.brand-text {
    font-size: 1.25rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.92);
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--brand-light);
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

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

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: var(--white);
    border-radius: 2px;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #0f172a;
}

.hero-track {
    position: relative;
    min-height: 680px;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 35%, rgba(245, 158, 11, 0.25), transparent 30%), linear-gradient(90deg, rgba(15, 23, 42, 0.93) 0%, rgba(15, 23, 42, 0.74) 42%, rgba(15, 23, 42, 0.26) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.94), transparent 36%);
}

.hero-content {
    position: absolute;
    left: max(28px, calc((100vw - 1180px) / 2));
    bottom: 110px;
    width: min(650px, calc(100% - 56px));
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--brand-light);
    background: rgba(245, 158, 11, 0.18);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: #92400e;
    background: #fef3c7;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.8rem, 8vw, 5.9rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p,
.page-hero p,
.detail-copy p {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2.4vw, 1.22rem);
    line-height: 1.8;
}

.hero-tags,
.card-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.86rem;
    font-weight: 700;
}

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

.primary-btn,
.secondary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #92400e;
    background: var(--white);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.secondary-btn {
    color: var(--white);
    background: rgba(245, 158, 11, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-dots {
    position: absolute;
    left: max(28px, calc((100vw - 1180px) / 2));
    bottom: 52px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dot.active {
    width: 56px;
    background: var(--brand);
}

.hero-side-card {
    position: absolute;
    right: max(28px, calc((100vw - 1180px) / 2));
    bottom: 68px;
    z-index: 4;
    width: min(330px, calc(100% - 56px));
    padding: 24px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-side-card span {
    color: var(--brand-light);
    font-weight: 900;
}

.hero-side-card strong {
    display: block;
    margin: 10px 0;
    font-size: 1.45rem;
}

.hero-side-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.7;
}

.quick-links,
.section-block,
.page-hero,
.detail-head {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.quick-links {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.quick-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    gap: 26px;
    padding: 32px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.quick-inner h2,
.section-title h2,
.story-panel h2,
.info-panel h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.65rem, 4vw, 2.5rem);
    letter-spacing: -0.04em;
}

.quick-inner p {
    margin: 12px 0 0;
    color: var(--muted-dark);
    line-height: 1.8;
}

.quick-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: center;
}

.quick-category-links a,
.inline-links a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-weight: 800;
}

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

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

.section-title span {
    display: block;
    color: var(--brand-strong);
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-title a {
    color: var(--brand-strong);
    font-weight: 900;
}

.compact-title {
    align-items: start;
    flex-direction: column;
    gap: 6px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.search-box {
    display: grid;
    gap: 8px;
    color: #334155;
    font-weight: 800;
}

.search-box input,
.select-row select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0 16px;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
}

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

.select-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.select-row select {
    min-width: 130px;
}

.ghost-btn {
    min-height: 48px;
    color: #92400e;
    background: #fef3c7;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

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

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

.movie-card:hover .poster-link img {
    transform: scale(1.07);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(15, 23, 42, 0.78));
}

.play-dot,
.card-score {
    position: absolute;
    z-index: 2;
}

.play-dot {
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(245, 158, 11, 0.92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.card-score {
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 900;
}

.card-body {
    padding: 18px;
}

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

.card-body h2 a:hover,
.card-body h3 a:hover,
.rank-info h3 a:hover {
    color: var(--brand-strong);
}

.card-body p {
    min-height: 48px;
    margin: 0;
    color: #64748b;
    line-height: 1.65;
    font-size: 0.94rem;
}

.card-meta {
    margin: 14px 0 12px;
    color: #64748b;
    font-size: 0.86rem;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.card-body .tag-row span,
.large-tags span {
    color: #92400e;
    background: #fffbeb;
}

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

.category-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border-radius: var(--radius);
    color: var(--white);
    box-shadow: var(--shadow);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.88));
}

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

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

.category-card span {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-card p {
    margin: 9px 0 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 26px;
    align-items: start;
}

.ranking-panel,
.story-panel,
.info-panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 78px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #f8fafc;
}

.rank-num {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    font-weight: 900;
}

.rank-thumb {
    display: block;
    width: 78px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.rank-info p {
    margin: 0 0 8px;
    color: #64748b;
    line-height: 1.55;
}

.rank-score {
    color: #92400e;
    font-size: 1.15rem;
    font-weight: 900;
}

.full-rank .rank-item {
    grid-template-columns: 54px 96px minmax(0, 1fr) 70px;
    padding: 16px;
}

.page-hero,
.detail-head {
    margin-top: 42px;
    padding: 62px;
    border-radius: 32px;
    color: var(--white);
    background: radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.36), transparent 25%), linear-gradient(135deg, #0f172a, #78350f 55%, #d97706);
    box-shadow: var(--shadow);
}

.slim-hero,
.rank-hero,
.category-hero {
    min-height: 310px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.category-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
}

.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
}

.category-overview-card p {
    color: #64748b;
    line-height: 1.75;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0;
}

.text-link {
    padding: 0;
    min-height: auto;
    color: var(--brand-strong);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    align-items: end;
}

.detail-copy h1 {
    font-size: clamp(2.5rem, 6vw, 4.9rem);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

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

.player-section {
    padding-top: 42px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.3);
    cursor: pointer;
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    outline: none;
}

.video-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.26), rgba(2, 6, 23, 0.58));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #92400e;
    background: var(--white);
    font-size: 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.video-overlay strong {
    font-size: 1.2rem;
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.story-panel,
.info-panel {
    padding: 30px;
}

.story-panel h2,
.info-panel h2 {
    margin-bottom: 16px;
    font-size: 1.7rem;
}

.story-panel p {
    margin: 0 0 26px;
    color: #475569;
    font-size: 1.04rem;
    line-height: 1.95;
}

.info-panel ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-panel li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.info-panel li span {
    color: #64748b;
}

.info-panel li strong {
    text-align: right;
    color: #111827;
}

.detail-neighbors {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.detail-neighbors a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #92400e;
    background: #fffbeb;
    font-weight: 800;
}

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

[data-card].is-hidden {
    display: none;
}

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

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

    .two-column-section,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    body {
        background: linear-gradient(180deg, #0f172a 0%, #111827 22%, #f8fafc 22%, #f8fafc 100%);
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 22px;
        background: rgba(120, 53, 15, 0.97);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 14px 16px;
    }

    .hero,
    .hero-track,
    .hero-slide img {
        min-height: 620px;
    }

    .hero-content {
        bottom: 110px;
    }

    .hero-side-card {
        display: none;
    }

    .quick-inner,
    .filter-panel,
    .detail-layout,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .select-row {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

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

    .rank-item,
    .full-rank .rank-item {
        grid-template-columns: 42px 72px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .nav-wrap,
    .quick-links,
    .section-block,
    .page-hero,
    .detail-head {
        width: min(100% - 22px, 1180px);
    }

    .hero,
    .hero-track,
    .hero-slide img {
        min-height: 590px;
    }

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

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 2.55rem;
    }

    .hero-dots {
        left: 18px;
    }

    .quick-inner {
        padding: 22px;
    }

    .section-block {
        padding-top: 52px;
    }

    .section-title {
        align-items: start;
        flex-direction: column;
        gap: 8px;
    }

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

    .card-body p {
        min-height: auto;
    }

    .story-panel,
    .info-panel {
        padding: 22px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
    }
}
