:root {
    --bg-a: #fff7ed;
    --bg-b: #fffbeb;
    --ink: #1f2937;
    --muted: #6b7280;
    --soft: #fef3c7;
    --card: #ffffff;
    --amber: #f59e0b;
    --orange: #f97316;
    --red: #ef4444;
    --line: rgba(245, 158, 11, 0.18);
    --shadow: 0 18px 40px rgba(120, 53, 15, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, var(--bg-b), var(--bg-a) 44%, #fff7ed);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 251, 235, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #92400e;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.3);
}

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

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #78350f;
    font-weight: 700;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #78350f;
    background: #ffedd5;
    font-size: 22px;
}

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

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

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

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

.hero-image,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #f59e0b, #7c2d12);
}

.hero-image.image-missing,
.detail-bg.image-missing,
.detail-cover img.image-missing,
.movie-poster img.image-missing {
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.54) 44%, rgba(0, 0, 0, 0.06));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-content > * {
    max-width: 680px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 18px;
}

.hero-kicker::before {
    content: "★";
    color: #fbbf24;
}

.hero h1 {
    margin: 0 0 18px;
    color: white;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1;
    letter-spacing: -0.06em;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.hero p {
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.75;
}

.hero-tags,
.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.detail-meta span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    color: white;
    background: rgba(245, 158, 11, 0.9);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.25s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
}

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

.ghost-button {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    font-size: 38px;
    line-height: 1;
    transition: 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.active {
    width: 36px;
    background: white;
}

.page-main,
.detail-main {
    min-height: 70vh;
}

.content-section,
.home-search-section {
    padding: 52px 0;
}

.home-search-section {
    padding-bottom: 18px;
}

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

.section-heading h2,
.tag-section h2,
.player-section h2,
.detail-text h2 {
    margin: 0;
    color: #1f2937;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.section-more {
    color: #d97706;
    font-weight: 900;
}

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

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

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

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 20px;
    scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
    width: 320px;
    scroll-snap-align: start;
}

.movie-card {
    min-width: 0;
}

.movie-card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 2px 10px rgba(120, 53, 15, 0.05);
    transition: 0.28s ease;
}

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

.movie-poster {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.movie-card.compact .movie-poster {
    height: 168px;
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent 58%);
    opacity: 0;
    transition: 0.3s ease;
}

.movie-card-link:hover .movie-poster::after {
    opacity: 1;
}

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

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

.poster-type,
.poster-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 10px;
    color: white;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.poster-type {
    right: 10px;
    top: 10px;
    background: rgba(245, 158, 11, 0.92);
}

.poster-year {
    left: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.movie-card-body h2 {
    margin: 0 0 9px;
    color: #1f2937;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-body p {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta-line {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
}

.movie-meta-line span:first-child {
    color: #b45309;
    background: #fffbeb;
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 800;
}

.category-showcase,
.rank-section,
.latest-section,
.filter-panel,
.page-hero,
.detail-text article,
.player-section,
.index-list {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
}

.category-showcase,
.rank-section,
.latest-section,
.player-section,
.index-list {
    padding: 34px;
}

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

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

.category-card {
    display: block;
    min-height: 148px;
    padding: 24px;
    border-radius: 18px;
    color: #78350f;
    background: linear-gradient(135deg, #fffbeb, #fed7aa);
    border: 1px solid rgba(245, 158, 11, 0.18);
    transition: 0.25s ease;
}

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

.category-card span {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: #92400e;
    line-height: 1.65;
}

.filter-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
    margin-bottom: 28px;
}

.search-box input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 0 20px;
    outline: none;
    background: #fffaf0;
    color: #1f2937;
    font-size: 16px;
}

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

.filter-row,
.tag-cloud,
.rank-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button,
.tag-chip,
.rank-tab {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    color: #78350f;
    background: #fffbeb;
    font-weight: 800;
    transition: 0.25s ease;
}

.filter-button:hover,
.filter-button.active,
.tag-chip:hover,
.rank-tab.active,
.rank-tab:hover {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.page-hero {
    margin-top: 34px;
    padding: 38px;
}

.compact-hero h1 {
    margin: 0 0 12px;
    color: #1f2937;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.compact-hero p {
    max-width: 760px;
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.75;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #92400e;
    font-weight: 800;
}

.breadcrumb.light {
    color: #fde68a;
}

.no-results {
    display: none;
    padding: 28px;
    border-radius: 18px;
    text-align: center;
    color: #92400e;
    background: #fffbeb;
    font-weight: 800;
}

.no-results.show {
    display: block;
}

.rank-list,
.rank-page-list {
    display: grid;
    gap: 16px;
}

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

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

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

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

.detail-bg-mask {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58) 55%, rgba(0, 0, 0, 0.12));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 50px 0;
}

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

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38);
}

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

.detail-info h1 {
    margin: 0 0 18px;
    color: white;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1.8;
}

.detail-tags span {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.player-section {
    margin-top: 52px;
}

.player-section h2 {
    margin-bottom: 18px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.24);
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: white;
    background: rgba(0, 0, 0, 0.42);
    font-size: 20px;
    font-weight: 900;
    transition: 0.25s ease;
}

.player-overlay:hover {
    background: rgba(0, 0, 0, 0.56);
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.42);
    font-size: 32px;
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.detail-text article {
    padding: 28px;
}

.detail-text p {
    color: #4b5563;
    line-height: 1.95;
    font-size: 16px;
}

.index-list ul {
    columns: 3;
    margin: 0;
    padding: 0;
    list-style: none;
}

.index-list li {
    break-inside: avoid;
    margin-bottom: 10px;
}

.index-list a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fffbeb;
    color: #78350f;
    font-weight: 900;
}

.index-list a:hover {
    background: #fed7aa;
}

.index-list span {
    display: block;
    margin-top: 4px;
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
}

.site-footer {
    margin-top: 70px;
    padding: 48px 0 0;
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border-top: 1px solid var(--line);
}

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

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
    color: #78350f;
}

.footer-grid p {
    color: #92400e;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links.compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a {
    color: #92400e;
    font-weight: 800;
}

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

.footer-bottom {
    margin-top: 36px;
    padding: 18px;
    text-align: center;
    color: #92400e;
    border-top: 1px solid var(--line);
}

@media (max-width: 1024px) {
    .movie-grid,
    .home-grid,
    .rank-page-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mini-grid,
    .related-grid,
    .category-grid,
    .category-grid.large,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: rgba(255, 251, 235, 0.98);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link {
        text-align: center;
    }

    .hero {
        height: 76vh;
        min-height: 620px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 92px;
    }

    .hero-overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.38));
    }

    .hero-arrow {
        display: none;
    }

    .hero-tags,
    .detail-meta,
    .detail-tags {
        gap: 8px;
    }

    .hero-tags span,
    .detail-meta span,
    .detail-tags span {
        min-height: 30px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .movie-grid,
    .home-grid,
    .mini-grid,
    .related-grid,
    .rank-list,
    .rank-page-list,
    .category-grid,
    .category-grid.large,
    .detail-text,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-scroll {
        grid-auto-columns: 82%;
    }

    .horizontal-scroll .movie-card {
        width: auto;
    }

    .category-showcase,
    .rank-section,
    .latest-section,
    .player-section,
    .index-list,
    .page-hero {
        padding: 22px;
    }

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

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

    .detail-cover {
        width: min(260px, 76vw);
    }

    .detail-hero-inner {
        padding: 34px 0;
    }

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

    .index-list ul {
        columns: 1;
    }
}
