:root {
    --color-bg: #fff7ed;
    --color-bg-soft: #fffbeb;
    --color-surface: #ffffff;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-border: #fed7aa;
    --color-primary: #f97316;
    --color-primary-dark: #ea580c;
    --color-accent: #f59e0b;
    --shadow-soft: 0 12px 30px rgba(124, 45, 18, 0.12);
    --shadow-card: 0 10px 24px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--color-text);
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-soft) 58%, #ffffff 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(251, 146, 60, 0.13);
    backdrop-filter: blur(12px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    border-radius: 12px;
    background: linear-gradient(135deg, #fb923c, #f59e0b);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
    transition: transform 0.2s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08) rotate(-3deg);
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
    color: #1f2937;
}

.header-search {
    flex: 1;
    max-width: 430px;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 237, 213, 0.5);
}

.header-search input,
.mobile-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 11px 14px;
    background: transparent;
    color: var(--color-text);
}

.header-search button,
.mobile-search button {
    border: 0;
    padding: 11px 16px;
    color: #ffffff;
    background: var(--color-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover {
    background: var(--color-primary-dark);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-panel nav a {
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel nav a:hover {
    color: var(--color-primary-dark);
}

.mobile-menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 24px;
    color: #374151;
    background: rgba(255, 237, 213, 0.8);
    cursor: pointer;
}

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

.mobile-panel nav {
    display: grid;
    gap: 10px;
    padding-top: 14px;
}

.mobile-search {
    display: flex;
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
}

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

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

.hero-slide {
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.08));
}

.hero-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-text {
    max-width: 620px;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f97316;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-text h1,
.hero-text h2 {
    margin: 12px 0 14px;
    color: #ffffff;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hero-text h2 + p,
.hero-text p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: #c2410c;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags .tag {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.82);
    backdrop-filter: blur(4px);
}

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

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px) scale(1.02);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.26);
    transform: translateY(-2px);
}

.btn-ghost.light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster-card {
    position: relative;
    width: min(310px, 28vw);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    transform: perspective(900px) rotateY(-8deg);
}

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

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

.hero-poster-card span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 30px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.9);
    transform: translate(-50%, -50%);
    box-shadow: 0 16px 38px rgba(249, 115, 22, 0.35);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.52);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

.hero-dot.active {
    width: 32px;
    background: var(--color-primary);
}

.content-section {
    padding: 44px 0 4px;
}

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

.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 900;
}

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

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

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

.movie-card {
    min-width: 0;
    border-radius: 18px;
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5e7eb;
}

.movie-card-compact .movie-poster {
    aspect-ratio: 16 / 11;
}

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

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

.poster-badge,
.poster-year {
    position: absolute;
    top: 10px;
    z-index: 2;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 10px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
}

.poster-year {
    right: 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.66);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 22px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.74);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0;
    min-height: 46px;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 900;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--color-primary-dark);
}

