:root {
    --color-ink: #1f2937;
    --color-muted: #6b7280;
    --color-soft: #f8fafc;
    --color-card: #ffffff;
    --color-amber: #d97706;
    --color-amber-dark: #92400e;
    --color-orange: #ea580c;
    --color-line: #e5e7eb;
    --shadow-soft: 0 18px 45px rgba(146, 64, 14, 0.12);
    --shadow-card: 0 12px 30px rgba(31, 41, 55, 0.10);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-ink);
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 42%, #f8fafc 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.88);
    border-bottom: 1px solid rgba(217, 119, 6, 0.16);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--color-amber-dark);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.32);
}

.brand-name {
    font-size: 20px;
    letter-spacing: 0.02em;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #78350f;
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.25);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: var(--color-amber-dark);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.mobile-link {
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.7);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0 38px;
    background: radial-gradient(circle at 18% 18%, rgba(251, 191, 36, 0.42), transparent 34%), linear-gradient(135deg, #fef3c7 0%, #ffedd5 45%, #fff7ed 100%);
}

.hero-shell {
    position: relative;
    min-height: 540px;
}

.hero-bg-glow {
    position: absolute;
    inset: 48px 8% auto auto;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.18);
    filter: blur(80px);
}

.hero-slide {
    display: none;
    position: relative;
    align-items: center;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.82fr);
    gap: 42px;
    min-height: 500px;
}

.hero-slide.active {
    display: grid;
    animation: heroFade 0.45s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #b45309;
    background: rgba(251, 191, 36, 0.20);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    color: #78350f;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 690px;
    margin: 22px 0 0;
    color: #92400e;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.detail-meta,
.rank-meta,
.category-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.rank-meta span,
.category-inline a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid rgba(217, 119, 6, 0.16);
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.home-search button,
.rank-action,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.primary-button,
.home-search button,
.rank-action {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

.primary-button,
.ghost-button,
.home-search button,
.rank-action {
    padding: 0 22px;
}

.primary-button:hover,
.home-search button:hover,
.rank-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.34);
}

.ghost-button,
.back-link {
    color: var(--color-amber-dark);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(217, 119, 6, 0.22);
}

.ghost-button:hover,
.back-link:hover {
    color: #ffffff;
    background: #92400e;
}

.hero-poster {
    position: relative;
    display: block;
    justify-self: center;
    width: min(360px, 100%);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 12px solid rgba(255, 255, 255, 0.72);
    border-radius: 34px;
    background: #fde68a;
    box-shadow: 0 30px 80px rgba(146, 64, 14, 0.28);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 14px -26px auto auto;
    width: 115px;
    height: 115px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    z-index: 1;
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 24px;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 36px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(146, 64, 14, 0.22);
}

.hero-dot.active {
    width: 56px;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
}

.search-panel,
.content-section,
.ranking-section,
.detail-body-section {
    padding: 54px 0;
}

.search-panel-inner,
.filter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.recommend-panel h2,
.detail-main h2 {
    margin: 0;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.search-panel h2,
.section-head h2 {
    font-size: clamp(24px, 3.8vw, 38px);
}

.home-search,
.filter-inner {
    flex: 1;
}

.home-search {
    display: flex;
    max-width: 520px;
    padding: 6px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.16);
}

.home-search input,
.filter-inner input {
    width: 100%;
    min-height: 46px;
    border: 0;
    outline: 0;
    color: var(--color-ink);
    background: transparent;
}

.home-search input {
    padding: 0 16px;
}

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

.section-head p,
.page-hero p,
.card-line,
.rank-content p,
.detail-main p,
.site-footer p {
    color: var(--color-muted);
}

.section-head p,
.page-hero p {
    max-width: 680px;
    margin: 8px 0 0;
    font-size: 17px;
}

.section-more {
    color: var(--color-amber-dark);
    font-weight: 800;
}

