:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-900: #78350f;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
    --soft-shadow: 0 10px 25px rgba(120, 53, 15, 0.10);
    --radius: 24px;
    --radius-sm: 16px;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, var(--amber-50) 0%, #ffffff 42%, var(--amber-50) 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 251, 235, 0.92);
    border-bottom: 1px solid rgba(217, 119, 6, 0.16);
    box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 18px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.brand-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
    font-size: clamp(20px, 2vw, 26px);
    background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-600);
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--amber-200);
    border-radius: 999px;
}

.top-search input,
.mobile-search input {
    width: 190px;
    padding: 10px 12px 10px 18px;
    border: 0;
    outline: 0;
    background: transparent;
}

.top-search button,
.mobile-search button {
    border: 0;
    color: var(--white);
    background: var(--amber-600);
    padding: 10px 14px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 9px;
    border: 0;
    background: transparent;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #374151;
}

.mobile-panel {
    display: none;
    padding: 14px 16px 20px;
    background: var(--white);
    border-top: 1px solid var(--amber-200);
}

.mobile-panel.open {
    display: grid;
    gap: 10px;
}

.mobile-link {
    display: block;
    padding: 10px 6px;
    color: #374151;
    font-weight: 700;
}

.mobile-link.active {
    color: var(--amber-600);
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: linear-gradient(115deg, var(--amber-500), var(--orange-500));
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.18), transparent 34%),
        linear-gradient(90deg, rgba(120, 53, 15, 0.92) 0%, rgba(217, 119, 6, 0.74) 48%, rgba(17, 24, 39, 0.48) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    min-height: 640px;
    gap: 48px;
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--amber-100);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-one-line,
.detail-one-line,
.page-hero p {
    max-width: 760px;
    margin: 22px 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.7;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    color: var(--amber-700);
    background: var(--amber-100);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

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

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

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

.btn.primary {
    color: var(--amber-700);
    background: var(--white);
    box-shadow: 0 18px 32px rgba(255, 255, 255, 0.18);
}

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

.btn.ghost.light {
    color: var(--white);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.24);
    border-radius: 34px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 8px 12px;
    color: var(--white);
    background: var(--amber-600);
    border-radius: 999px;
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateX(-50%);
}

.hero-controls > button,
.hero-dots button {
    border: 0;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    font-size: 26px;
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 999px;
}

.hero-dots button.active {
    width: 30px;
    background: var(--white);
}

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

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.feature-grid article,
.category-card,
.movie-card,
.filter-panel,
.category-overview-card,
.detail-sidebar,
.detail-article,
.cta-card {
    background: var(--white);
    border: 1px solid rgba(217, 119, 6, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.feature-grid article {
    padding: 28px;
    background: linear-gradient(135deg, var(--white), var(--amber-50));
}

.feature-grid span {
    font-size: 34px;
}

.feature-grid h2,
.category-overview-card h2,
.detail-article h2,
.detail-sidebar h2 {
    margin: 12px 0 8px;
    font-size: 22px;
}

.feature-grid p,
.category-card p,
.category-overview-card p,
.movie-info p,
.list-content p,
.detail-article p,
.detail-sidebar dd,
.site-footer p,
.site-footer span {
    color: var(--muted);
    line-height: 1.7;
}

.content-section.warm {
    background: linear-gradient(180deg, var(--white), var(--amber-50));
}

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

.section-title h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1;
}

.section-title p {
    margin: 0;
    color: var(--muted);
}

.section-link {
    color: var(--amber-600);
    font-weight: 900;
}

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

.category-card {
    display: block;
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
    font-size: 32px;
}

.category-card strong,
.category-card small {
    display: block;
}

.category-card strong {
    margin-top: 10px;
    font-size: 20px;
}

.category-card small {
    margin: 4px 0 12px;
    color: var(--amber-600);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-100), var(--amber-50));
    aspect-ratio: 3 / 4;
}

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

.movie-card:hover .movie-poster img,
.movie-card:hover .list-poster img,
.detail-poster:hover img {
    transform: scale(1.06);
}

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    color: var(--white);
    background: var(--amber-600);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.type-badge {
    top: 10px;
    right: 10px;
}

.type-badge.inline {
    position: static;
    display: inline-flex;
}

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

.movie-info {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: var(--amber-600);
}

.movie-title.large {
    display: block;
    min-height: auto;
    font-size: 22px;
}

.movie-meta,
.detail-meta,
.list-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 800;
}

.movie-meta span:first-child,
.detail-meta span:first-child {
    color: var(--amber-600);
}

.movie-card.compact {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
}

.movie-card.compact .movie-poster {
    height: 100%;
}

