:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --bg-soft: #1c1917;
  --panel: rgba(28, 25, 23, 0.86);
  --panel-strong: rgba(41, 37, 36, 0.94);
  --line: rgba(245, 158, 11, 0.18);
  --text: #fafaf9;
  --muted: #a8a29e;
  --subtle: #78716c;
  --brand: #f59e0b;
  --brand-2: #fbbf24;
  --brand-3: #92400e;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 36rem),
    radial-gradient(circle at 80% 10%, rgba(120, 53, 15, 0.28), transparent 32rem),
    linear-gradient(135deg, #0c0a09 0%, #1c1917 48%, #0c0a09 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(12, 10, 9, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: #1c1917;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 1.05rem;
  color: #fffbeb;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.14);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(245, 158, 11, 0.08);
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(245, 158, 11, 0.13);
}

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

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 30%, rgba(245, 158, 11, 0.34), transparent 28rem),
    linear-gradient(135deg, #1c1917, #0c0a09);
}

.hero-bg img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.04);
}

.hero-bg img.is-missing,
.detail-backdrop img.is-missing,
.poster-frame img.is-missing,
.hero-poster img.is-missing,
.detail-poster img.is-missing {
  display: none;
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.76) 46%, rgba(12, 10, 9, 0.28) 100%),
    linear-gradient(0deg, #0c0a09 0%, transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.55fr);
  align-items: center;
  gap: 56px;
  min-height: 680px;
  padding: 80px 0 112px;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(2.3rem, 5vw, 5.2rem);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero-desc,
.detail-one-line,
.page-hero p {
  max-width: 760px;
  color: #d6d3d1;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

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

.hero-tags span,
.hero-tags a,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.85rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

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

.btn-primary {
  color: #1c1917;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.25);
}

.btn-ghost {
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.hero-poster,
.detail-poster {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(120, 53, 15, 0.12)),
    #1c1917;
  box-shadow: var(--shadow);
}

.hero-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.04);
}

.hero-controls {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: #fef3c7;
  background: rgba(28, 25, 23, 0.72);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.7rem;
  line-height: 1;
}

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

.hero-dot {
  width: 30px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.62;
}

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

.quick-search-panel {
  margin-top: -38px;
  position: relative;
  z-index: 8;
}

.search-strip,
.filter-panel,
.detail-panel,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.search-strip label,
.filter-row span {
  color: #fef3c7;
  font-weight: 800;
}

.search-inline,
.filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 16px;
  color: var(--text);
  background: rgba(12, 10, 9, 0.62);
  outline: none;
  padding: 0 14px;
}

input:focus,
select:focus {
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.11);
}

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

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

.section-heading h2 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

.section-more {
  color: #fbbf24;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(28, 25, 23, 0.82);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(120, 53, 15, 0.16)),
    #292524;
}

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

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

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.play-pill {
  right: 12px;
  bottom: 12px;
  padding: 0 12px;
  color: #1c1917;
  background: var(--brand-2);
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 0 10px;
  color: #fff7ed;
  background: rgba(127, 29, 29, 0.78);
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--brand-2);
  font-size: 0.8rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 8px 0 8px;
  color: #fff7ed;
  font-size: 1.06rem;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  margin: 0 0 14px;
  min-height: 3.2em;
  overflow: hidden;
  color: #c7c2bd;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.93rem;
}

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

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

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

.category-card {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 20px;
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(28, 25, 23, 0.88)),
    rgba(28, 25, 23, 0.9);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-name {
  color: #fff7ed;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-desc {
  color: #c7c2bd;
}

.category-count {
  align-self: end;
  color: var(--brand-2);
  font-weight: 800;
}

.page-main {
  padding-bottom: 80px;
}

.page-hero {
  position: relative;
  margin-top: 34px;
  padding: 54px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(28, 25, 23, 0.94), rgba(12, 10, 9, 0.84));
  box-shadow: var(--shadow);
}

.small-hero h1,
.rank-hero h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.filter-panel {
  margin-top: 26px;
  padding: 20px;
}

.filter-row {
  grid-template-columns: 1fr 220px 220px;
}

.filter-row label {
  display: grid;
  gap: 8px;
}

.filter-count {
  margin-top: 12px;
  color: var(--muted);
}

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

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.rank-table th,
.rank-table td {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
  text-align: left;
}

.rank-table th {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.08);
}

.rank-table a {
  color: #fff7ed;
  font-weight: 800;
}

.table-rank {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #1c1917;
  background: var(--brand-2);
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
  padding: 0;
}

.detail-main {
  padding-bottom: 80px;
}

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

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

.detail-poster {
  min-height: 480px;
}

.player-section {
  margin-top: -54px;
  position: relative;
  z-index: 5;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff7ed;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.15), transparent 34%),
    rgba(0, 0, 0, 0.56);
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-icon {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  color: #1c1917;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  font-size: 2rem;
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.32);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  padding-top: 36px;
}

.detail-panel {
  padding: 26px;
}

.detail-panel h2 {
  margin: 0 0 14px;
  color: #fff7ed;
}

.detail-panel p {
  margin: 0;
  color: #d6d3d1;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  margin: 0;
}

.info-panel dt {
  color: var(--subtle);
}

.info-panel dd {
  margin: 0;
  color: #fef3c7;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(12, 10, 9, 0.74);
}

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

.footer-brand,
.site-footer h3 {
  color: #fff7ed;
  font-weight: 900;
}

.site-footer p,
.site-footer li,
.copyright {
  color: var(--muted);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

.copyright {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(245, 158, 11, 0.1);
  font-size: 0.92rem;
}

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

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

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

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

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

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

  .nav-links {
    position: absolute;
    top: 72px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(12, 10, 9, 0.96);
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding: 54px 0 120px;
  }

  .hero-poster,
  .detail-poster {
    min-height: 320px;
  }

  .search-inline,
  .filter-row {
    grid-template-columns: 1fr;
  }

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

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

  .section-heading,
  .copyright {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero {
    padding: 30px;
  }

  .detail-hero-inner {
    padding: 36px 0 96px;
  }
}

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

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