* {
    box-sizing: border-box;
}

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-soft: #fffbeb;
    --text: #171717;
    --muted: #6b7280;
    --line: #e5e7eb;
    --amber: #b45309;
    --amber-strong: #d97706;
    --amber-soft: #fef3c7;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 48%, rgba(254, 243, 199, 0.45) 100%);
    line-height: 1.65;
}

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: 50;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.86));
    backdrop-filter: blur(16px);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #92400e, #f59e0b);
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.28);
    font-size: 15px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

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

.logo-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber);
}

.header-search {
    width: 230px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 10px 6px 10px 16px;
    color: var(--text);
}

.header-search button {
    width: 42px;
    border: 0;
    background: transparent;
    color: var(--amber);
    cursor: pointer;
    font-size: 22px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #374151;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav-inner {
    padding: 12px 0 18px;
    display: grid;
    gap: 10px;
}

.mobile-nav-link {
    padding: 10px 0;
    color: #374151;
    font-weight: 650;
}

.mobile-nav-link.active {
    color: var(--amber);
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.mobile-search input,
.search-panel input {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 16px;
    outline: 0;
}

.mobile-search input:focus,
.search-panel input:focus,
.header-search:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.mobile-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #fff;
    background: var(--amber-strong);
    cursor: pointer;
    font-weight: 700;
}

.hero,
.category-hero,
.detail-hero,
.sub-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.1));
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 390px;
    align-items: center;
    gap: 48px;
}

