:root {
    --color-bg: #f9fafb;
    --color-panel: #ffffff;
    --color-soft: #fff7ed;
    --color-line: #f3e8d2;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-weak: #9ca3af;
    --color-brand: #f59e0b;
    --color-brand-strong: #ea580c;
    --color-dark: #111827;
    --shadow-card: 0 20px 50px rgba(17, 24, 39, 0.10);
    --shadow-soft: 0 12px 30px rgba(234, 88, 12, 0.18);
    --radius-xl: 26px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-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,
video {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(243, 232, 210, 0.85);
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    min-height: 72px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-strong));
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-2deg);
}

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

.brand-title {
    font-size: 22px;
    background: linear-gradient(90deg, #d97706, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 500;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #374151;
    font-weight: 650;
    transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand-strong));
    box-shadow: var(--shadow-soft);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid #fde7bd;
    border-radius: 16px;
    background: #fffaf1;
}

.header-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    border: 0;
    outline: 0;
    color: var(--color-text);
    background: transparent;
}

.header-search input {
    width: 160px;
    padding: 8px 4px 8px 10px;
}

.header-search button,
.wide-search button {
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand-strong));
    box-shadow: var(--shadow-soft);
}

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

.menu-toggle {
    display: none;
    justify-self: end;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff7ed;
    color: #92400e;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.detail-shade {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(115deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.72) 42%, rgba(234, 88, 12, 0.20) 100%), var(--hero-image);
    background-position: center;
    background-size: cover;
    filter: saturate(1.12);
}

.hero-bg::after,
.detail-shade::after {
    position: absolute;
    inset: 0;
    content: "";
    background: radial-gradient(circle at 18% 22%, rgba(245, 158, 11, 0.34), transparent 34%), radial-gradient(circle at 84% 70%, rgba(234, 88, 12, 0.28), transparent 28%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 54px;
    align-items: center;
    padding: 96px 0 120px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    letter-spacing: -0.04em;
    font-weight: 900;
    line-height: 1.08;
}

.hero-copy h1 {
    font-size: clamp(42px, 8vw, 82px);
}

.hero-lead,
.detail-lead {
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
    max-width: 680px;
}

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

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

.hero-tags span,
.tag-row span,
.tag-cloud span {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

.btn,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: all 0.25s ease;
}

.btn {
    min-height: 48px;
    padding: 0 22px;
}

.btn.primary,
.btn.full {
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand-strong));
    box-shadow: var(--shadow-soft);
}

.btn.soft {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

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

.btn:hover,
.section-more:hover,
.text-link:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-3px);
}

.hero-poster {
    display: block;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.hero-control {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand-strong));
}

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

.search-panel-inner {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 560px);
    gap: 24px;
    align-items: center;
    padding: 26px;
    border: 1px solid #fde7bd;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
}

.search-panel-inner h2,
.section-head h2,
.panel-head h2,
.detail-content h2,
.side-panel h2,
.category-card h2,
.movie-card h2 {
    margin: 0;
    color: var(--color-text);
    font-weight: 900;
    line-height: 1.2;
}

.search-panel-inner h2,
.section-head h2,
.panel-head h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.wide-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px;
    border: 1px solid #fde7bd;
    border-radius: 18px;
    background: #fffaf1;
}

.wide-search input {
    min-width: 0;
    padding: 14px 16px;
}

.wide-search button {
    padding: 0 24px;
}

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

.section-block.tinted {
    background: linear-gradient(180deg, #fff7ed, #f9fafb);
}

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

.section-head.inline {
    width: 100%;
}

.section-more,
.text-link {
    color: #c2410c;
}

.section-more {
    padding: 10px 14px;
    background: #ffedd5;
}

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

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

.category-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    background: var(--color-panel);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
    transition: all 0.25s ease;
}

.category-thumb {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.category-thumb img {
    width: 100%;
    height: 84px;
    object-fit: cover;
}

.category-thumb span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    min-width: 42px;
    height: 32px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.72);
    font-weight: 900;
}

.category-card p,
.movie-card p,
.page-hero p,
.detail-content p,
.site-footer p {
    color: var(--color-muted);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-links a {
    padding: 5px 9px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: var(--color-panel);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
    transition: all 0.25s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow-card);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 15px;
}

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

.tag-row span,
.tag-cloud span {
    padding: 4px 8px;
    color: #9a3412;
    background: #ffedd5;
}