.movie-card-body p {
    min-height: 42px;
    margin: 10px 0 10px;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile,
.category-overview-card {
    border: 1px solid var(--color-border);
    border-radius: 22px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
}

.category-tile {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-mark {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #fb923c, #f59e0b);
}

.category-tile h2,
.category-overview-copy h2 {
    margin: 14px 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p,
.category-overview-copy p {
    color: var(--color-muted);
    line-height: 1.65;
}

.category-mini-links {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 18% 10%, rgba(251, 146, 60, 0.9), transparent 28%), linear-gradient(135deg, #111827, #7c2d12 56%, #f97316);
}

.soft-hero {
    color: #1f2937;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-bottom: 1px solid var(--color-border);
}

.category-hero {
    background: linear-gradient(135deg, #111827, #9a3412 58%, #f59e0b);
}

.ranking-hero {
    background: linear-gradient(135deg, #0f172a, #7c2d12 52%, #ea580c);
}

.page-hero-copy {
    max-width: 760px;
    padding: 70px 0;
}

.page-hero-copy h1 {
    margin: 10px 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    font-weight: 950;
}

.page-hero-copy p {
    margin: 0;
    max-width: 680px;
    font-size: 18px;
    line-height: 1.8;
}

.category-overview-list {
    display: grid;
    gap: 24px;
    padding: 42px 0 20px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: center;
}

.category-overview-copy span {
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 900;
}

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

.filter-toolbar {
    margin: 32px 0 10px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-soft);
}

.filter-search-box input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    outline: 0;
    padding: 13px 14px;
    background: #ffffff;
}

.large-search input {
    padding: 16px;
    font-size: 18px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-button {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 13px;
    color: #9a3412;
    background: #fff7ed;
    cursor: pointer;
    font-weight: 800;
    transition: color 0.2s ease, background 0.2s ease;
}

.filter-button.active,
.filter-button:hover {
    color: #ffffff;
    background: var(--color-primary);
}

.filter-status {
    margin: 12px 0 0;
    color: var(--color-muted);
    font-size: 14px;
}

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

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

.ranking-item {
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.ranking-link {
    display: grid;
    grid-template-columns: 54px 92px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
}

.ranking-number {
    color: var(--color-primary-dark);
    font-size: 24px;
    font-weight: 950;
    text-align: center;
}

.ranking-link img {
    width: 92px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    background: #e5e7eb;
}

.ranking-copy strong,
.ranking-copy em {
    display: block;
}

.ranking-copy strong {
    color: #1f2937;
    font-size: 16px;
    font-weight: 900;
}

.ranking-copy em {
    margin-top: 4px;
    color: var(--color-muted);
    font-style: normal;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.ranking-arrow {
    color: #ffffff;
    background: var(--color-primary);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 900;
}

.detail-hero {
    background: linear-gradient(135deg, #111827, #7c2d12 56%, #f97316);
    color: #ffffff;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: center;
    padding: 52px 0;
}

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fed7aa;
    font-size: 14px;
    font-weight: 700;
}

.detail-copy h1 {
    margin: 12px 0 16px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.1;
    font-weight: 950;
}

.detail-one-line {
    margin: 0 0 20px;
    max-width: 760px;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 800;
}

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

.player-section,
.detail-section,
.related-section {
    margin-bottom: 34px;
}

.compact-heading {
    margin-bottom: 14px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 24px 58px rgba(17, 24, 39, 0.22);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-circle {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.94);
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.35);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 20px;
}

.detail-section {
    border: 1px solid var(--color-border);
    border-radius: 22px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 950;
}

.detail-section p {
    margin: 0;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

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

.site-footer {
    margin-top: 54px;
    color: #d1d5db;
    background: #111827;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 24px;
    font-weight: 950;
}

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

.site-footer p {
    margin: 12px 0 0;
    line-height: 1.75;
}

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

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

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

[hidden] {
    display: none !important;
}

.is-hidden {
    display: none !important;
}

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

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

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

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

    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 820px) {
    .site-header-inner {
        height: auto;
        min-height: 64px;
        padding: 10px 0;
    }

    .header-search {
        display: none;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-carousel {
        height: 620px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 78px;
    }

    .hero-poster-card {
        display: none;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.9));
    }

    .hero-control {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

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

    .movie-grid,
    .all-movie-grid,
    .related-grid,
    .ranking-grid,
    .ranking-list,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 560px) {
    .container,
    .site-header-inner,
    .mobile-panel {
        width: min(100% - 22px, 1180px);
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-text h1,
    .hero-text h2 {
        font-size: 34px;
    }

    .hero-text p,
    .page-hero-copy p,
    .detail-one-line {
        font-size: 16px;
    }

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

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

    .ranking-link {
        grid-template-columns: 44px 76px 1fr;
    }

    .ranking-arrow {
        display: none;
    }

    .ranking-link img {
        width: 76px;
        height: 56px;
    }

    .page-hero-copy {
        padding: 48px 0;
    }

    .detail-section {
        padding: 18px;
    }
}
