:root {
    --bg: #0c0a09;
    --bg-soft: #1c1917;
    --bg-card: #292524;
    --bg-card-2: #1f1b18;
    --line: #44403c;
    --line-soft: #292524;
    --text: #fef3c7;
    --text-main: #fafaf9;
    --muted: #a8a29e;
    --muted-2: #78716c;
    --amber: #d97706;
    --amber-light: #f59e0b;
    --amber-dark: #92400e;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(217, 119, 6, 0.12), transparent 34rem), var(--bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 10, 9, 0.88);
    border-bottom: 1px solid rgba(68, 64, 60, 0.7);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber-light), var(--amber-dark));
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

.brand-mark span {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #fff7ed;
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    gap: 6px;
}

.nav-link,
.mobile-link {
    color: #d6d3d1;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 9px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--amber-light);
    background: rgba(217, 119, 6, 0.12);
}

.header-search {
    margin-left: auto;
    display: flex;
    width: min(340px, 34vw);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(28, 25, 23, 0.9);
}

.header-search input,
.mobile-search input,
.big-search input,
.search-page-form input,
.local-filter input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text-main);
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.big-search button,
.search-page-form button {
    border: 0;
    color: #fff7ed;
    background: var(--amber);
    transition: background 0.2s ease;
}

.header-search button {
    padding: 0 18px;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.search-page-form button:hover {
    background: var(--amber-light);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(41, 37, 36, 0.9);
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line-soft);
    padding: 14px 16px 18px;
    background: rgba(12, 10, 9, 0.96);
}

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mobile-link {
    padding: 12px 14px;
}

.mobile-search,
.big-search,
.search-page-form,
.local-filter {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(28, 25, 23, 0.92);
}

.mobile-search input,
.big-search input,
.search-page-form input,
.local-filter input {
    padding: 14px 16px;
}

.mobile-search button,
.big-search button,
.search-page-form button {
    padding: 0 22px;
}

.hero-slider {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #0a0807;
}

.hero-track {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-image,
.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.95) 0%, rgba(12, 10, 9, 0.72) 42%, rgba(12, 10, 9, 0.28) 100%),
        linear-gradient(0deg, #0c0a09 0%, rgba(12, 10, 9, 0.1) 46%, rgba(12, 10, 9, 0.78) 100%);
}

.hero-content {
    position: relative;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 340px;
    align-items: center;
    gap: 56px;
    padding-top: 36px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--amber-light);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-title {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.hero-copy h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 54px);
    line-height: 1.1;
    font-weight: 850;
}

.hero-copy p {
    max-width: 720px;
    margin: 0;
    color: #e7e5e4;
    font-size: 18px;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    padding: 6px 11px;
    color: #fde68a;
    background: rgba(146, 64, 14, 0.18);
    font-size: 13px;
}

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

.btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn {
    min-height: 44px;
    padding: 0 20px;
}

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

.btn-primary {
    color: #fff7ed;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.28);
}

.btn-ghost {
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.45);
    background: rgba(28, 25, 23, 0.62);
}

.hero-card {
    position: relative;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 26px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-card span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff7ed;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(10px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 1px solid rgba(245, 158, 11, 0.36);
    color: #fff7ed;
    background: rgba(28, 25, 23, 0.72);
    backdrop-filter: blur(12px);
}

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

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 50%;
}

.hero-dot.is-active {
    width: 30px;
    border-radius: 999px;
    background: var(--amber-light);
}

.section {
    padding: 76px 0 0;
}

.section-head,
.ranking-layout,
.search-panel {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 26px;
}

.section-head h2,
.ranking-copy h2,
.search-panel h2,
.content-card h2,
.category-overview-head h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
    font-weight: 880;
}

.text-link {
    color: var(--amber-light);
}

.search-panel {
    align-items: center;
    border: 1px solid var(--line-soft);
    border-radius: 26px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.94), rgba(28, 25, 23, 0.9));
    box-shadow: var(--shadow);
}

.big-search {
    width: min(560px, 100%);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 26px;
}

.category-tile,
.category-overview-card,
.content-card {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(41, 37, 36, 0.94), rgba(28, 25, 23, 0.94));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.category-tile {
    min-height: 148px;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 22px;
    font-weight: 850;
}

.category-tile p,
.ranking-copy p,
.content-card p,
.category-overview-head p,
.page-hero p,
.footer-brand p {
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(68, 64, 60, 0.6);
    border-radius: var(--radius);
    background: rgba(41, 37, 36, 0.92);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1c1917;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff7ed;
    background: rgba(217, 119, 6, 0.86);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
    padding: 16px;
}

.movie-info h2,
.movie-info h3,
.rank-info h2 {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.32;
    font-weight: 850;
}

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

