:root {
  --bg: #030712;
  --bg-soft: #0b1120;
  --panel: #111827;
  --panel-2: #1f2937;
  --line: #263244;
  --text: #ffffff;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --brand: #f97316;
  --brand-dark: #c2410c;
  --brand-soft: rgba(249, 115, 22, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 15% 0%, rgba(249, 115, 22, 0.13), transparent 28%), linear-gradient(180deg, #030712 0%, #111827 46%, #030712 100%);
  color: var(--text);
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-name {
  white-space: nowrap;
}

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), #fb923c);
  color: #fff;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
}

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

.nav-link,
.mobile-link {
  color: #d1d5db;
  font-size: 14px;
  font-weight: 650;
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.15);
}

.header-search,
.mobile-search,
.large-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  outline: none;
  padding: 0 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.header-search button,
.mobile-search button,
.large-search button {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 0 16px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px 18px;
  background: rgba(3, 7, 18, 0.98);
}

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

.hero-slider {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  background: #000;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.74) 36%, rgba(3, 7, 18, 0.16) 70%), linear-gradient(0deg, #030712 0%, transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0 180px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #fed7aa;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-movie-title {
  margin-top: 18px !important;
  font-size: clamp(28px, 4vw, 48px) !important;
  letter-spacing: -0.03em !important;
  color: #fed7aa;
}

.hero-content p {
  max-width: 720px;
  margin: 24px 0 0;
  color: #d1d5db;
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.72;
}

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

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

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

.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.25);
}

.btn.primary:hover {
  background: #ea580c;
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn.text {
  color: #fed7aa;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: var(--brand);
}

.hero-thumbs {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 76px;
  z-index: 4;
  display: grid;
  width: min(360px, 38vw);
  gap: 10px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.56);
  color: #fff;
  text-align: left;
  padding: 8px;
  backdrop-filter: blur(10px);
  opacity: 0.74;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  border-color: rgba(249, 115, 22, 0.58);
  background: rgba(17, 24, 39, 0.82);
}

.hero-thumb img {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  font-weight: 750;
}

.quick-search {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -54px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.88);
  box-shadow: var(--shadow);
  padding: 26px;
  backdrop-filter: blur(18px);
}

.quick-search h2,
.section-head h2,
.page-hero h1,
.rank-hero h1,
.detail-content h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

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

.large-search input {
  flex: 1;
  min-width: 0;
}

.section {
  padding: 72px 0 0;
}

.section.band {
  margin-top: 72px;
  padding: 72px 0;
  background: linear-gradient(90deg, rgba(124, 45, 18, 0.22), rgba(17, 24, 39, 0.3));
  border-block: 1px solid rgba(255, 255, 255, 0.06);
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-link {
  color: #fed7aa;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(31, 41, 55, 0.96));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 46%);
  opacity: 0.7;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.055);
  filter: saturate(1.08);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.meta-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.movie-title {
  display: -webkit-box;
  margin-top: 10px;
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
  color: #fb923c;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.movie-tags span,
.tag-block span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #d1d5db;
  font-size: 12px;
  padding: 4px 8px;
}

.movie-meta-line {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

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

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

.category-card {
  position: relative;
  display: grid;
  min-height: 230px;
  align-content: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: var(--panel);
  padding: 20px;
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.94) 0%, rgba(3, 7, 18, 0.36) 62%, transparent 100%);
}

.category-covers {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  opacity: 0.7;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-name,
.category-desc {
  position: relative;
  z-index: 2;
}

.category-name {
  font-size: 24px;
  font-weight: 850;
}

.category-desc {
  margin-top: 8px;
  color: #d1d5db;
  line-height: 1.65;
}

.home-rank-layout,
.rank-page-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 32px;
}

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

.rank-list.tall {
  align-content: start;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px 54px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.8);
  padding: 10px;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(31, 41, 55, 0.9);
  transform: translateX(3px);
}

.rank-number {
  color: #fb923c;
  font-size: 18px;
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--panel-2);
}

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

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

.rank-info strong {
  color: #fff;
  font-size: 15px;
}

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

.page-main {
  padding-top: 48px;
}

.page-hero,
.rank-hero {
  padding: 62px 0 26px;
}

.page-hero h1,
.rank-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
}

.page-hero p,
.rank-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: #fed7aa;
}

.filter-panel {
  position: sticky;
  top: 84px;
  z-index: 8;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.88);
  padding: 16px;
  backdrop-filter: blur(14px);
}

.filter-panel input {
  flex: 1;
}

.filter-panel select {
  min-width: 150px;
}

.empty-state {
  margin: 24px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.8);
  color: var(--muted);
  text-align: center;
  padding: 30px;
}

.rank-hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 34px;
  align-items: center;
}

.rank-feature {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rank-feature img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: brightness(0.78);
}

.rank-feature span {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.96), transparent);
}

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

.rank-feature strong {
  font-size: 24px;
}

.rank-feature em {
  margin-top: 8px;
  color: #d1d5db;
  font-style: normal;
  line-height: 1.6;
}

.detail-main {
  padding-top: 42px;
}

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

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

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.18), rgba(0, 0, 0, 0.62));
  color: #fff;
  text-align: center;
  padding: 20px;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-play {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.28);
  font-size: 28px;
}

.player-overlay > span:not(.player-play) {
  max-width: 80%;
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 900;
}

.player-overlay em {
  color: #fed7aa;
  font-style: normal;
  font-weight: 800;
}

.detail-content h1 {
  margin-top: 28px;
  font-size: clamp(32px, 5vw, 54px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
  color: #fed7aa;
  font-size: 13px;
  font-weight: 750;
  padding: 7px 12px;
}

.text-block,
.tag-block,
.side-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.72);
  padding: 24px;
}

.text-block + .text-block,
.text-block + .tag-block {
  margin-top: 18px;
}

.text-block h2,
.tag-block h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.text-block p,
.poster-side p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.86;
}

.tag-block div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.poster-side img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--panel-2);
}

.poster-side strong {
  display: block;
  margin-top: 16px;
  font-size: 22px;
}

.rank-list.small .rank-row {
  grid-template-columns: 34px 44px 1fr;
  padding: 8px;
}

.rank-list.small .rank-number {
  font-size: 14px;
}

.rank-list.small .rank-row img {
  width: 44px;
  height: 58px;
}

.site-footer {
  margin-top: 86px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.92);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-grid p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

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

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  font-size: 13px;
  padding: 18px 0 24px;
}

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

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

  .home-rank-layout,
  .rank-page-grid,
  .detail-layout,
  .rank-hero {
    grid-template-columns: 1fr;
  }

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-content {
    padding: 44px 0 144px;
  }

  .hero-thumbs {
    left: 16px;
    right: 16px;
    bottom: 70px;
    width: auto;
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-thumb {
    min-width: 220px;
  }

  .quick-search,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .nav-shell {
    min-height: 64px;
  }

  .brand-name {
    font-size: 15px;
  }

  .hero-slider,
  .hero-content {
    min-height: calc(100vh - 64px);
  }

  .hero-actions,
  .large-search,
  .mobile-search {
    display: grid;
    grid-template-columns: 1fr;
  }

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

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

  .section {
    padding-top: 54px;
  }

  .section.band {
    margin-top: 54px;
    padding: 54px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 38px 48px 1fr;
  }

  .rank-row img {
    width: 48px;
    height: 64px;
  }

  .text-block,
  .tag-block,
  .side-card {
    padding: 18px;
  }
}
