
:root {
    --amber: #f59e0b;
    --orange: #f97316;
    --rose: #f43f5e;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(15, 23, 42, 0.1);
    --card: #ffffff;
    --paper: #fff7ed;
    --shadow: 0 24px 70px rgba(146, 64, 14, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 45%, #fff1f2 100%);
    min-height: 100vh;
}

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

img,
video {
    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: 50;
    background: linear-gradient(90deg, var(--amber), var(--orange), var(--rose));
    box-shadow: 0 16px 36px rgba(190, 90, 16, 0.28);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    padding: 8px 12px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

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

.hero-carousel {
    position: relative;
    height: min(720px, 72vh);
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

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

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

.hero-image,
.page-hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade,
.page-hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    max-width: 1180px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fcd34d;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
    font-weight: 900;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-title {
    margin-top: 12px !important;
    font-size: clamp(28px, 4vw, 54px) !important;
}

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 18px 0 0;
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.86);
}

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

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

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.36);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px) scale(1.02);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-search {
    margin-top: -54px;
    position: relative;
    z-index: 8;
}

.search-panel,
.story-card,
.ranking-panel,
.category-card,
.category-tile,
.movie-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.search-panel {
    border-radius: 28px;
    padding: 24px;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
    align-items: center;
}

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

.search-panel p,
.section-heading p,
.story-card p,
.category-card p,
.category-tile p,
.movie-card p,
.compact-card p {
    color: var(--muted);
    line-height: 1.7;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 0.35fr));
    gap: 12px;
}

.movie-search,
.movie-filter {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    padding: 13px 14px;
    outline: none;
    color: var(--ink);
}

.movie-search:focus,
.movie-filter:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.content-section {
    padding: 54px 0;
}

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

.section-more {
    color: var(--orange);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.12);
}

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

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

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

.movie-card {
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(190, 90, 16, 0.22);
}

.poster-frame {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b, #f43f5e);
}

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

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.52));
    opacity: 0.85;
}

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

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

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

.movie-card h3 {
    margin: 0 0 9px;
    font-size: 19px;
    font-weight: 950;
    line-height: 1.25;
}

.movie-card p {
    min-height: 48px;
    margin: 0;
    font-size: 14px;
}

.movie-meta-row,
.score-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 13px;
}

.movie-meta-row span,
.score-line span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff7ed;
}

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

.category-tile,
.category-card {
    position: relative;
    min-height: 168px;
    border-radius: 26px;
    overflow: hidden;
    color: #ffffff;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-tile::after,
.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

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

.category-tile div {
    position: absolute;
    inset: auto 18px 18px;
}

.category-tile span,
.category-card h2 {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 950;
}

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

.ranking-panel {
    border-radius: 28px;
    padding: 22px;
}

.compact-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 13px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 34px rgba(190, 90, 16, 0.14);
}

.compact-card img {
    width: 112px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.4s ease;
}

.compact-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
}

.compact-card p {
    margin: 0 0 5px;
    font-size: 12px;
}

.compact-card span {
    color: var(--orange);
    font-size: 12px;
    font-weight: 800;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 7px;
    border-radius: 50%;
    color: #ffffff !important;
    background: linear-gradient(90deg, var(--amber), var(--rose));
    font-size: 12px !important;
}

.page-main {
    min-height: 70vh;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.compact-hero {
    padding: 96px 0 82px;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.38), transparent 34%), linear-gradient(135deg, #111827, #7c2d12 52%, #9f1239);
}

.category-hero {
    min-height: 440px;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    padding: 110px 0 80px;
}

.category-card {
    min-height: 260px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-thumbs {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

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

.category-card span {
    color: #fcd34d;
    font-weight: 900;
}

.top-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.detail-hero {
    min-height: 620px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 80px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fcd34d;
}

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

.detail-poster {
    margin: 0;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

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

.detail-tags a {
    color: #7c2d12;
}

.detail-content-section {
    margin-top: -80px;
    position: relative;
    z-index: 3;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.detail-primary,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.32);
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.6));
}

.player-cover span {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    font-size: 34px;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.48);
}

.player-shell.is-playing .player-cover {
    display: none;
}

.story-card {
    border-radius: 28px;
    padding: 26px;
}

.story-card p {
    margin: 14px 0 0;
    font-size: 16px;
}

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

.sticky-panel {
    position: sticky;
    top: 88px;
}

.movie-card.is-hidden {
    display: none;
}

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

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

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

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

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

    .hero-carousel {
        height: 640px;
        min-height: 640px;
    }

    .hero-shade,
    .page-hero-shade,
    .detail-shade {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.24));
    }

    .search-panel,
    .filter-bar,
    .detail-intro,
    .top-three {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 560px) {
    .container,
    .site-header-inner,
    .mobile-nav,
    .hero-content {
        width: min(100% - 22px, 1180px);
    }

    .site-logo {
        font-size: 18px;
    }

    .hero-content h1,
    .hero-content h2,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 38px;
    }

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

    .compact-card {
        grid-template-columns: 96px 1fr;
    }

    .compact-card img {
        width: 96px;
        height: 64px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .content-section {
        padding: 38px 0;
    }

    .detail-hero-inner {
        padding-top: 54px;
    }
}
