:root {
    --bg: #fffaf0;
    --paper: #ffffff;
    --paper-soft: #fffbeb;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #fde68a;
    --brand: #d97706;
    --brand-deep: #92400e;
    --brand-soft: #fef3c7;
    --dark: #111827;
    --shadow: 0 18px 50px rgba(146, 64, 14, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 45%, #fff7ed 100%);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 251, 235, 0.92);
    border-bottom: 1px solid rgba(245, 158, 11, 0.24);
    backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-deep);
    font-weight: 900;
    letter-spacing: 0.03em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 30px rgba(180, 83, 9, 0.3);
}

.logo-text {
    font-size: 21px;
}

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

.nav-link,
.mobile-link {
    color: #78350f;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--brand);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search,
.hero-search,
.inline-search {
    display: flex;
    align-items: center;
}

.header-search input,
.hero-search input,
.inline-search input,
.toolbar select {
    min-width: 220px;
    height: 42px;
    border: 1px solid #fbbf24;
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    outline: none;
    padding: 0 14px;
    border-radius: 12px 0 0 12px;
}

.header-search button,
.hero-search button,
.inline-search button {
    height: 42px;
    border: 0;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    padding: 0 16px;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #fbbf24;
    border-radius: 12px;
    background: white;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--brand-deep);
}

.mobile-panel {
    display: none;
    padding: 0 22px 18px;
    border-top: 1px solid rgba(245, 158, 11, 0.16);
}

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

.mobile-panel a {
    display: block;
    padding: 12px 0;
}

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

.mobile-cats a {
    padding: 10px 12px;
    border-radius: 12px;
    background: white;
    color: var(--brand-deep);
}

main {
    min-height: 60vh;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-overlay {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    height: 100%;
    padding: 92px max(24px, calc((100vw - 1240px) / 2)) 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 14px;
    font-weight: 800;
}

.hero-kicker {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 6vw, 74px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    max-width: 680px;
}

.hero-meta,
.detail-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-tags span,
.tag-list span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #fde68a;
    background: rgba(253, 230, 138, 0.14);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: white;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 14px 30px rgba(180, 83, 9, 0.28);
}

.primary-btn.small {
    min-height: 38px;
    padding: 0 15px;
    font-size: 14px;
}

.ghost-btn {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: max(24px, calc((100vw - 1240px) / 2));
    bottom: 42px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    background: #f59e0b;
}

.hero-search {
    position: absolute;
    right: max(24px, calc((100vw - 1240px) / 2));
    bottom: 32px;
    z-index: 4;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
}

.hero-search input {
    width: min(360px, 42vw);
}

.content-section,
.category-strip {
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px 22px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-text h2 {
    margin: 10px 0 8px;
    color: #1f2937;
    line-height: 1.15;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-hero p,
.category-card p,
.detail-one-line,
.detail-text p {
    margin: 0;
    color: var(--muted);
}

.compact-head {
    align-items: center;
}

.section-more,
.text-link {
    color: var(--brand-deep);
    background: #fef3c7;
}

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

.category-tile {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #111827;
    box-shadow: var(--shadow);
}

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

.category-tile span,
.category-tile small {
    position: absolute;
    z-index: 1;
    left: 16px;
    right: 16px;
    color: white;
}

.category-tile span {
    bottom: 42px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(245, 158, 11, 0.16);
    box-shadow: 0 12px 38px rgba(146, 64, 14, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    overflow: hidden;
    background: #fef3c7;
}

.poster-link img,
.category-tile img,
.rank-poster img,
.detail-poster img {
    transition: transform 0.4s ease;
}

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

.poster-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 4px 9px;
    color: white;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    font-size: 13px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-meta,
.rank-topline {
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3,
.rank-info h3 {
    margin: 7px 0 8px;
    font-size: 19px;
    line-height: 1.25;
}

.movie-card p,
.rank-info p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-card.compact .card-body {
    padding: 14px;
}

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

.rank-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    padding: 14px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 36px rgba(146, 64, 14, 0.1);
}

.rank-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    background: #fef3c7;
}

.rank-number {
    position: absolute;
    z-index: 2;
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: white;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    font-weight: 900;
}

.rank-info {
    padding: 6px 0;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fff7ed 48%, #ffffff);
}

.small-hero {
    padding: 76px 22px;
}

.small-hero > div {
    max-width: 1240px;
    margin: 0 auto;
}

.small-hero h1 {
    font-size: clamp(38px, 5vw, 58px);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
}

.toolbar select {
    border-radius: 12px;
    min-width: 170px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.filter-chips button {
    border: 1px solid rgba(245, 158, 11, 0.34);
    color: #92400e;
    background: white;
    border-radius: 999px;
    padding: 8px 13px;
    cursor: pointer;
    font-weight: 700;
}

.filter-chips button.active {
    color: white;
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

.category-list {
    display: grid;
    gap: 22px;
}

.category-card {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 14px 42px rgba(146, 64, 14, 0.1);
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 220px;
    background: #fef3c7;
}

.category-card-body {
    padding: 26px;
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0 22px;
}

.category-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

.detail-hero {
    min-height: 520px;
    color: white;
    background: #111827;
}

.detail-backdrop,
.detail-backdrop::after {
    position: absolute;
    inset: 0;
}

.detail-backdrop::after {
    content: "";
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
}

.detail-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px 64px;
}

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

.breadcrumb a {
    color: #fbbf24;
}

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4.1;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    background: #fef3c7;
}

.detail-info h1 {
    color: white;
    font-size: clamp(38px, 5vw, 72px);
}

.detail-one-line {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.detail-tags {
    margin: 20px 0 26px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #050505;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
    aspect-ratio: 16 / 9;
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.62));
    cursor: pointer;
    text-align: center;
    padding: 22px;
}

.play-cover.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.32);
}

.play-icon::before {
    content: "";
    margin-left: 5px;
    border-left: 22px solid white;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}

.play-cover strong {
    max-width: 720px;
    font-size: clamp(24px, 4vw, 42px);
}

.detail-text {
    max-width: 920px;
}

.detail-text h2 {
    font-size: 30px;
}

.detail-text p {
    margin-bottom: 24px;
    font-size: 17px;
}

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

.site-footer {
    margin-top: 48px;
    background: #111827;
    color: rgba(255, 255, 255, 0.76);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
}

.footer-logo {
    color: #fbbf24;
    font-size: 22px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

[data-card].hidden {
    display: none;
}

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 660px;
    }

    .hero-content {
        padding: 74px 22px 180px;
    }

    .hero-search {
        left: 22px;
        right: 22px;
        bottom: 70px;
    }

    .hero-search input {
        width: 100%;
        min-width: 0;
    }

    .hero-dots {
        left: 22px;
        bottom: 28px;
    }

    .section-head,
    .toolbar,
    .footer-inner {
        display: block;
    }

    .section-more {
        margin-top: 16px;
    }

    .toolbar select,
    .inline-search,
    .inline-search input {
        width: 100%;
        min-width: 0;
    }

    .toolbar select {
        margin-top: 12px;
    }

    .category-grid,
    .movie-grid,
    .library-grid,
    .rank-grid,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card,
    .detail-grid,
    .rank-card {
        grid-template-columns: 1fr;
    }

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

    .footer-links {
        justify-content: flex-start;
        margin-top: 24px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        min-height: 64px;
        padding: 0 16px;
    }

    .logo-text {
        font-size: 18px;
    }

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

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

    .category-cover-row {
        min-height: 170px;
    }

    .rank-card {
        grid-template-columns: 110px 1fr;
    }

    .player-shell {
        border-radius: 18px;
    }
}
