:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-400: #f59e0b;
    --amber-500: #f59e0b;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-soft: 0 14px 40px rgba(17, 24, 39, 0.12);
    --shadow-card: 0 10px 25px rgba(17, 24, 39, 0.1);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    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(--gray-800);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 36%, #fffaf0 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--amber-500), var(--orange-500), var(--amber-500));
    color: var(--white);
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.28);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--orange-600);
    background: var(--white);
    box-shadow: inset 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.logo-text {
    font-size: 20px;
    white-space: nowrap;
}

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

.nav-link {
    font-weight: 700;
    opacity: 0.92;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.header-search input,
.wide-search input,
.toolbar input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-800);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.header-search button,
.wide-search button,
.btn-primary,
.btn-secondary,
.video-cover button {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.btn-secondary {
    color: var(--orange-600);
    background: var(--white);
}

.header-search button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.video-cover button:hover,
.wide-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.18);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-category-bar {
    display: none;
    gap: 10px;
    overflow-x: auto;
    padding: 0 18px 12px;
}

.mobile-category-bar a {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: var(--gray-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-content {
    max-width: 760px;
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding: 130px 24px 120px 0;
    color: var(--white);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--amber-100);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 13px;
}

.eyebrow.dark {
    color: var(--orange-600);
}

.hero-content h1,
.hero-content h2,
.hero-title-like {
    margin: 0;
    line-height: 1.08;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.hero-content h1 {
    font-size: clamp(38px, 6vw, 76px);
    letter-spacing: -0.05em;
}

.hero-content h2,
.hero-title-like {
    margin-top: 18px;
    font-size: clamp(30px, 4vw, 54px);
    font-weight: 900;
}

.hero-content p:not(.eyebrow):not(.hero-title-like) {
    max-width: 650px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.tag-row span {
    color: var(--orange-600);
    background: var(--amber-50);
}

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

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
    box-shadow: 0 18px 35px rgba(234, 88, 12, 0.34);
}

.hero-panel {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 86px;
    width: min(360px, calc(100vw - 48px));
    border-radius: var(--radius-xl);
    padding: 22px;
    color: var(--white);
    background: rgba(17, 24, 39, 0.58);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.hero-panel-title {
    font-weight: 900;
    color: var(--amber-100);
    margin-bottom: 12px;
}

.hero-panel-list {
    display: grid;
    gap: 8px;
}

.hero-panel-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-panel-list span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--orange-600);
    background: var(--amber-100);
    font-size: 13px;
    font-weight: 900;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--white);
}

.search-band,
.section-block,
.category-section,
.page-main,
.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.search-band {
    margin-top: -42px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    border-radius: var(--radius-xl);
    padding-top: 28px;
    padding-bottom: 28px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
    box-shadow: var(--shadow-soft);
}

.search-band h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-article h2,
.related-section h2 {
    margin: 0;
    color: var(--gray-800);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.search-band h2 {
    color: var(--white);
    font-size: clamp(24px, 3vw, 36px);
}

.search-band p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.88);
}

.wide-search {
    display: flex;
    gap: 10px;
}

.wide-search button {
    color: var(--orange-600);
    background: var(--white);
}

.section-block,
.category-section {
    padding-top: 76px;
    padding-bottom: 24px;
}

.no-top-gap {
    padding-top: 24px;
}

.warm-block {
    max-width: none;
    margin-top: 72px;
    padding-top: 64px;
    padding-bottom: 70px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.warm-block > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.warm-block .section-heading h2,
.warm-block .section-heading a,
.warm-block .eyebrow.dark {
    color: var(--white);
}

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

.section-heading.centered {
    justify-content: center;
    text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.section-heading p,
.page-hero p,
.detail-one-line,
.detail-article p,
.related-section p,
.category-card p,
.footer-inner p {
    color: var(--gray-500);
}

.section-heading a {
    color: var(--orange-600);
    font-weight: 800;
}

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(17, 24, 39, 0.15);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-100), var(--orange-500));
}

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

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

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 42px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.36);
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--orange-600);
    background: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card-body h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.compact-card .movie-card-body h2,
.latest-grid .movie-card-body h2 {
    font-size: 15px;
}

.movie-card-body h2 a:hover {
    color: var(--orange-600);
}

.movie-meta,
.movie-desc {
    margin: 8px 0 0;
    color: var(--gray-500);
    font-size: 14px;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card .tag-row {
    margin-top: 12px;
}

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(17, 24, 39, 0.15);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    height: 150px;
    overflow: hidden;
    background: var(--amber-100);
}

.category-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-body {
    padding: 22px;
}

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

.category-card-body p {
    min-height: 52px;
    margin: 8px 0 16px;
}

