:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --paper-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --amber: #f59e0b;
    --orange: #ea580c;
    --gold: #fbbf24;
    --blue: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        linear-gradient(180deg, #fff7ed 0, var(--bg) 34rem);
    line-height: 1.6;
}

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

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

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: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.25);
}

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

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

.nav-link,
.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: #334155;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-trigger:hover {
    color: var(--orange);
    background: #fff7ed;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 50px;
    min-width: 170px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--soft-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.dropdown-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 12px;
    color: #334155;
}

.dropdown-menu a:hover {
    color: var(--orange);
    background: #fff7ed;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff7ed;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--orange);
}

.hero-carousel {
    position: relative;
    min-height: clamp(560px, 72vh, 760px);
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.1s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 26%, rgba(245, 158, 11, 0.36), transparent 25rem),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.2)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 45%);
}

.hero-content {
    position: relative;
    min-height: clamp(560px, 72vh, 760px);
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    color: #ffffff;
    padding: 80px 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(234, 88, 12, 0.28);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 21px);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.24);
    font-size: 13px;
    font-weight: 700;
}

.detail-tags .tag-pill,
.hero-copy .tag-pill {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.25);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.48);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 32px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.active {
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.quick-search {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search span,
.section-heading span {
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.quick-search h2 {
    margin: 4px 0 0;
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.search-controls {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
}

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

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

.inline-search {
    max-width: 540px;
    grid-template-columns: 1fr;
    margin-bottom: 22px;
}

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

.section-heading {
    position: relative;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 5px 0 8px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.section-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.section-more {
    position: absolute;
    right: 0;
    top: 16px;
    color: var(--orange);
    font-weight: 850;
}

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

.category-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 235, 0.9)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 10rem);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong,
.category-overview-card strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.category-tile small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.category-tile em {
    position: absolute;
    left: 22px;
    bottom: 18px;
    color: var(--orange);
    font-style: normal;
    font-weight: 900;
}

.category-glow {
    position: absolute;
    right: -30px;
    top: -30px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
}

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

.compact-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0, #fff7ed);
}

.poster-link img,
.category-overview-card img,
.top-rank-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 58%);
    opacity: 0.82;
}

.category-badge,
.duration-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 850;
}

.category-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.duration-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.78);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    min-height: 2.6em;
    font-size: 17px;
    line-height: 1.3;
}

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

.movie-card p {
    margin: 0 0 12px;
    min-height: 3.2em;
    color: var(--muted);
    font-size: 14px;
}

.movie-card-small h3 {
    font-size: 15px;
}

.movie-card-small p {
    display: none;
}

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.rating {
    color: #d97706;
    font-weight: 900;
}

.horizontal-scroller {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 330px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
}

.horizontal-scroller .movie-card {
    scroll-snap-align: start;
}

.result-counter {
    margin: 0 0 18px;
    color: var(--muted);
    font-weight: 800;
}

.page-main {
    padding-bottom: 64px;
}

.page-hero {
    position: relative;
    padding: 96px 0 86px;
    color: #ffffff;
    background:
        radial-gradient(circle at 76% 20%, rgba(245, 158, 11, 0.38), transparent 24rem),
        linear-gradient(135deg, #111827, #1e293b 52%, #431407);
    overflow: hidden;
}

.page-hero h1 {
    margin: 0 0 12px;
}

.page-hero p {
    max-width: 780px;
}

.small-hero {
    padding-bottom: 70px;
}

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

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

.hero-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-stat-row span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.category-overview-card,
.top-rank-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0f172a;
    box-shadow: var(--soft-shadow);
}

.category-overview-card div,
.top-rank-card div {
    position: absolute;
    z-index: 3;
    left: 20px;
    right: 20px;
    bottom: 20px;
    color: #ffffff;
}

.category-overview-card p,
.top-rank-card p {
    margin: 8px 0 10px;
    color: #e2e8f0;
    font-size: 14px;
}

.category-overview-card em,
.top-rank-card em {
    color: #fbbf24;
    font-style: normal;
    font-weight: 900;
}

.top-rank-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
}

.top-rank-card {
    min-height: 320px;
}

.top-rank-card.rank-1 {
    min-height: 380px;
}

.detail-main {
    padding-bottom: 72px;
}

.detail-hero {
    position: relative;
    color: #ffffff;
    overflow: hidden;
    background: #0f172a;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--poster-image);
    background-size: cover;
    background-position: center;
    filter: blur(28px) saturate(1.2);
    transform: scale(1.08);
    opacity: 0.45;
}

.detail-hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 26%, rgba(245, 158, 11, 0.28), transparent 22rem),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
}

.detail-hero-inner {
    position: relative;
    padding: 42px 0 58px;
}

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

.detail-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    background: linear-gradient(135deg, #334155, #111827);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.35);
}

.detail-copy p {
    max-width: 780px;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 26px;
}

.detail-stats span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.player-section {
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.24), transparent 16rem),
        rgba(2, 6, 23, 0.42);
    border: 0;
    cursor: pointer;
    transition: opacity 0.24s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 38px rgba(234, 88, 12, 0.36);
    font-size: 28px;
}

.player-overlay strong {
    font-size: 24px;
}

.player-overlay em {
    color: #e2e8f0;
    font-style: normal;
}

.player-status {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    padding: 12px 14px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(10px);
}

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

.detail-article,
.detail-info-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--soft-shadow);
}

.detail-article {
    padding: 28px;
}

.detail-article h2,
.detail-info-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.detail-article p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 16px;
}

.detail-info-card {
    align-self: start;
    padding: 24px;
}

.detail-info-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.detail-info-card div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-info-card dt {
    color: var(--muted);
}

.detail-info-card dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 80px;
    padding: 48px 0 26px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
}

.site-footer p {
    color: #94a3b8;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.site-footer a:not(.brand) {
    display: block;
    margin: 6px 0;
    color: #cbd5e1;
}

.copyright {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 14px;
}

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

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

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

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

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

    .top-rank-grid {
        grid-template-columns: 1fr;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .dropdown-menu {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 14px;
        margin-top: 6px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 620px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search {
        grid-template-columns: 1fr;
    }

    .search-controls {
        grid-template-columns: 1fr;
    }

    .section-more {
        position: static;
        display: inline-flex;
        margin-top: 10px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-copy h1,
    .hero-copy h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .detail-info-card div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .copyright {
        flex-direction: column;
    }
}
