:root {
    --color-ink: #1f2937;
    --color-muted: #6b7280;
    --color-soft: #fff7ed;
    --color-card: #ffffff;
    --color-line: #fed7aa;
    --color-amber: #b45309;
    --color-orange: #ea580c;
    --color-red: #dc2626;
    --shadow-card: 0 18px 45px rgba(146, 64, 14, 0.12);
    --shadow-hero: 0 30px 80px rgba(31, 41, 55, 0.3);
    --radius-large: 28px;
    --radius-card: 18px;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-ink);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 36%, #fff7ed 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.26);
    box-shadow: 0 8px 30px rgba(146, 64, 14, 0.12);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 10px 22px rgba(234, 88, 12, 0.3);
}

.brand-name {
    font-size: 24px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #92400e, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #4b5563;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--color-amber);
    transform: translateY(-1px);
}

.header-search,
.mobile-search,
.page-search,
.quick-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input {
    width: 260px;
    border: 1px solid #fdba74;
    border-radius: 999px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-ink);
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-input:focus {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.18);
}

.search-button,
.primary-button,
.secondary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-button,
.primary-button {
    color: #fff;
    padding: 11px 20px;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 12px 22px rgba(234, 88, 12, 0.28);
}

.secondary-button {
    color: #7c2d12;
    padding: 11px 20px;
    background: rgba(255, 237, 213, 0.92);
    border: 1px solid rgba(253, 186, 116, 0.75);
}

.ghost-button {
    color: #fff7ed;
    padding: 11px 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.36);
}

.search-button:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--color-amber);
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    border-top: 1px solid rgba(251, 191, 36, 0.26);
    background: #fffaf0;
    padding: 18px;
}

.mobile-nav {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: center;
    gap: 48px;
    padding: 90px max(32px, calc((100vw - 1180px) / 2)) 100px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    filter: saturate(1.15) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 28%, rgba(251, 146, 60, 0.54), transparent 32%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(67, 20, 7, 0.72) 55%, rgba(17, 24, 39, 0.84));
}

.hero-content {
    position: relative;
    max-width: 760px;
    color: #fff;
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    border-radius: 999px;
    padding: 8px 14px;
    color: #ffedd5;
    background: rgba(234, 88, 12, 0.28);
    border: 1px solid rgba(253, 186, 116, 0.45);
    font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-content h2 {
    margin: 18px 0 14px;
    font-size: clamp(28px, 3.8vw, 48px);
    line-height: 1.1;
    color: #fed7aa;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.hero-tags span,
.detail-meta span,
.movie-meta-line span {
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.14);
    padding: 6px 10px;
    color: #ffedd5;
    font-size: 14px;
    font-weight: 700;
}

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

.hero-poster {
    position: relative;
    z-index: 2;
    justify-self: end;
    width: min(360px, 100%);
    border-radius: 30px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 237, 213, 0.1));
    box-shadow: var(--shadow-hero);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
}

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

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

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

.quick-search-band {
    margin-top: -34px;
    position: relative;
    z-index: 10;
}

.quick-search-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-radius: var(--radius-large);
    padding: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(253, 186, 116, 0.55);
}

.quick-search-inner h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.quick-search-inner p {
    margin: 0;
    color: var(--color-muted);
}

.content-section {
    padding: 64px 0 0;
}

.section-heading,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-heading h2,
.category-overview-head h2,
.detail-copy h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    color: #1f2937;
}

.section-heading p,
.category-overview-head p {
    margin: 0;
    color: var(--color-muted);
}

.section-more {
    color: var(--color-amber);
    background: #ffedd5;
    padding: 10px 16px;
}

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

.all-movie-grid {
    padding-bottom: 72px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--color-card);
    border: 1px solid rgba(253, 186, 116, 0.45);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(234, 88, 12, 0.7);
    box-shadow: 0 26px 60px rgba(146, 64, 14, 0.18);
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #431407, #ea580c);
}

.poster-frame img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shine {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
}

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

.movie-meta-line {
    margin-bottom: 10px;
}

.movie-card .movie-meta-line span,
.rank-item .movie-meta-line span {
    color: #92400e;
    background: #ffedd5;
    font-size: 12px;
}

.movie-card h3,
.rank-item h3 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover {
    color: var(--color-orange);
}

