:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #321b0a;
    --muted: #8a5a2b;
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --accent: #ea580c;
    --card: rgba(255, 255, 255, 0.88);
    --line: rgba(217, 119, 6, 0.18);
    --shadow: 0 20px 60px rgba(146, 64, 14, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.18), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0%, #fffbeb 48%, #fff7ed 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 237, 213, 0.94));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 35px rgba(146, 64, 14, 0.08);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-dark);
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

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

.desktop-nav a,
.mobile-panel a,
.footer-links a {
    color: #7c3e08;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active,
.footer-links a:hover {
    color: var(--accent);
}

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

.nav-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    height: 42px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 999px;
    padding: 0 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.nav-search button,
.mobile-search button,
.btn,
.play-button,
.filter-clear {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button,
.mobile-search button,
.filter-clear {
    height: 42px;
    padding: 0 18px;
}

.nav-search button:hover,
.mobile-search button:hover,
.btn:hover,
.play-button:hover,
.filter-clear:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(234, 88, 12, 0.3);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 16px 18px;
    background: rgba(255, 251, 235, 0.98);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
}

.mobile-search {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.mobile-search input {
    flex: 1;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #140b05;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.active {
    opacity: 1;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 11, 5, 0.92) 0%, rgba(20, 11, 5, 0.62) 45%, rgba(20, 11, 5, 0.16) 100%),
        linear-gradient(0deg, rgba(20, 11, 5, 0.88) 0%, rgba(20, 11, 5, 0.04) 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 72vh;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    padding: 120px 0 72px;
}

.hero-copy {
    width: min(720px, 100%);
    color: #ffffff;
}

.eyebrow,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.9);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.46);
}

.hero p {
    width: min(680px, 100%);
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.7;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

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

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

.hero-dot.active {
    background: var(--primary);
}

.page-section,
.detail-section,
.catalog-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.page-section {
    padding: 64px 0 0;
}

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

.section-head h2,
.catalog-hero h1,
.detail-copy h1 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.catalog-hero p,
.detail-copy p {
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 26px 70px rgba(146, 64, 14, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(234, 88, 12, 0.12));
}

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

.movie-card:hover .poster-link img,
.category-tile:hover img {
    transform: scale(1.05);
}

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    font-size: 13px;
    font-weight: 800;
}

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

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 9px 0 8px;
    font-size: 20px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 4.8em;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.info-pill,
.breadcrumb a,
.breadcrumb span {
    border-radius: 999px;
    padding: 6px 10px;
    color: #8a4a0a;
    background: rgba(251, 191, 36, 0.18);
    font-size: 12px;
    font-weight: 800;
}

.rank-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.rank-feature {
    position: relative;
    overflow: hidden;
    min-height: 440px;
    border-radius: 32px;
    box-shadow: var(--shadow);
    background: #160c06;
}

.rank-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.rank-feature-content {
    position: absolute;
    inset: auto 0 0 0;
    padding: 34px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.rank-feature-content h3 {
    margin: 12px 0;
    font-size: clamp(30px, 4vw, 52px);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.55);
}

.rank-num {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 900;
}

.rank-title {
    font-weight: 900;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px;
    border-radius: 26px;
    color: #ffffff;
    background: #140b05;
    box-shadow: var(--shadow);
}

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

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

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.6;
}

.catalog-hero {
    padding: 58px 0 30px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 18px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow);
}

.filter-bar input {
    flex: 1 1 300px;
}

.filter-bar select {
    min-width: 160px;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
}

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

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 11, 5, 0.96), rgba(20, 11, 5, 0.66));
}

.detail-section {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 340px;
    gap: 36px;
    padding: 46px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.detail-copy h1 {
    color: #ffffff;
}

.detail-copy p {
    color: rgba(255, 255, 255, 0.82);
}

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.info-pill {
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.26);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.player-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 46px auto 0;
}

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

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 36%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
}

.player-cover.hidden {
    display: none;
}

.play-button {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    font-size: 36px;
}

.content-block {
    width: min(980px, calc(100% - 32px));
    margin: 44px auto 0;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.content-block h2 {
    margin: 0 0 16px;
    font-size: 30px;
}

.content-block p {
    color: var(--muted);
    line-height: 1.9;
    font-size: 17px;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px dashed rgba(245, 158, 11, 0.45);
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
}

.empty-state.show {
    display: block;
}

.site-footer {
    margin-top: 76px;
    padding: 38px 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 251, 235, 0.78);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.footer-inner p {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.7;
}

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

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

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

    .rank-panel,
    .detail-section {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .nav-shell {
        height: 62px;
    }

    .brand {
        font-size: 20px;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 74vh;
    }

    .hero-content {
        padding: 96px 0 70px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

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

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

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

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

    .rank-feature {
        min-height: 360px;
    }

    .content-block {
        padding: 22px;
    }

    .play-button {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .mobile-search {
        flex-direction: column;
    }

    .mobile-search button {
        width: 100%;
    }
}