.movie-card h2 {
    display: -webkit-box;
    min-height: 46px;
    overflow: hidden;
    font-size: 17px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card p {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    margin: 10px 0 12px;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card.compact h2 {
    font-size: 16px;
}

.hot-panel,
.side-panel,
.player-card,
.detail-content {
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-card);
}

.hot-panel,
.side-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

.rank-list.small {
    max-height: 840px;
    overflow: auto;
    padding-right: 4px;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #fde7bd;
    border-radius: 16px;
    background: #fffaf1;
    transition: all 0.25s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: #fdba74;
}

.rank-num {
    display: grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-strong));
    font-weight: 900;
}

.rank-main {
    display: grid;
    min-width: 0;
}

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

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

.rank-action {
    color: #c2410c;
    font-size: 13px;
    font-weight: 800;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 18% 18%, rgba(251, 191, 36, 0.40), transparent 28%), linear-gradient(135deg, #111827 0%, #7c2d12 100%);
}

.page-hero.slim {
    padding: 70px 0;
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 62px);
}

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

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

.breadcrumb a {
    color: #fde68a;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 12px;
    border: 1px solid #fde7bd;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.filter-bar.large {
    position: sticky;
    top: 88px;
    z-index: 20;
}

.filter-bar input {
    width: 100%;
    padding: 12px 14px;
}

.filter-bar select {
    min-width: 132px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
}

.rank-page {
    max-width: 980px;
}

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

.detail-breadcrumb {
    position: relative;
    z-index: 2;
    padding-top: 34px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 44px 0 80px;
}

.detail-poster {
    padding: 12px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.detail-info h1 {
    font-size: clamp(36px, 6vw, 68px);
}

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

.player-card {
    grid-column: 1 / -1;
    padding: 16px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.25), rgba(0, 0, 0, 0.70));
    transition: opacity 0.25s ease;
}

.video-frame.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-strong));
    box-shadow: var(--shadow-soft);
    font-size: 28px;
}

.detail-content {
    padding: 28px;
}

.detail-content h2 {
    margin-top: 26px;
    margin-bottom: 12px;
    font-size: 24px;
}

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

.detail-content p {
    margin: 0;
    font-size: 16px;
}

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

.movie-meta div {
    padding: 12px;
    border-radius: 14px;
    background: #fff7ed;
}

.movie-meta dt {
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.movie-meta dd {
    margin: 4px 0 0;
    color: #111827;
    font-weight: 700;
}

.tag-cloud {
    margin-top: 18px;
}

.side-panel h2 {
    margin-bottom: 14px;
    font-size: 22px;
}

.side-links {
    display: grid;
    gap: 10px;
}

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

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

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

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

.site-footer a {
    display: block;
    margin: 7px 0;
    color: #fcd34d;
}

.site-footer p {
    max-width: 520px;
    color: #d1d5db;
}

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

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

@media (max-width: 1100px) {
    .header-inner {
        grid-template-columns: auto auto;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .site-nav,
    .header-search {
        grid-column: 1 / -1;
        display: none;
    }

    .site-nav.is-open,
    .header-search.is-open {
        display: flex;
    }

    .site-nav.is-open {
        flex-wrap: wrap;
        justify-content: flex-start;
        padding-bottom: 8px;
    }

    .header-search.is-open {
        margin-bottom: 14px;
    }

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

    .hero-poster,
    .detail-poster {
        max-width: 320px;
    }

    .hot-panel,
    .side-panel {
        position: static;
    }

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

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

    .brand-subtitle {
        display: none;
    }

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

    .hero-content {
        gap: 28px;
        padding-top: 54px;
    }

    .hero-poster {
        max-width: 240px;
    }

    .search-panel-inner,
    .wide-search,
    .section-head,
    .category-card,
    .footer-grid,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .search-panel-inner,
    .section-head,
    .filter-bar {
        display: grid;
        align-items: stretch;
    }

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

    .movie-meta {
        grid-template-columns: 1fr;
    }

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

    .rank-action {
        display: none;
    }
}

@media (max-width: 520px) {
    .category-grid,
    .category-grid.wide,
    .movie-grid,
    .compact-grid,
    .listing-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .detail-info h1 {
        font-size: 38px;
    }

    .hero-lead,
    .detail-lead,
    .page-hero p {
        font-size: 16px;
    }

    .detail-content,
    .hot-panel,
    .side-panel {
        padding: 18px;
    }
}
