:root {
  color-scheme: dark;
  --bg: #020617;
  --surface: #0f172a;
  --surface-soft: #111827;
  --surface-glass: rgba(15, 23, 42, 0.76);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --radius-sm: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.18), transparent 30rem),
    radial-gradient(circle at 85% 12%, rgba(59, 130, 246, 0.16), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #08111f 42%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.35);
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.brand-text em {
  margin-top: 5px;
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
}

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

.nav-link,
.mobile-link,
.quick-link {
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link.active,
.mobile-link:hover,
.quick-link:hover {
  color: var(--accent-2);
}

.nav-link.active {
  background: rgba(245, 158, 11, 0.12);
}

.header-search {
  width: 264px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.header-search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  padding-left: 8px;
}

.header-search input::placeholder {
  color: #64748b;
}

.header-search button {
  padding: 7px 13px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent-2);
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
}

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

.mobile-panel nav,
.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mobile-link,
.quick-link {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.10);
  font-size: 14px;
}

.quick-row {
  margin-top: 10px;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.30) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.20) 0%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 132px;
  max-width: 1180px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-content h1 {
  max-width: 860px;
  font-size: clamp(44px, 8vw, 88px);
}

.hero-desc {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  color: #dbeafe;
}

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

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(248, 250, 252, 0.18);
  background: rgba(15, 23, 42, 0.55);
}

.btn-text {
  color: var(--accent-2);
  background: rgba(245, 158, 11, 0.12);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 202px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  font-size: 26px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.45);
}

.hero-dot.active {
  width: 34px;
  background: var(--accent-2);
}

.hero-mini-grid {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

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

.section-header h2,
.detail-section h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-header p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--accent-2);
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -45%);
  opacity: 0;
  padding: 10px 16px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent-2);
  font-weight: 900;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  min-width: 38px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: var(--accent-2);
  font-size: 13px;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 9px 0 7px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-content h2 a:hover,
.overview-links a:hover,
.category-preview a:hover {
  color: var(--accent-2);
}

.movie-card p {
  margin: 0;
  min-height: 57px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.46;
}

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

.tag-row span {
  padding: 5px 9px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.09);
  font-size: 12px;
}

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

.movie-card-compact {
  display: grid;
  grid-template-columns: 86px 1fr;
  min-height: 130px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.movie-card-compact .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

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

.movie-card-compact p,
.movie-card-compact .tag-row {
  display: none;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent 46%),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.category-tile a:first-child {
  display: block;
  padding: 22px;
}

.category-tile span,
.category-overview-card h2 {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 21px;
  font-weight: 900;
}

.category-tile strong {
  display: block;
  color: var(--soft);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

.category-preview,
.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 22px;
}

.category-preview a,
.overview-links a {
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 66px 0 8px;
}

.page-hero h1 {
  font-size: clamp(42px, 7vw, 74px);
}

.page-hero p {
  max-width: 780px;
  color: var(--soft);
  line-height: 1.8;
  font-size: 18px;
}

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

.breadcrumb a:hover {
  color: var(--accent-2);
}

.breadcrumb em {
  color: var(--soft);
  font-style: normal;
}

.filter-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.filter-search {
  display: grid;
  gap: 8px;
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-search input,
.filter-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.58);
}

.filter-search input {
  padding: 0 14px;
}

.filter-select {
  padding: 0 12px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-controls .filter-select {
  min-width: 132px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 84px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.74);
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  background: var(--accent-2);
  font-size: 22px;
  font-weight: 900;
}

.rank-cover {
  display: block;
  overflow: hidden;
  width: 84px;
  height: 112px;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-content h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.rank-meta {
  color: #fde68a !important;
  font-size: 13px;
  font-weight: 800;
}

.rank-action {
  padding: 10px 16px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent-2);
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.48;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 56px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-main h1 {
  max-width: 820px;
  font-size: clamp(42px, 7vw, 76px);
}

.detail-line {
  max-width: 820px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-facts span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  color: var(--soft);
}

.detail-section {
  padding-top: 44px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.28);
  transition: opacity 0.2s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-size: 28px;
  box-shadow: 0 20px 46px rgba(245, 158, 11, 0.32);
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.78);
}

.player-error:not(:empty) {
  display: block;
}

.detail-copy {
  display: grid;
  gap: 16px;
}

.detail-copy p {
  margin: 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.9;
}

.tag-row-large span {
  font-size: 14px;
  padding: 7px 11px;
}

.related-grid {
  grid-template-columns: repeat(4, 1fr);
}

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

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

.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

.category-overview-card .btn {
  margin-top: 16px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
}

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

.site-footer h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.footer-links a:hover {
  color: var(--accent-2);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

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

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

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

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

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

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

  .header-inner {
    height: 66px;
  }

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

  .hero-content {
    padding-top: 96px;
  }

  .hero-controls {
    bottom: 250px;
  }

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

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

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

  .section-header,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-controls {
    width: 100%;
  }

  .filter-controls .filter-select {
    flex: 1;
    min-width: 150px;
  }

  .rank-row {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-action {
    grid-column: 2 / -1;
    width: max-content;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 18px;
  }

  .rank-cover {
    width: 72px;
    height: 96px;
  }

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

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

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

@media (max-width: 520px) {
  .container,
  .header-inner,
  .hero-content,
  .hero-controls,
  .hero-mini-grid,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

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

  .brand-text em {
    display: none;
  }

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

  .hero-content h1,
  .page-hero h1,
  .detail-main h1 {
    letter-spacing: -0.04em;
  }

  .hero-controls {
    bottom: 282px;
  }

  .movie-grid,
  .related-grid {
    gap: 13px;
  }

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

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

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

  .hero-mini-grid {
    gap: 10px;
  }

  .movie-card-compact {
    grid-template-columns: 70px 1fr;
    min-height: 108px;
  }

  .movie-card-compact .movie-meta-line,
  .movie-card-compact p {
    display: none;
  }

  .rank-row {
    gap: 12px;
    padding: 12px;
  }

  .rank-content h2 {
    font-size: 18px;
  }

  .rank-content p:not(.rank-meta) {
    display: none;
  }
}
