:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --card: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f5d6a4;
    --amber: #f59e0b;
    --orange: #ea580c;
    --brown: #78350f;
    --shadow: 0 20px 45px rgba(120, 53, 15, 0.12);
    --shadow-soft: 0 12px 28px rgba(120, 53, 15, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 45%, #fff 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(255, 251, 235, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 22px rgba(120, 53, 15, 0.06);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 22px rgba(234, 88, 12, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.04em;
    color: var(--brown);
}

.brand-text small {
    margin-top: 4px;
    color: #b45309;
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 13px;
    border-radius: 12px;
    color: #92400e;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--brown);
    background: #fde68a;
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(310px, 28vw);
}

.header-search input,
.hero-search input,
.search-panel input,
.filter-panel input,
.filter-panel select,
.search-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 16px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.hero-search input:focus,
.search-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-panel select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.header-search button,
.hero-search button,
.filter-panel button,
.search-panel button,
.primary-button {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 22px rgba(234, 88, 12, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.hero-search button:hover,
.filter-panel button:hover,
.search-panel button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(234, 88, 12, 0.28);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--brown);
    background: #fde68a;
    font-size: 20px;
}

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

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

.mobile-category-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.main {
    min-height: 60vh;
}

.hero {
    position: relative;
    overflow: hidden;
    max-width: 1280px;
    margin: 26px auto 54px;
    border-radius: 32px;
    min-height: 560px;
    background: radial-gradient(circle at top left, #fef3c7 0, #fed7aa 35%, #9a3412 100%);
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.55;
}

.hero-glow-one {
    width: 260px;
    height: 260px;
    left: -80px;
    top: -80px;
    background: #fbbf24;
}

.hero-glow-two {
    width: 360px;
    height: 360px;
    right: -120px;
    bottom: -120px;
    background: #ea580c;
}

.hero-slides {
    position: relative;
    z-index: 2;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 34px;
    padding: 58px;
    opacity: 0;
    transform: translateX(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

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

.hero-copy {
    position: relative;
    z-index: 3;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    color: #fde68a;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.hero-summary {
    max-width: 700px;
    margin: 0 0 22px;
    color: #fff7ed;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: #92400e;
    background: #fef3c7;
}

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

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    padding: 12px 20px;
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
}

.hero-image {
    position: relative;
    z-index: 3;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 58px;
    right: 58px;
    bottom: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
    border: 0;
    border-radius: 999px;
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(6px);
}

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

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.42) !important;
}

.hero-dot.is-active {
    width: 28px !important;
    background: #fbbf24 !important;
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 86px;
    width: min(680px, calc(100% - 56px));
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.content-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 42px 0 24px;
}

.section-heading span {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 22px rgba(234, 88, 12, 0.2);
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    color: #111827;
}

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

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

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

.movie-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x mandatory;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.06);
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.card-body {
    padding: 16px;
}

.card-meta,
.card-stats,
.detail-meta,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 13px;
}

.card-body h3 {
    margin: 10px 0 8px;
    color: #111827;
    font-size: 19px;
    line-height: 1.35;
}

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

.card-body p {
    min-height: 56px;
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.65;
}

.card-stats {
    justify-content: space-between;
    margin-top: 14px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    padding: 24px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c);
    box-shadow: var(--shadow-soft);
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-tile h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-tile p,
.category-tile strong {
    position: relative;
}

.category-tile p {
    color: #fff7ed;
    line-height: 1.7;
}

.filter-panel,
.search-panel {
    margin-bottom: 28px;
    padding: 22px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
}

.filter-main,
.search-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.filter-panel label,
.search-panel label {
    display: grid;
    gap: 8px;
    color: #92400e;
    font-weight: 700;
}

.filter-count,
.search-count {
    margin: 14px 0 0;
    color: var(--muted);
}

.page-hero {
    margin: 24px 0 34px;
    padding: 44px;
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(135deg, #92400e, #f59e0b 52%, #ea580c);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 56px);
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #fff7ed;
    font-size: 18px;
    line-height: 1.8;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 86px 90px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.ranking-num {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.ranking-cover {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    background: #fef3c7;
}

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

.ranking-item h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.ranking-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(310px, 0.85fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-card,
.sidebar-card {
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.player-card {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 16 / 9;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #0f172a;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.58));
}

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

.play-overlay span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
    font-size: 32px;
}

.player-title {
    padding: 20px 22px;
}

.player-title h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
}

.detail-card {
    margin-top: 22px;
    padding: 24px;
}

.detail-card h2,
.sidebar-card h2 {
    margin: 0 0 16px;
    color: #111827;
}

.detail-card p {
    color: #374151;
    font-size: 16px;
    line-height: 1.95;
}

.detail-tags {
    margin: 18px 0 0;
}

.sidebar-card {
    position: sticky;
    top: 96px;
    padding: 20px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 72px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
    background: #fef3c7;
}

.related-item h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.related-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb {
    margin: 24px 0;
}

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

.search-results-empty {
    display: none;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    background: #fff;
    color: var(--muted);
}

.search-results-empty.is-visible {
    display: block;
}

.site-footer {
    color: #fde68a;
    background: linear-gradient(135deg, #78350f, #92400e 50%, #451a03);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 44px 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #fff7ed;
}

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

.site-footer p,
.site-footer li {
    color: #fcd34d;
    line-height: 1.75;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #fff7ed;
}

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

    .hero-slide {
        grid-template-columns: 1fr 320px;
        padding: 42px;
    }

    .header-search {
        display: none;
    }
}

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

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }

    .hero {
        margin: 14px 16px 34px;
        min-height: 720px;
    }

    .hero-slides {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
        padding: 30px;
    }

    .hero-image {
        width: min(270px, 72vw);
        margin: 0 auto;
        order: -1;
    }

    .hero-controls {
        left: 30px;
        right: 30px;
        bottom: 24px;
    }

    .hero-search {
        bottom: 76px;
        flex-direction: column;
        border-radius: 24px;
    }

    .content-wrap {
        padding: 0 16px 48px;
    }

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

    .filter-main,
    .search-main,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 52px 76px 1fr;
    }

    .ranking-item .primary-button {
        grid-column: 1 / -1;
        text-align: center;
    }

    .sidebar-card {
        position: static;
    }
}

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

    .brand-text small {
        display: none;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-summary {
        font-size: 15px;
    }

    .movie-grid,
    .movie-grid.large-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 28px;
    }

    .ranking-item {
        grid-template-columns: 48px 1fr;
    }

    .ranking-cover {
        display: none;
    }
}

.all-link-list {
    columns: 4 220px;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.all-link-list li {
    break-inside: avoid;
    margin: 0 0 10px;
    color: #92400e;
}

.all-link-list a:hover {
    color: var(--orange);
}