.movie-card p,
.rank-content p {
    display: -webkit-box;
    margin: 0 0 14px;
    color: #4b5563;
    line-height: 1.65;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    border-radius: 999px;
    padding: 5px 9px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card,
.category-overview-card {
    display: block;
    border-radius: var(--radius-card);
    padding: 22px;
    color: #431407;
    background: linear-gradient(135deg, #ffffff, #ffedd5);
    border: 1px solid rgba(253, 186, 116, 0.7);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(146, 64, 14, 0.18);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 16px;
    color: #7c2d12;
    line-height: 1.65;
}

.category-preview {
    display: grid;
    gap: 7px;
    color: #9a3412;
    font-weight: 700;
    font-size: 13px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 62px 92px 1fr;
    gap: 18px;
    align-items: center;
    border-radius: 22px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(253, 186, 116, 0.48);
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.1);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #dc2626, #ea580c);
}

.rank-cover img {
    width: 92px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.rank-content h3 {
    font-size: 22px;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #7c2d12, #ea580c);
}

.compact-hero {
    padding: 70px 0 62px;
}

.page-hero h1 {
    margin-bottom: 16px;
}

.page-hero p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.8;
}

.page-search .search-input {
    width: min(540px, 100%);
}

.chip-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 34px 0 24px;
}

.chip-nav a {
    border-radius: 999px;
    padding: 9px 14px;
    color: #7c2d12;
    background: #ffedd5;
    border: 1px solid #fed7aa;
    font-weight: 800;
}

.empty-state {
    margin: 28px 0;
    border-radius: 20px;
    padding: 24px;
    background: #fff;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    box-shadow: var(--shadow-card);
}

.category-overview-list {
    display: grid;
    gap: 34px;
    padding: 52px 0 74px;
}

.category-overview-card {
    padding: 28px;
}

.detail-hero {
    min-height: 560px;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.42), transparent 30%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.97), rgba(67, 20, 7, 0.82));
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 26px;
    color: #ffedd5;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    border-radius: 28px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-hero);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
}

.detail-info h1 {
    margin-bottom: 20px;
}

.detail-one-line {
    max-width: 820px;
    color: #ffedd5;
    font-size: 19px;
    line-height: 1.8;
}

.large-tags {
    margin-top: 18px;
}

.large-tags span {
    color: #ffedd5;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.26);
}

.detail-content {
    margin-top: -48px;
    position: relative;
    z-index: 10;
    padding-bottom: 74px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: 0 26px 70px rgba(17, 24, 39, 0.35);
    border: 1px solid rgba(253, 186, 116, 0.55);
}

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

.poster-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.26), rgba(0, 0, 0, 0.42));
    cursor: pointer;
}

.play-button {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc2626, #ea580c);
    box-shadow: 0 24px 46px rgba(234, 88, 12, 0.36);
    font-size: 36px;
    padding-left: 6px;
}

.play-title {
    max-width: min(760px, 86%);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.player-shell.is-playing .poster-layer {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-copy {
    margin-top: 34px;
    border-radius: var(--radius-card);
    padding: 34px;
    background: #fff;
    border: 1px solid rgba(253, 186, 116, 0.5);
    box-shadow: var(--shadow-card);
}

.detail-copy p {
    margin: 0 0 26px;
    color: #374151;
    line-height: 1.9;
    font-size: 17px;
}

.detail-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.detail-pager a {
    border-radius: 18px;
    padding: 18px;
    color: #7c2d12;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    font-weight: 800;
}

.site-footer {
    background: linear-gradient(135deg, #431407, #7c2d12 50%, #9a3412);
    color: #ffedd5;
    margin-top: 70px;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    display: flex;
    justify-content: space-between;
    gap: 34px;
    margin: 0 auto;
    padding: 46px 0;
}

.footer-logo .brand-name {
    color: #fff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.footer-brand p {
    max-width: 520px;
    margin: 16px 0 0;
    color: #fed7aa;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: 16px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 237, 213, 0.16);
    padding: 18px;
    text-align: center;
    color: #fed7aa;
}

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.34);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

[hidden] {
    display: none !important;
}

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

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

    .header-search {
        display: none;
    }
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-carousel {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 26px;
        padding: 90px 22px 86px;
    }

    .hero-poster {
        justify-self: start;
        width: 220px;
    }

    .quick-search-inner,
    .section-heading,
    .category-overview-head,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .quick-search,
    .page-search,
    .mobile-search {
        align-items: stretch;
        flex-direction: column;
    }

    .search-input,
    .page-search .search-input {
        width: 100%;
    }

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

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

    .rank-item {
        grid-template-columns: 46px 74px 1fr;
        gap: 12px;
    }

    .rank-cover img {
        width: 74px;
    }

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

    .detail-poster {
        width: 220px;
    }

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

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

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

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .hero-carousel {
        min-height: 720px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-control {
        display: none;
    }

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

    .movie-card {
        display: grid;
        grid-template-columns: 122px 1fr;
    }

    .movie-card.compact-card {
        grid-template-columns: 108px 1fr;
    }

    .poster-frame img {
        height: 100%;
        aspect-ratio: auto;
    }

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

    .movie-card h3,
    .rank-item h3 {
        font-size: 18px;
    }

    .rank-item {
        grid-template-columns: 1fr;
    }

    .rank-num {
        width: 42px;
        height: 42px;
    }

    .detail-copy {
        padding: 24px;
    }

    .play-button {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
