:root {
    --bg: #fff7ed;
    --panel: #ffffff;
    --soft: #ffedd5;
    --line: #fed7aa;
    --text: #1f2937;
    --muted: #6b7280;
    --amber: #b45309;
    --orange: #ea580c;
    --deep: #78350f;
    --shadow: 0 24px 60px rgba(120, 53, 15, 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(--text);
    background: radial-gradient(circle at top left, #fff7ed 0, #fff 34rem, #fffbeb 70%);
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 247, 237, 0.94));
    border-bottom: 1px solid rgba(251, 191, 36, 0.35);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.08);
}

.nav-wrap,
.mobile-panel,
.hero-shell,
.content-section,
.category-hero,
.detail-wrap,
.footer-grid,
.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.brand-name {
    font-size: 1.55rem;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--deep), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #4b5563;
    font-weight: 700;
}

.desktop-nav a {
    position: relative;
    transition: color 0.2s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--amber);
}

.desktop-nav a:hover::after {
    transform: scaleX(1);
}

.nav-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.search-box input,
.filter-input,
.filter-select {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--text);
    outline: none;
    box-shadow: inset 0 1px 2px rgba(120, 53, 15, 0.06);
}

.nav-search input {
    width: 230px;
}

.nav-search input:focus,
.mobile-search input:focus,
.search-box input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.nav-search button,
.mobile-search button,
.search-box button,
.primary-btn,
.section-more,
.filter-button.is-active {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.22);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--deep);
}

.mobile-panel {
    padding: 12px 0 20px;
    display: grid;
    gap: 12px;
}

.mobile-panel[hidden] {
    display: none;
}

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    color: #4b5563;
    font-weight: 800;
}

.hero-shell {
    padding: 32px 0 24px;
}

.hero-slider {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 32px;
    background: #1c1917;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    gap: 48px;
    align-items: center;
    padding: 58px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.6s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.56), rgba(28, 25, 23, 0.86)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 12% -120px auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.35);
    filter: blur(80px);
}

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

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(2.25rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    color: #fed7aa;
    font-size: clamp(1.5rem, 3vw, 2.6rem);
    line-height: 1.08;
}

.hero-copy p {
    max-width: 700px;
    margin: 0 0 22px;
    color: #ffedd5;
    font-size: 1.08rem;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.meta-pills span {
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 999px;
    padding: 6px 11px;
    color: #92400e;
    background: #fffbeb;
    font-size: 0.86rem;
    font-weight: 800;
}

.hero-tags span {
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

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

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

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-poster {
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

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

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    font-size: 2rem;
    cursor: pointer;
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 58px;
    bottom: 32px;
    display: flex;
    gap: 8px;
}

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

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

.hero-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.hero-strip a,
.category-tile,
.search-panel,
.detail-panel,
.player-panel,
.rank-row {
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 46px rgba(120, 53, 15, 0.1);
}

.hero-strip a {
    display: grid;
    gap: 6px;
    padding: 22px;
}

.hero-strip strong {
    color: var(--deep);
    font-size: 1.2rem;
}

.hero-strip span {
    color: var(--muted);
}

.content-section {
    padding: 44px 0 10px;
}

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

.section-head h2,
.category-hero h1,
.detail-title h1,
.search-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.06em;
}

.section-more {
    display: inline-flex;
    white-space: nowrap;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(120, 53, 15, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 24px 60px rgba(120, 53, 15, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #292524;
}

.poster-link img {
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
}

.poster-link em,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-style: normal;
    font-weight: 900;
}

.poster-link em {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.55);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #dc2626, #f59e0b);
}

.card-body {
    padding: 18px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--amber);
    font-size: 0.84rem;
    font-weight: 900;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 1.18rem;
    line-height: 1.35;
}

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

.card-body p {
    min-height: 3.4em;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-tile {
    display: grid;
    gap: 12px;
    padding: 26px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile b {
    color: var(--deep);
    font-size: 1.35rem;
}

.category-tile p,
.category-hero p,
.search-title p,
.detail-title p,
.detail-panel p,
.rank-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.category-hero,
.search-title {
    padding: 48px 0 22px;
}

.category-hero-inner,
.search-panel {
    border-radius: 30px;
    padding: 36px;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    box-shadow: var(--shadow);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
}

.filter-button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    color: #92400e;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.filter-controls,
.search-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.filter-input {
    min-width: 260px;
    flex: 1;
}

.filter-select {
    min-width: 150px;
}

.detail-wrap {
    padding: 36px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 700;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 360px;
    gap: 26px;
    align-items: start;
}

.player-panel {
    overflow: hidden;
    background: #111827;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.74));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-core {
    display: grid;
    place-items: center;
    gap: 14px;
    text-align: center;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.85);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    font-size: 2rem;
}

.play-core strong {
    font-size: 1.4rem;
}

.detail-title {
    padding: 24px;
    background: #fff;
}

.detail-title h1 {
    margin-bottom: 14px;
}

.detail-side {
    display: grid;
    gap: 18px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.detail-panel {
    padding: 24px;
}

.detail-panel h2 {
    margin: 0 0 12px;
    color: var(--deep);
    font-size: 1.35rem;
}

.detail-panel + .detail-panel {
    margin-top: 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.rank-row img {
    aspect-ratio: 16 / 10;
    height: 70px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.site-footer {
    margin-top: 72px;
    color: #fffbeb;
    background: linear-gradient(100deg, #78350f, #9a3412 58%, #7c2d12);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 30px;
    padding: 46px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fff7ed;
    font-size: 1.05rem;
}

.footer-grid p {
    margin: 12px 0 0;
    color: #fed7aa;
    line-height: 1.8;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #ffedd5;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding: 18px 0;
    color: #fed7aa;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 36px;
    border: 1px dashed var(--line);
    border-radius: 24px;
    color: var(--muted);
    background: #fff;
    text-align: center;
}

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

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

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

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

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

    .detail-side {
        grid-template-columns: 280px 1fr;
    }

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

@media (max-width: 760px) {
    .nav-wrap,
    .mobile-panel,
    .hero-shell,
    .content-section,
    .category-hero,
    .detail-wrap,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .hero-slider {
        min-height: 680px;
        border-radius: 24px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
        padding: 32px 24px 70px;
    }

    .hero-poster {
        max-width: 220px;
        order: -1;
    }

    .hero-dots {
        left: 24px;
    }

    .hero-strip,
    .category-grid,
    .movie-grid,
    .search-results {
        grid-template-columns: 1fr;
    }

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

    .detail-side {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 78px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-row img {
        height: 58px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