.hero-copy {
    color: #fff;
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(217, 119, 6, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.eyebrow.dark {
    background: var(--amber-soft);
    color: var(--amber);
}

.hero h1,
.sub-hero h1,
.category-hero h1,
.detail-hero h1 {
    margin: 16px 0 10px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 14px;
    font-size: clamp(25px, 4vw, 42px);
    line-height: 1.15;
}

.hero p,
.sub-hero p,
.category-hero p,
.detail-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 30px;
}

.hero-meta span {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 7px 12px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

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

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

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

.btn.primary {
    color: #fff;
    background: var(--amber-strong);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
}

.btn.primary:hover {
    background: var(--amber);
}

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

.btn.small {
    min-height: 38px;
    padding: 0 14px;
    background: var(--amber-soft);
    color: var(--amber);
}

.hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-panel > strong {
    display: block;
    margin-bottom: 14px;
    font-size: 18px;
}

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

.mini-card,
.aside-link {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.mini-card img,
.aside-link img {
    width: 94px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

.mini-card small,
.aside-link em {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-style: normal;
    font-size: 12px;
    margin-top: 4px;
}

.section {
    padding: 64px 0;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading.centered {
    max-width: 760px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-heading.split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.section-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 760px;
}

.text-link {
    color: var(--amber);
    font-weight: 750;
}

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

.category-tile {
    position: relative;
    min-height: 175px;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #111827;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span {
    position: absolute;
    inset: auto 16px 16px 16px;
    z-index: 1;
    color: #fff;
}

.category-tile strong {
    display: block;
    font-size: 20px;
}

.category-tile em {
    display: -webkit-box;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

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

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

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

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

.duration {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    padding: 4px 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.65);
    font-size: 12px;
}

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    background: rgba(0, 0, 0, 0.28);
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

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

.movie-title {
    font-weight: 750;
    font-size: 17px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
    color: var(--amber);
}

.movie-desc {
    margin: 9px 0 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.movie-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: #f3f4f6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--amber);
    background: var(--amber-soft);
    font-size: 12px;
}

.tag-row.large span {
    font-size: 13px;
    padding: 6px 11px;
}

.feature-band {
    padding: 62px 0;
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.72), rgba(255, 247, 237, 0.72));
}

.light-card {
    padding: 26px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.ranking-section {
    background: #fff;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

.ranking-copy {
    position: sticky;
    top: 110px;
}

.ranking-copy h2 {
    font-size: 36px;
    line-height: 1.15;
    margin: 14px 0 10px;
}

.ranking-copy p {
    color: var(--muted);
    margin-bottom: 24px;
}

.ranking-list,
.ranking-card-list {
    display: grid;
    gap: 14px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 54px 110px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #fafafa;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-num {
    color: rgba(217, 119, 6, 0.45);
    font-weight: 900;
    font-size: 24px;
}

.ranking-row img {
    width: 110px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.rank-tag {
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--amber);
    background: var(--amber-soft);
    font-size: 12px;
}

.sub-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
    color: #fff;
    background: radial-gradient(circle at top left, #92400e, #111827 62%);
}

.sub-hero .container {
    position: relative;
    z-index: 1;
    padding: 70px 0;
}

.sub-hero h1 {
    max-width: 850px;
}

.sub-hero p {
    max-width: 760px;
}

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

.category-card-large {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.category-cover-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: #111827;
}

.category-cover-grid img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

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

.category-card-content h2 {
    margin: 12px 0 8px;
}

.category-card-content p {
    color: var(--muted);
}

.category-hero {
    min-height: 420px;
    color: #fff;
}

.category-hero-content {
    position: relative;
    z-index: 1;
    padding: 72px 0;
}

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

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.chip {
    border-radius: 999px;
    padding: 9px 14px;
    background: #fff;
    border: 1px solid var(--line);
    color: #374151;
    font-weight: 650;
}

.chip.active,
.chip:hover {
    border-color: #f59e0b;
    color: var(--amber);
    background: var(--amber-soft);
}

.ranking-card {
    display: grid;
    grid-template-columns: 72px 190px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ranking-index {
    color: rgba(217, 119, 6, 0.45);
    font-weight: 900;
    font-size: 26px;
}

.ranking-thumb img {
    width: 190px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-card-body h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.ranking-card-body p {
    color: var(--muted);
    margin: 0 0 12px;
}

.search-panel {
    display: flex;
    gap: 10px;
    max-width: 720px;
    margin-top: 28px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.search-panel input {
    border: 0;
}

.search-panel button {
    min-width: 110px;
}

.empty-state {
    border-radius: 22px;
    padding: 42px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.detail-hero {
    min-height: 480px;
    color: #fff;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(6px) scale(1.04);
}

.detail-hero-content {
    position: relative;
    z-index: 1;
    padding: 58px 0;
}

.detail-title-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.detail-cover {
    width: 260px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.52));
    cursor: pointer;
    z-index: 2;
}

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

.play-button {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    background: rgba(217, 119, 6, 0.94);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    font-size: 34px;
}

.detail-content-card,
.aside-card {
    margin-top: 24px;
    border-radius: 24px;
    padding: 26px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.detail-content-card h2,
.aside-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-content-card p {
    color: #374151;
    margin: 0 0 22px;
}

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

.info-grid div {
    border-radius: 16px;
    padding: 14px;
    background: #f9fafb;
}

.info-grid strong,
.info-grid span {
    display: block;
}

.info-grid strong {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.related-section {
    padding-top: 34px;
}

.detail-aside {
    position: sticky;
    top: 100px;
}

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

.aside-link {
    grid-template-columns: 112px minmax(0, 1fr);
    color: var(--text);
}

.aside-link img {
    width: 112px;
}

.aside-link em {
    color: var(--muted);
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937 54%, #111827);
}

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

.footer-logo {
    color: #fff;
}

.site-footer p {
    color: #d1d5db;
    margin-top: 14px;
}

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

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

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

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 14px;
}

.clamp-1,
.clamp-2,
.clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clamp-1 {
    -webkit-line-clamp: 1;
}

.clamp-2 {
    -webkit-line-clamp: 2;
}

.clamp-3 {
    -webkit-line-clamp: 3;
}

@media (max-width: 1024px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

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

    .hero-content,
    .ranking-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .ranking-copy,
    .detail-aside {
        position: static;
    }

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

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

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

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

    .header-inner {
        min-height: 66px;
    }

    .logo-text small {
        display: none;
    }

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

    .hero-content,
    .category-hero-content,
    .detail-hero-content {
        min-height: auto;
        padding: 54px 0;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.68));
    }

    .hero-actions,
    .section-heading.split,
    .footer-bottom,
    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .btn,
    .search-panel button {
        width: 100%;
    }

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

    .ranking-row {
        grid-template-columns: 42px 92px minmax(0, 1fr);
    }

    .rank-tag {
        display: none;
    }

    .ranking-card {
        grid-template-columns: 46px 112px minmax(0, 1fr);
    }

    .ranking-card .btn {
        grid-column: 1 / -1;
    }

    .ranking-thumb img {
        width: 112px;
    }

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

    .detail-cover {
        width: 180px;
    }

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