.card-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-card);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(31, 41, 55, 0.16);
}

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

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

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

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(234, 88, 12, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

.card-body h2 {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 6px;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body h2 a:hover {
    color: var(--color-amber);
}

.card-meta {
    margin: 0 0 8px;
    color: #9ca3af;
    font-size: 12px;
}

.card-line {
    display: -webkit-box;
    min-height: 40px;
    margin: 0 0 12px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact .card-line {
    display: none;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    padding: 24px;
    border-radius: var(--radius-lg);
    color: #78350f;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
    box-shadow: var(--shadow-card);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    display: block;
    max-width: 68%;
    color: #92400e;
    font-size: 14px;
}

.category-tile em {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: flex;
    gap: 6px;
    transform: rotate(-5deg);
}

.category-tile img {
    width: 58px;
    height: 82px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.16);
}

.page-hero {
    padding: 68px 0;
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.35), transparent 30%), linear-gradient(135deg, #fef3c7, #fff7ed);
}

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

.filter-bar {
    padding: 28px 0 0;
}

.filter-inner input {
    max-width: 520px;
    padding: 0 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.16);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-chips a {
    padding: 8px 11px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 13px;
    font-weight: 800;
}

.back-link {
    padding: 0 18px;
}

.back-link.inline {
    margin-bottom: 16px;
}

.ranking-section {
    padding-top: 32px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 82px 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #fde68a;
}

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

.rank-index {
    color: var(--color-orange);
    font-size: 30px;
    font-weight: 900;
    text-align: center;
}

.rank-content h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-content h2 a:hover {
    color: var(--color-amber);
}

.rank-content p {
    margin: 0 0 10px;
}

.detail-hero {
    padding: 34px 0 46px;
    background: linear-gradient(135deg, #111827 0%, #451a03 52%, #78350f 100%);
}

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

.player-card,
.detail-aside,
.detail-main,
.recommend-panel {
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.player-card {
    overflow: hidden;
    background: #000000;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #030712;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    transition: opacity 0.2s ease;
}

.video-frame.playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 20px 48px rgba(217, 119, 6, 0.42);
    clip-path: polygon(36% 26%, 36% 74%, 76% 50%);
}

.player-message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: none;
    padding: 10px 12px;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.62);
    font-size: 14px;
}

.player-message.show {
    display: block;
}

.detail-aside {
    padding: 16px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: #fde68a;
}

.primary-button.full {
    width: 100%;
}

.detail-body-section {
    padding-top: 44px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.detail-main {
    padding: 28px;
}

.detail-main h1 {
    color: #111827;
    font-size: clamp(30px, 4vw, 46px);
}

.detail-meta,
.detail-tags,
.category-inline {
    margin-top: 18px;
}

.lead-text {
    margin-top: 24px;
    font-size: 18px;
    font-weight: 700;
}

.detail-main h2 {
    margin-top: 28px;
    font-size: 24px;
}

.detail-main p {
    margin: 12px 0 0;
    white-space: pre-line;
}

.recommend-panel {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.recommend-panel h2 {
    margin-bottom: 16px;
    font-size: 22px;
}

.mini-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.mini-card:hover {
    background: #fffbeb;
}

.mini-card img {
    width: 82px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    background: #fde68a;
}

.mini-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mini-card em {
    display: block;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 12px;
    font-style: normal;
}

.site-footer {
    padding: 48px 0 24px;
    color: #fde68a;
    background: #111827;
}

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

.footer-brand {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 16px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #fcd34d;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid rgba(253, 230, 138, 0.18);
    color: #fcd34d;
    font-size: 13px;
}

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

@media (max-width: 1080px) {
    .compact-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .detail-aside {
        display: none;
    }

    .recommend-panel {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

    .hero {
        padding-top: 34px;
    }

    .hero-shell {
        min-height: auto;
    }

    .hero-slide,
    .hero-slide.active {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-poster {
        width: min(280px, 78vw);
    }

    .hero-dots {
        position: static;
        margin-top: 24px;
    }

    .search-panel-inner,
    .filter-inner,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .home-search {
        max-width: none;
    }

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

    .rank-row {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .rank-index {
        position: absolute;
        margin-left: 46px;
        margin-top: -42px;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        color: #ffffff;
        background: var(--color-orange);
        font-size: 18px;
        line-height: 34px;
    }

    .rank-action {
        grid-column: 2;
        width: fit-content;
        min-height: 38px;
    }
}

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

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

    .card-body {
        padding: 12px;
    }

    .card-line,
    .tag-row {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}
