* {
    box-sizing: border-box;
}

:root {
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #ea580c;
    --red: #dc2626;
    --bg: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 16px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
}

.logo-mark span {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #fff;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--amber-dark);
}

.mobile-nav {
    display: none;
    padding: 10px 24px 22px;
    border-top: 1px solid var(--line);
    background: #fff;
}

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

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: linear-gradient(135deg, #d97706 0%, #ea580c 50%, #b91c1c 100%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
}

.hero-slide.is-active {
    display: block;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.28;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.1);
    transform: scale(1.04);
}

.hero-slide::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.76), rgba(17, 24, 39, 0.22)), linear-gradient(0deg, rgba(17, 24, 39, 0.5), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 54px;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    padding: 78px 0 112px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fef3c7;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 22px;
    color: #fff;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(18px, 2.2vw, 24px);
}

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

.hero-tags span,
.large-tags span {
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: #fff;
    color: var(--amber-dark);
    box-shadow: 0 14px 30px rgba(255, 255, 255, 0.22);
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #fff;
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    transform: rotate(2deg);
}

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

.hero-poster span,
.play-hover {
    position: absolute;
    inset: 50% auto auto 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--amber);
    color: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.35);
}

.hero-tools {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    background: #fff;
}

.hero-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.hero-cats a {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--amber-dark);
    font-weight: 800;
}

.intro-search,
.page-hero {
    padding: 46px 0 24px;
}

.intro-search h2,
.page-hero h1 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
}

.intro-search p,
.page-hero p {
    max-width: 780px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 18px;
}

.small-hero {
    margin-top: 28px;
    padding: 42px;
    border-radius: 30px;
    background: linear-gradient(135deg, #fff7ed, #ffffff 60%, #fef3c7);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.small-hero .eyebrow {
    color: var(--amber-dark);
}

.search-panel {
    position: relative;
    max-width: 760px;
    margin-top: 22px;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.search-input span {
    color: var(--amber-dark);
    font-weight: 800;
}

.search-input input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    font-size: 16px;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 50;
    display: none;
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.search-results.is-open {
    display: block;
}

.search-result-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item:last-child {
    border-bottom: 0;
}

.search-result-item img {
    width: 56px;
    height: 74px;
    border-radius: 10px;
    object-fit: cover;
}

.search-result-item strong {
    display: block;
    color: var(--text);
}

.search-result-item em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 26px;
}

.section-title span {
    display: block;
    margin-bottom: 5px;
    color: var(--amber-dark);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-title h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

.section-title a {
    color: var(--amber-dark);
    font-weight: 800;
}

.feature-block {
    margin-top: 22px;
    padding: 42px;
    border-radius: 30px;
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.08));
    transition: opacity 0.25s ease;
}

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

.movie-year,
.movie-type {
    position: absolute;
    top: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-year {
    right: 10px;
    background: rgba(0, 0, 0, 0.68);
}

.movie-type {
    left: 10px;
    background: var(--amber);
}

.play-hover {
    z-index: 3;
    width: 56px;
    height: 56px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-info {
    padding: 16px;
}

.movie-info h2 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--text);
    font-size: 17px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info h2 a:hover {
    color: var(--amber);
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--muted);
    font-size: 13px;
}

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

.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fffbeb;
    color: var(--amber-dark);
    font-size: 12px;
    font-weight: 800;
}

.container + .container,
.feature-block + .container {
    margin-top: 56px;
}

.split-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
}

.latest-panel,
.ranking-panel,
.content-card {
    border-radius: 24px;
    background: #fff;
    padding: 26px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.section-title.compact {
    margin-bottom: 16px;
}

.section-title.compact h2 {
    font-size: 26px;
}

.compact-list {
    display: grid;
    gap: 14px;
}

.compact-card {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f9fafb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: #fff7ed;
    transform: translateX(4px);
}

.compact-card img {
    width: 86px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    color: var(--text);
}

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

.rank-list .compact-card {
    grid-template-columns: 38px 70px 1fr;
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--amber);
    color: #fff;
    font-weight: 900;
}

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

.category-tile {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-tile > a {
    display: block;
    min-height: 150px;
    padding: 24px;
    background: linear-gradient(135deg, #d97706, #ea580c);
    color: #fff;
}

.category-tile span,
.category-tile strong {
    display: block;
}

.category-tile span {
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    font-size: 15px;
    font-weight: 600;
    opacity: 0.92;
}

.category-tile ul {
    margin: 0;
    padding: 18px 22px 22px;
    list-style: none;
}

.category-tile li + li {
    margin-top: 8px;
}

.category-tile li a {
    color: #374151;
    font-weight: 700;
}

.category-tile li a:hover {
    color: var(--amber);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.filter-row select {
    min-width: 150px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: #374151;
    outline: none;
}

.empty-state {
    display: none;
    margin: 32px 0;
    color: var(--muted);
    text-align: center;
    font-size: 18px;
}

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

.ranking-page {
    display: grid;
    gap: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 60px 120px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #fff7ed;
    color: var(--amber-dark);
    font-size: 20px;
    font-weight: 900;
}

.ranking-cover img {
    width: 120px;
    height: 90px;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-row h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.ranking-row h2 a:hover {
    color: var(--amber);
}

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

.detail-main {
    background: #f8fafc;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.36;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.1);
    transform: scale(1.04);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 46px;
    align-items: center;
    padding: 70px 0;
}

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-one {
    max-width: 780px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
}

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

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

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

.player-section h2 {
    margin: 0 0 16px;
    font-size: 30px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
}

.player-cover.is-hidden {
    display: none;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover span {
    position: absolute;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--amber);
    color: #fff;
    font-size: 32px;
    box-shadow: 0 18px 42px rgba(217, 119, 6, 0.45);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card h2 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.related-section {
    padding-bottom: 70px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 42px;
    padding: 48px 0;
}

.footer-brand .site-logo {
    margin-bottom: 16px;
    color: #fff;
}

.footer-brand p {
    max-width: 560px;
    margin: 0;
    color: #9ca3af;
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 10px;
}

.site-footer a:hover {
    color: #fbbf24;
}

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

@media (max-width: 1080px) {
    .desktop-nav {
        gap: 14px;
        font-size: 14px;
    }

    .hero-content {
        grid-template-columns: 1fr 300px;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        min-height: 760px;
        gap: 28px;
        padding: 58px 0 146px;
    }

    .hero-poster {
        width: min(320px, 80vw);
        transform: none;
    }

    .hero-tools {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .split-section,
    .detail-content,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(310px, 70vw);
    }

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .site-logo {
        font-size: 20px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-desc,
    .detail-one {
        font-size: 17px;
    }

    .hero-cats {
        justify-content: flex-start;
    }

    .small-hero,
    .feature-block,
    .latest-panel,
    .ranking-panel,
    .content-card {
        padding: 22px;
        border-radius: 22px;
    }

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

    .ranking-row {
        grid-template-columns: 44px 88px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .ranking-cover img {
        width: 88px;
        height: 118px;
    }

    .ranking-row p,
    .ranking-row .tag-row {
        display: none;
    }

    .player-cover span {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }
}