.category-card-body span {
    color: var(--orange-600);
    font-weight: 900;
}

.ranking-preview {
    padding-bottom: 76px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border-radius: var(--radius-md);
    padding: 12px;
    background: var(--white);
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: var(--amber-50);
}

.rank-row img {
    width: 56px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

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

.rank-title {
    min-width: 0;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-title em {
    display: block;
    margin-top: 3px;
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
}

.rank-score {
    color: var(--orange-600);
    font-weight: 900;
}

.page-main,
.detail-main {
    padding-top: 48px;
    padding-bottom: 72px;
}

.page-hero {
    border-radius: var(--radius-xl);
    padding: clamp(34px, 6vw, 72px);
    background: linear-gradient(135deg, #fff7ed, #ffffff 48%, #ffedd5);
    box-shadow: var(--shadow-soft);
}

.page-hero p {
    max-width: 780px;
    margin: 12px 0 0;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 22px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--orange-600);
    font-weight: 800;
}

.toolbar {
    margin: 28px 0;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.toolbar input {
    border-radius: 14px;
    background: var(--gray-50);
    box-shadow: inset 0 0 0 1px var(--gray-200);
}

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

.filter-button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--gray-700);
    background: var(--gray-100);
    cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
}

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

.full-rank-list {
    max-width: 980px;
    margin: 0 auto;
}

.rank-row.large {
    grid-template-columns: 54px 70px minmax(0, 1fr) 60px;
}

.rank-row.large img {
    width: 70px;
    height: 96px;
}

.detail-breadcrumb {
    margin: 0 0 22px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    aspect-ratio: 16 / 9;
    background: var(--gray-900);
    box-shadow: var(--shadow-soft);
}

.movie-video,
.video-cover,
.video-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    object-fit: contain;
    background: #000;
}

.video-cover {
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-cover img {
    object-fit: cover;
    filter: brightness(0.52);
}

.video-cover button {
    position: relative;
    z-index: 2;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
}

.detail-info {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;
    border-radius: var(--radius-xl);
    padding: 22px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-poster {
    width: 100%;
    border-radius: var(--radius-lg);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: var(--amber-100);
}

.detail-copy h1 {
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.detail-one-line {
    font-size: 16px;
}

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

.detail-meta-list span {
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-weight: 800;
}

.genre-row {
    margin-bottom: 10px;
}

.detail-article,
.related-section {
    margin-top: 30px;
    border-radius: var(--radius-xl);
    padding: 30px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-article h2 {
    margin-top: 22px;
    font-size: 28px;
}

.detail-article h2:first-child {
    margin-top: 0;
}

.detail-article p {
    font-size: 17px;
}

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

.related-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.related-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card span {
    display: block;
    padding: 12px;
    font-weight: 800;
    font-size: 14px;
}

.site-footer {
    color: var(--white);
    background: linear-gradient(180deg, var(--gray-800), var(--gray-900));
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 36px;
}

.footer-logo {
    color: var(--white);
    font-size: 24px;
}

.footer-inner p {
    color: #d1d5db;
}

.footer-inner h2 {
    margin: 0 0 14px;
    color: var(--amber-400);
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #d1d5db;
}

.footer-links a:hover {
    color: var(--amber-400);
}

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

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

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

@media (max-width: 1180px) {
    .header-search {
        display: none;
    }

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

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

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

@media (max-width: 860px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        width: 100%;
        order: 4;
        margin-left: 0;
        padding: 12px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
    }

    .site-nav.is-open {
        display: grid;
        gap: 12px;
    }

    .mobile-category-bar {
        display: flex;
    }

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

    .hero-content {
        margin-left: 24px;
        padding-top: 86px;
        padding-right: 24px;
    }

    .hero-panel {
        left: 24px;
        right: 24px;
        bottom: 70px;
        width: auto;
    }

    .search-band {
        grid-template-columns: 1fr;
        margin-top: -24px;
    }

    .wide-search {
        display: grid;
    }

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

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

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

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

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

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

@media (max-width: 540px) {
    .logo-text {
        font-size: 18px;
    }

    .hero-slider {
        min-height: 780px;
    }

    .hero-content {
        margin-left: 18px;
        padding-right: 18px;
    }

    .hero-actions {
        display: grid;
    }

    .hero-panel {
        left: 18px;
        right: 18px;
    }

    .search-band,
    .section-block,
    .category-section,
    .page-main,
    .detail-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .latest-grid,
    .category-movie-grid,
    .search-movie-grid {
        gap: 14px;
    }

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

    .movie-desc,
    .movie-card .tag-row {
        display: none;
    }

    .rank-row,
    .rank-row.large {
        grid-template-columns: 40px 56px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }
}
