:root {
    --orange: #f97316;
    --amber: #f59e0b;
    --gold: #fbbf24;
    --ink: #1f2937;
    --muted: #6b7280;
    --paper: #fffaf0;
    --soft: #fff7ed;
    --line: rgba(251, 146, 60, 0.22);
    --shadow: 0 22px 55px rgba(180, 83, 9, 0.16);
}

html {
    scroll-behavior: smooth;
}

.site-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fef3c7 100%);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 247, 237, 0.96), rgba(255, 251, 235, 0.96));
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.12);
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    font-size: 20px;
    text-decoration: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    color: #fff;
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.32);
}

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

.nav-link,
.mobile-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    background: linear-gradient(90deg, var(--orange), var(--amber));
    color: #fff;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 0;
    background: #ffedd5;
    color: #9a3412;
    font-size: 24px;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid var(--line);
    background: #fffaf0;
}

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

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

.hero-slides,
.hero-slide,
.hero-image,
.hero-shade {
    position: absolute;
    inset: 0;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 16px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.card-tags span,
.detail-tags span {
    background: #ffedd5;
    color: #9a3412;
}

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
    background: linear-gradient(90deg, var(--orange), var(--amber));
    color: #fff;
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.36);
}

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

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

.primary-btn.full {
    width: 100%;
    margin-top: 18px;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 42px;
    line-height: 1;
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

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

.page-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px;
}

.search-lift {
    margin-top: -44px;
    position: relative;
    z-index: 8;
    padding-top: 0;
    padding-bottom: 24px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(140px, 180px));
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid var(--line);
}

.filter-search input,
.filter-panel select {
    min-height: 48px;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #374151;
}

.filter-panel select {
    padding: 0 14px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid var(--line);
    font-weight: 700;
}

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

.section-head h2,
.inner-hero h1,
.ranking-card h2,
.story-card h2 {
    margin: 8px 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    color: #1f2937;
}

.section-head p,
.inner-hero p,
.story-card p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid var(--line);
}

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

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

.category-card {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    border-radius: 28px;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.78));
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.category-index {
    position: absolute;
    top: 16px;
    right: 18px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 42px;
    font-weight: 900;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

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

.layout-two.reverse {
    grid-template-columns: minmax(0, 1fr) 390px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 15px 36px rgba(180, 83, 9, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.18);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(180, 83, 9, 0.2);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fde68a);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card-type,
.card-year,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(10px);
}

.card-type {
    left: 12px;
}

.card-year {
    right: 12px;
}

.rank-badge {
    top: auto;
    left: 12px;
    bottom: 12px;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: #ea580c;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    color: #1f2937;
    font-size: 18px;
    font-weight: 900;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

.card-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-summary {
    min-height: 48px;
    margin: 10px 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-compact .card-title {
    font-size: 16px;
}

.ranking-panel {
    min-width: 0;
}

.ranking-card,
.story-card,
.player-card {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.ranking-card {
    padding: 24px;
}

.sticky-card {
    position: sticky;
    top: 92px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: #fff7ed;
    text-decoration: none;
    color: #1f2937;
}

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

.rank-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.inner-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 24px 72px;
    background: radial-gradient(circle at 10% 15%, rgba(251, 191, 36, 0.45), transparent 28%), linear-gradient(135deg, #fff7ed, #fffbeb 46%, #fde68a);
}

.inner-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.chip-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.chip-link {
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: #9a3412;
    font-weight: 800;
    text-decoration: none;
}

.chip-link.is-active {
    background: linear-gradient(90deg, var(--orange), var(--amber));
    color: #fff;
}

.filter-empty {
    display: none;
    margin-top: 22px;
    padding: 18px;
    border-radius: 18px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 800;
}

.filter-empty.is-visible {
    display: block;
}

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

.detail-bg,
.detail-shade {
    position: absolute;
    inset: 0;
}

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

.detail-shade {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.breadcrumb a {
    color: #fbbf24;
    text-decoration: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    min-height: 500px;
}

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

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

.detail-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    color: #fff;
    font-weight: 900;
}

.detail-info h1 {
    max-width: 840px;
    margin: 16px 0;
    font-size: clamp(40px, 6vw, 70px);
    line-height: 1.06;
    font-weight: 900;
}

.detail-line {
    max-width: 860px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.8;
}

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

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

.detail-main {
    padding-top: 38px;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.68));
    color: #fff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.42);
    font-size: 34px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: clamp(20px, 4vw, 34px);
    font-weight: 900;
    text-align: center;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.story-card {
    padding: 26px;
}

.story-card p {
    font-size: 17px;
    color: #4b5563;
}

.rank-feature-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.rank-feature {
    display: grid;
    grid-template-columns: 38px 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #fff7ed;
    color: #1f2937;
    text-decoration: none;
}

.rank-feature span {
    color: #ea580c;
    font-weight: 900;
}

.rank-feature img {
    width: 72px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
}

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

.rank-feature p {
    margin: 4px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-feature em {
    color: #92400e;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.site-footer {
    margin-top: 36px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px;
}

.footer-grid p,
.footer-grid a,
.footer-grid span {
    display: block;
    margin-top: 10px;
    color: #d1d5db;
    line-height: 1.7;
    text-decoration: none;
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: #fbbf24;
    font-size: 18px;
    font-weight: 900;
}

.footer-brand {
    color: #fff;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    width: 48px;
    height: 48px;
    display: none;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    color: #fff;
    font-size: 24px;
    box-shadow: 0 16px 35px rgba(249, 115, 22, 0.34);
}

.back-to-top.is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1100px) {
    .category-grid,
    .category-grid.wide,
    .movie-grid,
    .movie-grid.spacious,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .layout-two,
    .layout-two.reverse {
        grid-template-columns: 1fr;
    }

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

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-control {
        display: none;
    }

    .category-grid,
    .category-grid.wide,
    .movie-grid,
    .movie-grid.spacious,
    .related-grid,
    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 32px;
    }

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

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

@media (max-width: 560px) {
    .nav-shell {
        padding: 0 14px;
    }

    .brand {
        font-size: 17px;
    }

    .hero-content {
        padding: 0 18px;
    }

    .hero-content p,
    .detail-line {
        font-size: 16px;
    }

    .page-section {
        padding: 42px 16px;
    }

    .filter-panel,
    .category-grid,
    .category-grid.wide,
    .movie-grid,
    .movie-grid.spacious,
    .related-grid,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }

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

    .inner-hero {
        padding: 72px 16px 52px;
    }

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

    .player-play {
        width: 64px;
        height: 64px;
    }
}
