:root {
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --orange: #ea580c;
    --yellow-soft: #fef3c7;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #fff7ed;
    --shadow: 0 20px 45px rgba(120, 53, 15, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.container.slim {
    width: min(920px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    box-shadow: 0 12px 30px rgba(154, 52, 18, 0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-icon,
.footer-logo span {
    font-size: 30px;
}

.logo-text {
    font-size: 22px;
    letter-spacing: 0.02em;
}

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

.nav-link {
    font-weight: 650;
    opacity: 0.92;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fef3c7;
    opacity: 1;
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    backdrop-filter: blur(8px);
}

.top-search input,
.mobile-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    background: transparent;
}

.top-search button,
.mobile-search button {
    border: 0;
    padding: 10px 14px;
    color: var(--amber-dark);
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

.mobile-nav {
    display: grid;
    gap: 8px;
    padding: 14px 0;
}

.mobile-nav a {
    padding: 10px 0;
    font-weight: 700;
}

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

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    animation: fadeIn 0.8s ease both;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.38);
    backdrop-filter: blur(8px);
    font-weight: 750;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 18px 0 10px;
    font-size: clamp(24px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 850;
}

.hero p,
.page-hero p,
.detail-copy p {
    max-width: 680px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.detail-tags,
.card-tags,
.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    font-weight: 650;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    box-shadow: 0 16px 35px rgba(234, 88, 12, 0.35);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.section {
    padding: 72px 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    color: var(--ink);
    font-weight: 850;
}

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

.section-link {
    color: var(--amber-dark);
    font-weight: 800;
    white-space: nowrap;
}

.band {
    width: 100%;
}

.warm-band {
    background: linear-gradient(90deg, #fef3c7, #ffedd5);
}

.white-band {
    background: #ffffff;
}

.ranking-band {
    background: linear-gradient(135deg, #ffedd5, #fef3c7, #fefce8);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card.is-hidden {
    display: none;
}

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

.compact .poster-link {
    aspect-ratio: 4 / 5;
}

.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);
}

.type-badge,
.score-badge {
    position: absolute;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(7px);
}

.type-badge {
    left: 12px;
}

.score-badge {
    right: 12px;
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.play-symbol {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-symbol {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 18px;
}

.card-title {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 850;
}

.card-title a:hover {
    color: var(--amber-dark);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #92400e;
    font-size: 13px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #fffbeb;
}

.card-tags span,
.footer-tags a {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--amber-dark);
    background: #fef3c7;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 55px rgba(120, 53, 15, 0.16);
}

.category-main-link {
    display: block;
    padding: 26px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.category-icon {
    display: block;
    margin-bottom: 12px;
    font-size: 44px;
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 850;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 0 26px 24px;
}

.category-samples a {
    overflow: hidden;
    color: var(--amber-dark);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

.ranking-panel {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-row {
    display: grid;
    grid-template-columns: 52px 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
    background: #fff7ed;
    transform: translateX(4px);
}

.rank-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.rank-row img {
    width: 74px;
    height: 74px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-main {
    min-width: 0;
}

.rank-main strong,
.rank-main em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-main strong {
    color: var(--ink);
    font-size: 17px;
}

.rank-main em {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

.rank-score {
    color: var(--amber-dark);
    font-weight: 850;
    white-space: nowrap;
}

.page-main {
    min-height: 65vh;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #92400e, #ea580c 55%, #f59e0b);
}

.small-hero,
.category-hero {
    min-height: 310px;
    display: flex;
    align-items: center;
}

.breadcrumb,
.breadcrumbs a {
    display: inline-flex;
    margin-bottom: 12px;
    color: #fef3c7;
    font-weight: 750;
}

.filter-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 170px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-box input,
.filter-box select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    padding: 12px 16px;
    background: #fff;
    color: var(--ink);
}

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

.large-ranking {
    gap: 10px;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.28));
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    min-height: 520px;
    padding: 42px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #fde68a;
    font-weight: 750;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 8px 13px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-main {
    min-width: 0;
}

.player-card,
.detail-card,
.side-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
    padding: 12px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.48));
    cursor: pointer;
    transition: opacity 0.25s ease;
}

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

.play-button {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
    font-size: 34px;
}

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

.detail-card h2,
.side-panel h2 {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: 24px;
    font-weight: 850;
}

.detail-card p {
    margin: 0 0 20px;
    color: #374151;
    font-size: 17px;
}

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

.detail-side {
    display: grid;
    gap: 20px;
    align-content: start;
}

.side-panel {
    padding: 24px;
}

.side-panel dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.side-panel dt,
.side-panel dd {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.side-panel dt {
    color: var(--muted);
    font-size: 14px;
}

.side-panel dd {
    color: var(--ink);
    font-weight: 750;
}

.side-panel dd a {
    color: var(--amber-dark);
}

.side-ranking .rank-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
}

.side-ranking .rank-row img,
.side-ranking .rank-score {
    display: none;
}

.side-ranking .rank-number {
    width: 30px;
    height: 30px;
    font-size: 13px;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0;
}

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

.site-footer p {
    margin: 12px 0 0;
    color: #9ca3af;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-tags a {
    display: inline-flex;
    margin: 0 6px 8px 0;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
}

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

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

    .mobile-toggle {
        display: block;
    }

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

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

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

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

    .hero {
        height: 640px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .filter-box {
        grid-template-columns: 1fr;
    }

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

    .rank-score {
        grid-column: 3;
    }

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

    .detail-poster {
        width: min(220px, 70vw);
    }

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

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

@media (max-width: 540px) {
    .header-inner {
        min-height: 64px;
    }

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

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

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

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

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

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

    .detail-card,
    .side-panel {
        padding: 20px;
    }
}
