:root {
    --bg: #f7f7f5;
    --paper: #ffffff;
    --paper-soft: #fff7ed;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #ea580c;
    --shadow: 0 14px 32px rgba(17, 24, 39, 0.10);
    --shadow-soft: 0 10px 24px rgba(17, 24, 39, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    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: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.88);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
    font-size: 13px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy span {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.brand-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    color: #374151;
    font-weight: 700;
    transition: color 0.18s ease, background 0.18s ease;
}

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

.nav-dropdown {
    position: relative;
}

.nav-drop-button {
    cursor: default;
}

.nav-drop-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 160px;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-dropdown:hover .nav-drop-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-drop-menu a {
    display: block;
    padding: 8px 10px;
    color: #374151;
    border-radius: 10px;
    font-size: 14px;
}

.nav-drop-menu a:hover {
    background: var(--paper-soft);
    color: var(--amber-dark);
}

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

.header-search input,
.mobile-search input,
.wide-search input,
.filter-bar input {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 999px;
    outline: none;
    color: var(--text);
    transition: border 0.18s ease, box-shadow 0.18s ease;
}

.header-search input {
    width: 210px;
    padding: 9px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.header-search button,
.mobile-search button,
.wide-search button,
.filter-bar a,
.btn-primary,
.btn-ghost {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.header-search button,
.mobile-search button,
.wide-search button,
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.22);
}

.header-search button {
    padding: 9px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(217, 119, 6, 0.30);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 16px 18px;
    background: #fff;
}

.mobile-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    color: #374151;
    background: #f9fafb;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
}

.mobile-search button {
    padding: 10px 16px;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #451a03);
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.15) 100%), radial-gradient(circle at 24% 30%, rgba(245, 158, 11, 0.32), transparent 35%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(650px, 100%);
    color: #fff;
}

.hero-kicker,
.page-hero span,
.section-heading span {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.14);
    color: var(--amber-dark);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #fff;
    background: rgba(217, 119, 6, 0.9);
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 18px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.hero-copy p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    max-width: 58ch;
}

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

.hero-tags span,
.tag-row span,
.large-tags a {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

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

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
}

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

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

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

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

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

.home-search-panel {
    margin-top: -34px;
    position: relative;
    z-index: 4;
}

.search-panel-inner {
    display: grid;
    grid-template-columns: 1.05fr 1.2fr;
    gap: 20px;
    align-items: center;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.search-panel-inner h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 900;
}

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

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

.wide-search input {
    min-width: 0;
    flex: 1;
    padding: 13px 16px;
}

.wide-search button {
    padding: 13px 22px;
}

.category-pills {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pills a,
.filter-bar a,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--amber-dark);
    background: var(--paper-soft);
    font-weight: 800;
}

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

.section-warm {
    background: linear-gradient(180deg, #fff7ed, #fff);
}

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

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

.section-heading > a,
.text-link {
    color: var(--amber-dark);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-thumb {
    position: relative;
    display: block;
    padding-top: 56.25%;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #92400e);
}

.movie-thumb img,
.category-card img,
.category-overview-image img,
.rank-cover img,
.poster-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

.movie-card:hover .movie-thumb img,
.category-card:hover img,
.category-overview-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.movie-badge,
.rank-no {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.rank-no {
    left: 10px;
    right: auto;
    background: rgba(217, 119, 6, 0.95);
}

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

.movie-title {
    display: block;
    min-height: 52px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

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

.movie-card-body p {
    min-height: 46px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 10px;
}

.tag-row span,
.large-tags a {
    color: #92400e;
    background: #ffedd5;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    padding: 18px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, #111827, #7c2d12);
    box-shadow: var(--shadow-soft);
}

.category-card:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.82) 100%);
}

.category-card img {
    z-index: 0;
    opacity: 0.72;
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.two-column {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 34px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 112px minmax(0, 1fr) 54px;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-soft);
}

.rank-index {
    color: var(--amber-dark);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    position: relative;
    display: block;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #92400e);
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy strong {
    font-weight: 900;
}

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

.rank-heat {
    color: var(--amber-dark);
    font-weight: 900;
    text-align: right;
}

.side-card-grid {
    display: grid;
    gap: 14px;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 142px minmax(0, 1fr);
}

.movie-card-compact .movie-thumb {
    height: 100%;
    padding-top: 0;
}

.movie-card-compact .movie-title {
    min-height: auto;
    font-size: 15px;
}

.movie-card-compact .movie-card-body p {
    min-height: auto;
}

.page-hero {
    padding: 70px 0;
    color: #fff;
    background: radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.36), transparent 26%), linear-gradient(135deg, #111827, #7c2d12 62%, #ea580c);
}

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

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.page-hero span {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

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

.breadcrumb i {
    font-style: normal;
    opacity: 0.6;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.category-overview-image {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #111827, #92400e);
}

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

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

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.category-samples a {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 800;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.filter-bar input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
}

.detail-wrap {
    padding: 34px 0 70px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.detail-main .breadcrumb {
    color: var(--muted);
    margin: 0 0 18px;
}

.detail-main .breadcrumb a:hover {
    color: var(--amber-dark);
}

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(217, 119, 6, 0.28), rgba(0, 0, 0, 0.54));
    cursor: pointer;
}

.play-layer span {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 45px rgba(217, 119, 6, 0.36);
    font-size: 30px;
}

.play-layer strong {
    font-size: 18px;
}

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

.detail-title-block,
.content-panel,
.tag-panel,
.related-inline,
.sidebar-panel,
.poster-panel {
    margin-top: 22px;
    padding: 22px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-title-block h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.detail-title-block p {
    margin: 12px 0 0;
    color: #374151;
    font-size: 17px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #ffedd5;
    font-size: 13px;
    font-weight: 800;
}

.content-panel h2,
.tag-panel h2,
.related-inline h2,
.sidebar-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.content-panel p,
.sidebar-panel p {
    margin: 0;
    color: #374151;
    white-space: pre-line;
}

.warm-panel {
    background: linear-gradient(135deg, #fff7ed, #fff);
}

.large-tags a {
    padding: 8px 12px;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 800;
}

.related-links a:hover {
    background: #ffedd5;
    color: var(--amber-dark);
}

.detail-sidebar {
    min-width: 0;
}

.detail-sidebar > *:first-child {
    margin-top: 40px;
}

.poster-panel {
    position: sticky;
    top: 104px;
}

.poster-panel img {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    object-fit: cover;
    background: linear-gradient(135deg, #111827, #92400e);
}

.full {
    width: 100%;
    margin-top: 16px;
}

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

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

.footer-grid h2,
.footer-brand strong {
    margin: 0 0 12px;
    color: #fff;
    font-size: 18px;
}

.footer-grid p {
    margin: 12px 0 0;
    color: #d1d5db;
}

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

.footer-grid a:hover {
    color: #f59e0b;
}

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

[data-filter-card].is-hidden {
    display: none;
}

img.is-hidden-image {
    opacity: 0;
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-panel.open {
        display: block;
    }

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

    .two-column,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .poster-panel {
        position: static;
    }

    .detail-sidebar > *:first-child {
        margin-top: 22px;
    }
}

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

    .brand-copy span {
        font-size: 18px;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .search-panel-inner,
    .wide-search,
    .filter-bar,
    .section-heading,
    .footer-bottom {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .movie-card-compact .movie-thumb {
        padding-top: 56.25%;
    }

    .rank-item {
        grid-template-columns: 36px 92px minmax(0, 1fr);
    }

    .rank-heat {
        display: none;
    }

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

    .section-block {
        padding: 44px 0;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        gap: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-ghost {
        width: 100%;
    }
}