.movie-meta,
.movie-genre {
    margin: 0 0 6px;
    color: var(--muted-2);
    font-size: 13px;
}

.movie-genre {
    color: #d6d3d1;
}

.movie-desc {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.movie-card--compact .movie-desc {
    -webkit-line-clamp: 2;
}

.ranking-section {
    padding-bottom: 28px;
}

.ranking-layout {
    align-items: stretch;
    border: 1px solid var(--line-soft);
    border-radius: 28px;
    padding: 30px;
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(28, 25, 23, 0.96), rgba(12, 10, 9, 0.96));
    box-shadow: var(--shadow);
}

.ranking-copy {
    max-width: 360px;
}

.ranking-copy p {
    margin: 14px 0 22px;
}

.ranking-list {
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(68, 64, 60, 0.62);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(41, 37, 36, 0.72);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ranking-list a:hover {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(68, 64, 60, 0.62);
}

.ranking-list span,
.rank-number {
    color: var(--amber-light);
    font-weight: 900;
}

.ranking-list strong {
    color: var(--text-main);
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
}

.page-hero {
    padding: 96px 0 56px;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        linear-gradient(180deg, rgba(28, 25, 23, 0.88), rgba(12, 10, 9, 1));
    border-bottom: 1px solid var(--line-soft);
}

.slim-hero {
    padding-top: 84px;
}

.page-hero h1 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    font-weight: 900;
}

.badge-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.category-badge {
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 999px;
    padding: 9px 14px;
    color: #fde68a;
    background: rgba(41, 37, 36, 0.74);
}

.category-overview-list {
    display: grid;
    gap: 24px;
    padding-top: 42px;
}

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 24px;
}

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

.local-filter {
    max-width: 560px;
    margin-top: 28px;
}

.empty-filter {
    display: none;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    color: var(--muted);
    background: rgba(41, 37, 36, 0.76);
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 54px 90px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-poster img {
    width: 90px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

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

.search-page-form {
    max-width: 640px;
    margin-top: 26px;
}

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

.search-results-message {
    grid-column: 1 / -1;
    padding: 24px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(41, 37, 36, 0.75);
}

.detail-hero {
    min-height: 620px;
}

.detail-hero-inner {
    position: relative;
    padding: 48px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 38px;
    color: #d6d3d1;
    font-size: 14px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: end;
}

.detail-cover {
    width: 100%;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 900;
}

.detail-one-line {
    max-width: 760px;
    margin: 0;
    color: #e7e5e4;
    font-size: 18px;
}

.detail-tags {
    margin-bottom: 24px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.12), rgba(0, 0, 0, 0.56));
}

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #fff7ed;
    background: linear-gradient(135deg, var(--amber-light), var(--amber));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.44);
    font-size: 34px;
}

.player-shell.is-playing .player-start {
    display: none;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.content-card {
    padding: 26px;
}

.content-card h2 {
    margin-bottom: 14px;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--line-soft);
    background: #0a0807;
}

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

.footer-brand p {
    margin-top: 16px;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 18px;
}

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

.footer-links a {
    color: var(--muted);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line-soft);
    padding: 18px 0 24px;
    color: var(--muted-2);
    font-size: 14px;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 45;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 50%;
    color: #fff7ed;
    background: rgba(217, 119, 6, 0.92);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 1100px) {
    .movie-grid,
    .compact-grid,
    .category-movie-grid,
    .search-results {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

    .nav-wrap {
        height: 64px;
    }

    .hero-slider,
    .hero-track,
    .hero-content {
        min-height: 740px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
    }

    .hero-card {
        width: min(260px, 70vw);
        transform: none;
    }

    .section-head,
    .ranking-layout,
    .search-panel,
    .category-overview-head,
    .footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

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

    .detail-cover {
        max-width: 260px;
    }

    .rank-card {
        grid-template-columns: 44px 78px 1fr;
    }

    .rank-card .btn {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .rank-poster img {
        width: 78px;
    }
}

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

    .brand-text {
        font-size: 18px;
    }

    .hero-slider,
    .hero-track,
    .hero-content {
        min-height: 700px;
    }

    .hero-copy p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-controls {
        bottom: 20px;
    }

    .section {
        padding-top: 54px;
    }

    .movie-grid,
    .compact-grid,
    .category-movie-grid,
    .search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h2,
    .movie-info h3,
    .rank-info h2 {
        font-size: 16px;
    }

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

    .page-hero {
        padding: 68px 0 38px;
    }

    .detail-hero-inner {
        padding: 30px 0 48px;
    }

    .player-start span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }

    .content-card,
    .search-panel,
    .ranking-layout,
    .category-overview-card {
        padding: 18px;
        border-radius: 18px;
    }
}
