:root {
    --bg: #fafaf9;
    --paper: #ffffff;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --amber: #d97706;
    --amber-dark: #92400e;
    --orange: #c2410c;
    --rose: #e11d48;
    --shadow: 0 20px 45px rgba(28, 25, 23, 0.14);
    --soft-shadow: 0 10px 24px rgba(28, 25, 23, 0.10);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #92400e, #9a3412, #7c2d12);
    color: #fff;
    box-shadow: 0 12px 30px rgba(124, 45, 18, 0.22);
}

.header-inner {
    max-width: 1220px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fde68a;
    transform: translateY(-1px);
}

.header-search,
.mobile-search,
.inline-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search {
    width: 300px;
}

.header-search input,
.mobile-search input,
.inline-search input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 10px 14px;
    outline: none;
}

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

.header-search button,
.mobile-search button,
.inline-search button {
    border: 0;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

.mobile-link {
    display: block;
    padding: 11px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.92);
}

.page-main {
    max-width: 1220px;
    margin: 0 auto;
    padding: 34px 24px 64px;
}

.hero-carousel {
    max-width: none;
    margin: 0;
    padding: 0;
    background: #1c1917;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 96px max(28px, calc((100vw - 1220px) / 2 + 24px)) 90px;
    transition: opacity 0.55s ease, transform 0.55s ease;
    transform: scale(1.02);
}

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

.hero-copy {
    max-width: 720px;
    color: #fff;
}

.eyebrow {
    margin-bottom: 12px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-text {
    max-width: 660px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.86;
}

.hero-tags,
.detail-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.detail-meta span,
.movie-meta-line span {
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.90);
    font-size: 13px;
    font-weight: 750;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 24px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 16px 28px rgba(234, 88, 12, 0.28);
}

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

.ghost-button {
    min-height: 48px;
    padding: 0 22px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.hero-poster {
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    width: 34px;
    background: #f59e0b;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 24px;
    align-items: center;
    margin: 0 0 40px;
    padding: 28px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #9a3412, #d97706);
    color: #fff;
    box-shadow: var(--shadow);
}

.search-panel h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 950;
}

.search-panel p {
    color: rgba(255, 255, 255, 0.82);
}

.inline-search input {
    background: rgba(255, 255, 255, 0.17);
}

.content-section,
.category-overview-section,
.ranking-preview,
.detail-content,
.player-section {
    margin-bottom: 56px;
}

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

.section-heading h2 {
    display: inline;
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 720px;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.75;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border-radius: 12px;
    background: #fffbeb;
    color: var(--amber);
    font-weight: 950;
}

.section-more,
.text-link {
    color: var(--amber-dark);
    font-weight: 900;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--paper);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #7c2d12, #292524);
}

.poster img {
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #e11d48);
    font-weight: 950;
    box-shadow: 0 10px 22px rgba(225, 29, 72, 0.30);
}

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

.movie-meta-line {
    gap: 6px;
    margin-bottom: 10px;
}

.movie-meta-line span {
    background: #fff7ed;
    color: #9a3412;
    padding: 4px 8px;
    font-size: 12px;
}

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

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

.movie-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.72;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    border-radius: 999px;
    background: #f5f5f4;
    color: #57534e;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 750;
}

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

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

.category-card {
    border-radius: 22px;
    background: var(--paper);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-main {
    display: block;
    min-height: 150px;
    padding: 26px;
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.38), transparent 34%), linear-gradient(135deg, #7c2d12, #c2410c);
    color: #fff;
}

.category-main span {
    display: block;
    margin-bottom: 14px;
    color: #fde68a;
    font-weight: 950;
}

.category-main strong {
    display: block;
    font-size: 22px;
    line-height: 1.45;
}

.category-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
}

.category-links a {
    min-height: 48px;
    padding: 12px 14px;
    background: #fff;
    color: #44403c;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-links a:hover {
    color: var(--amber-dark);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 78px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #fffbeb;
    color: var(--amber-dark);
    font-weight: 950;
}

.rank-thumb {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #292524;
}

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 950;
}

.rank-content p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.page-hero,
.detail-hero {
    border-radius: 30px;
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.35), transparent 34%), linear-gradient(135deg, #292524, #7c2d12);
    color: #fff;
    box-shadow: var(--shadow);
}

.slim-hero {
    margin-bottom: 36px;
    padding: 58px;
}

.slim-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.slim-hero p:not(.eyebrow) {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.detail-main {
    padding-top: 28px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    padding: 38px;
    margin-bottom: 42px;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

.detail-intro h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    line-height: 1.82;
}

.detail-meta {
    margin: 22px 0 16px;
}

.tag-row-large span {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
}

.player-section h2 {
    margin: 0 0 16px;
    font-size: 30px;
    font-weight: 950;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.56));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 18px 42px rgba(234, 88, 12, 0.35);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

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

.synopsis-card {
    padding: 30px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.synopsis-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 950;
}

.synopsis-card p {
    color: #44403c;
    line-height: 1.95;
}

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

.empty-state {
    margin-top: 28px;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--soft-shadow);
}

.site-footer {
    background: #1c1917;
    color: rgba(255, 255, 255, 0.76);
}

.footer-inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 36px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}

.footer-brand {
    color: #fff;
    font-weight: 950;
    font-size: 20px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-nav a:hover {
    color: #fbbf24;
}

[hidden] {
    display: none !important;
}

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

    .nav-toggle {
        display: inline-flex;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 34px;
    }

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

@media (max-width: 820px) {
    .page-main {
        padding: 24px 16px 48px;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 62px 18px 74px;
    }

    .hero-poster {
        width: min(260px, 70vw);
        justify-self: center;
        transform: none;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 12px;
    }

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

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

    .rank-item .text-link {
        grid-column: 3;
        justify-self: start;
    }

    .slim-hero {
        padding: 34px 24px;
        border-radius: 24px;
    }

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

    .detail-poster {
        width: min(300px, 76vw);
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand-text {
        font-size: 17px;
    }

    .movie-grid,
    .movie-grid-dense,
    .related-grid,
    .category-grid,
    .category-grid-large,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 40px;
    }

    .hero-text,
    .slim-hero p:not(.eyebrow),
    .detail-one-line {
        font-size: 16px;
    }

    .rank-content p {
        display: none;
    }

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