:root {
  --bg: #070b16;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --panel-light: #f8fafc;
  --text: #f8fafc;
  --muted: #a8b3c7;
  --dark-text: #111827;
  --dark-muted: #5b6578;
  --border: rgba(255, 255, 255, 0.12);
  --brand: #f59e0b;
  --brand-2: #ef4444;
  --brand-3: #f97316;
  --ring: rgba(245, 158, 11, 0.36);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 18% 2%, rgba(245, 158, 11, 0.18), transparent 32%),
    radial-gradient(circle at 92% 12%, rgba(239, 68, 68, 0.13), transparent 30%),
    linear-gradient(180deg, #070b16 0%, #0b1020 42%, #111827 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.72);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f1300;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.36);
}

.brand-text {
  white-space: nowrap;
  font-size: 1.14rem;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.78);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

.nav-link:hover {
  transform: translateY(-1px);
}

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

.header-search {
  width: 264px;
}

.header-search input,
.mobile-search input,
.big-search input,
.search-page-form input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  padding: 11px 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 5px var(--ring);
  background: rgba(255, 255, 255, 0.13);
}

.header-search button,
.mobile-search button,
.big-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  color: #1f1300;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 800;
  padding: 11px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 9px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.94);
  padding: 16px;
}

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

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

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  width: min(var(--max), calc(100% - 32px));
  min-height: 650px;
  margin: 34px auto 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  align-items: center;
  padding: clamp(28px, 5vw, 70px);
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: scale(1.02);
}

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

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

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-info .lead-text {
  max-width: 680px;
  color: rgba(248, 250, 252, 0.82);
  font-size: 1.08rem;
  line-height: 1.8;
  margin: 22px 0;
}

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

.hero-tags span,
.tag-row span,
.meta-pills span,
.category-links a {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  padding: 7px 11px;
  font-size: 0.82rem;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
  padding: 0 20px;
}

.primary-btn {
  color: #1f1300;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.24);
}

.ghost-btn,
.section-link {
  color: #fff;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.09);
}

.hero-poster,
.detail-cover,
.poster-card,
.category-cover {
  background-color: #182133;
  background-size: cover;
  background-position: center;
}

.hero-poster {
  min-height: 470px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-controls {
  position: absolute;
  left: clamp(28px, 5vw, 70px);
  bottom: 28px;
  display: flex;
  gap: 9px;
}

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

.hero-dot.is-active {
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.quick-search-panel,
.content-section,
.page-main,
.detail-content,
.related-section,
.rank-section {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  align-items: center;
  gap: 26px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.quick-search-panel h2,
.section-heading h2,
.story-panel h2,
.category-panel-body h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

.content-section,
.rank-section {
  margin-top: 56px;
}

.glass-section {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.05);
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(15, 23, 42, 0.96);
}

.poster-card {
  position: relative;
  display: block;
  min-height: 315px;
}

.poster-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
}

.poster-meta {
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.poster-meta span,
.rank-badge {
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  padding: 7px 10px;
  font-size: 0.78rem;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  text-align: center;
  color: #1f1300;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 900;
}

.card-content {
  padding: 16px;
}

.card-content h2 {
  min-height: 3.1em;
  margin: 0 0 9px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.45;
}

.card-content p {
  min-height: 4.8em;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

.tag-row span {
  color: #fbd38d;
  border-color: rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.10);
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 228px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.compact-card {
  scroll-snap-align: start;
}

.compact-card .poster-card {
  min-height: 285px;
}

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

.category-tile {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile span,
.category-cover span {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-tile strong {
  max-width: 92%;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  line-height: 1.65;
  margin-top: 8px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(30px, 6vw, 72px);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.25), transparent 35%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.88));
  box-shadow: var(--shadow);
}

.small-hero h1,
.search-hero h1,
.category-hero h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.category-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.category-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-cover {
  min-height: 180px;
  display: flex;
  align-items: end;
  padding: 22px;
}

.category-panel-body {
  padding: 18px;
}

.category-panel-body p {
  color: var(--muted);
  line-height: 1.7;
}

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

.mini-links a {
  color: #fbd38d;
}

.filter-bar {
  display: grid;
  gap: 14px;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-chips button {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  cursor: pointer;
}

.year-chips button.is-active {
  color: #1f1300;
  border-color: transparent;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 800;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
}

.pagination .is-current {
  color: #1f1300;
  border-color: transparent;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 900;
}

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

.detail-hero {
  width: min(var(--max), calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 58px);
}

.detail-cover {
  min-height: 460px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.detail-tags {
  margin-top: 16px;
}

.category-links {
  margin-top: 16px;
}

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

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

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

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.32), rgba(0, 0, 0, 0.68));
}

.player-cover > * {
  position: relative;
  z-index: 2;
}

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

.play-button {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #1f1300;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.36);
  font-size: 2.2rem;
  padding-left: 5px;
}

.player-cover strong {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
}

.player-cover em {
  color: #fbd38d;
  font-style: normal;
}

.detail-content {
  display: grid;
  gap: 20px;
  margin-top: 34px;
}

.story-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: clamp(22px, 4vw, 34px);
}

.story-panel p {
  color: rgba(248, 250, 252, 0.80);
  font-size: 1.03rem;
  line-height: 1.9;
}

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

.detail-neighbor a {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  padding: 16px;
  color: #fbd38d;
}

.empty-state {
  width: min(var(--max), calc(100% - 32px));
  margin: 24px auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.74);
  padding: 20px;
  text-align: center;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.78);
}

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

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

.footer-grid h2 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 12px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

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

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.48);
  border-top: 1px solid var(--border);
  padding: 18px 0 30px;
}

.from-red,
.from-orange,
.from-rose,
.from-pink,
.from-blue,
.from-amber,
.from-purple,
.from-green,
.from-cyan,
.from-lime,
.from-slate {
  background-color: #101827;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-slide,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero-carousel {
    min-height: 590px;
    margin-top: 18px;
  }

  .hero-slide {
    padding: 30px 22px 64px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

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

  .poster-card {
    min-height: 255px;
  }

  .card-content {
    padding: 13px;
  }

  .card-content h2 {
    font-size: 0.98rem;
  }

  .card-content p {
    font-size: 0.86rem;
  }

  .detail-cover {
    min-height: 360px;
  }

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

  .horizontal-row {
    grid-auto-columns: 196px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .category-panel-grid {
    grid-template-columns: 1fr;
  }

  .quick-search-panel,
  .glass-section {
    padding: 18px;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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