.movie-card.compact .movie-title {
    min-height: auto;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(120deg, var(--amber-600), var(--orange-600));
}

.page-hero.slim {
    padding: 72px 0;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(34px, 5vw, 56px);
}

.library-shell {
    padding: 44px 0 80px;
}

.filter-panel {
    position: sticky;
    top: 88px;
    z-index: 20;
    margin-bottom: 28px;
    padding: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 12px;
}

.filter-grid label {
    display: grid;
    gap: 7px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 900;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: var(--white);
}

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

.filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    color: var(--muted);
    font-weight: 800;
}

.view-switch {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--amber-200);
    border-radius: 12px;
}

.view-switch button {
    padding: 8px 12px;
    border: 0;
    color: #4b5563;
    background: var(--white);
}

.view-switch button.active {
    color: var(--white);
    background: var(--amber-600);
}

.library-grid.list-view {
    display: grid;
    grid-template-columns: 1fr;
}

.library-grid.list-view .movie-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
}

.library-grid.list-view .movie-poster {
    height: 100%;
}

.categories-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.category-overview-card {
    overflow: hidden;
}

.category-main-link {
    display: block;
    padding: 24px;
    background: linear-gradient(135deg, var(--white), var(--amber-50));
}

.category-main-link span {
    font-size: 34px;
}

.category-overview-card strong {
    color: var(--amber-600);
}

.category-overview-card ul {
    margin: 0;
    padding: 0 24px 24px;
    list-style: none;
}

.category-overview-card li + li {
    margin-top: 8px;
}

.category-overview-card li a {
    color: #374151;
}

.category-overview-card li a:hover {
    color: var(--amber-600);
}

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

.list-card {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr);
}

.list-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--amber-100);
}

.list-content {
    padding: 20px;
}

.detail-hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: var(--white);
    background: #111827;
}

.detail-bg,
.detail-mask {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px) saturate(1.08);
    transform: scale(1.08);
}

.detail-mask {
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.42), transparent 30%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(120, 53, 15, 0.76));
}

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

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

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

.detail-head-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 46px;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
    aspect-ratio: 3 / 4;
}

.detail-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    min-height: 46px;
    place-items: center;
    color: var(--amber-700);
    background: var(--white);
    border-radius: 999px;
    font-weight: 900;
}

.detail-meta span {
    padding: 7px 11px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
}

.detail-tags span {
    color: var(--amber-900);
}

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

.video-player {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--white);
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.55));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    color: var(--amber-700);
    background: var(--white);
    border-radius: 999px;
    font-size: 36px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.video-player.playing .play-overlay {
    opacity: 0;
    visibility: hidden;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(0, 0, 0, 0.42);
    border-radius: 999px;
    font-size: 13px;
}

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

.detail-article,
.detail-sidebar {
    padding: 28px;
}

.detail-article h2:first-child,
.detail-sidebar h2:first-child {
    margin-top: 0;
}

.detail-article p {
    font-size: 17px;
}

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

.detail-sidebar dt {
    color: var(--amber-600);
    font-weight: 900;
}

.detail-sidebar dd {
    margin: -8px 0 0;
}

.cta-section {
    padding: 36px 0 82px;
}

.cta-card {
    padding: 46px;
    color: var(--white);
    text-align: center;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 30%),
        linear-gradient(120deg, var(--amber-600), var(--orange-600));
}

.cta-card h2 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
}

.cta-card p {
    color: rgba(255, 255, 255, 0.86);
}

.site-footer {
    padding: 54px 0 24px;
    color: var(--amber-50);
    background: linear-gradient(180deg, var(--amber-900), #451a03);
}

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

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--amber-100);
}

.site-footer a,
.site-footer span {
    display: block;
    margin-bottom: 9px;
    color: var(--amber-200);
}

.site-footer a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(253, 230, 138, 0.22);
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    display: none;
    width: 46px;
    height: 46px;
    color: var(--white);
    border: 0;
    background: var(--amber-600);
    border-radius: 999px;
    box-shadow: var(--soft-shadow);
}

.back-to-top.show {
    display: block;
}

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

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

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

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

    .menu-toggle {
        display: flex;
    }

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

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

    .hero-poster,
    .detail-poster {
        width: min(320px, 78vw);
        margin: 0 auto;
    }

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

    .section-title,
    .filter-summary,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-panel {
        position: static;
    }
}

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

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

    .hero-content {
        gap: 24px;
    }

    .hero-actions,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .category-grid,
    .categories-overview,
    .library-grid,
    .movie-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.compact,
    .list-card,
    .library-grid.list-view .movie-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

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

    .play-overlay span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
