:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.9);
  --line: rgba(245, 158, 11, 0.16);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius: 22px;
  --max: 1180px;
}

* {
  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;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 30rem),
    radial-gradient(circle at 80% 15%, rgba(59, 130, 246, 0.12), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b 46%, #fb923c);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
  font-size: 15px;
}

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

.nav-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(15, 23, 42, 0.72);
}

.nav-search input,
.hero-search input,
.search-page-form input,
.filter-row input,
.filter-row select {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  width: 190px;
  padding: 8px 8px 8px 12px;
}

.nav-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 8px 15px;
  color: #111827;
  background: var(--accent);
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover,
.search-page-form button:hover,
.primary-btn:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0f172a 4%, rgba(15, 23, 42, 0.86) 34%, rgba(15, 23, 42, 0.2) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.55) 38%, transparent 76%);
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 20px 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-pill,
.detail-kicker,
.section-kicker,
.page-hero span,
.featured-head span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

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

.primary-btn {
  color: #111827;
  background: var(--accent);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.24);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line);
  background: rgba(245, 158, 11, 0.12);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--text);
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(245, 158, 11, 0.22);
}

.hero-control.prev {
  left: 20px;
}

.hero-control.next {
  right: 20px;
}

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

.hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--accent);
}

.quick-search-panel,
.content-section,
.featured-band,
.page-shell,
.detail-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: center;
  margin-top: -52px;
  margin-bottom: 66px;
  position: relative;
  z-index: 8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding-top: 28px;
  padding-bottom: 28px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.quick-search-panel span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-search-panel h2,
.section-heading h2,
.featured-head h2,
.page-hero h1,
.player-info h1 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.quick-search-panel p,
.page-hero p,
.player-info p,
.detail-card p,
.category-tile p,
.movie-card p,
.site-footer p,
.search-summary {
  color: var(--muted);
  line-height: 1.72;
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.4);
}

.hero-search input,
.search-page-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
}

.content-section,
.featured-band {
  margin-bottom: 72px;
}

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

.section-heading h2 {
  margin-bottom: 0;
}

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

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

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

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

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.52);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(245, 158, 11, 0.16));
}

.movie-card img,
.mini-card img,
.category-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.45s ease, filter 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: #111827;
  background: var(--accent);
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.card-body {
  padding: 16px;
}

.card-meta,
.tag-row,
.detail-meta,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta {
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--dim);
  font-size: 13px;
}

.card-meta a {
  color: #fbbf24;
}

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.4em;
  margin: 0 0 13px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.tag-row span,
.detail-meta span,
.tag-cloud span {
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: var(--dim);
  background: rgba(15, 23, 42, 0.5);
  font-size: 12px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 320px;
}

.movie-card-wide .poster-link {
  aspect-ratio: auto;
  min-height: 320px;
}

.movie-card-wide h3 {
  font-size: 28px;
}

.movie-card-wide p {
  -webkit-line-clamp: 5;
  font-size: 16px;
}

.movie-card-compact .poster-link {
  aspect-ratio: 3 / 2;
}

.featured-band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding-top: 28px;
  padding-bottom: 28px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(249, 115, 22, 0.08), rgba(15, 23, 42, 0.65));
  box-shadow: var(--shadow);
}

.featured-head {
  margin-bottom: 24px;
}

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

.category-tile {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.48);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-posters {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  height: 124px;
  gap: 3px;
  background: rgba(2, 6, 23, 0.6);
}

.category-tile-body {
  padding: 16px;
}

.category-tile-body span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.category-tile-body strong {
  display: block;
  margin: 8px 0;
  font-size: 20px;
}

.page-shell,
.detail-shell {
  padding-top: 36px;
  padding-bottom: 70px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(30, 41, 59, 0.76)),
    radial-gradient(circle at 88% 18%, rgba(245, 158, 11, 0.2), transparent 22rem);
  box-shadow: var(--shadow);
}

.slim-hero {
  padding-top: 34px;
  padding-bottom: 34px;
}

.page-hero h1,
.page-hero p {
  max-width: 760px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 18px;
  color: var(--dim);
  font-size: 14px;
}

.crumbs a {
  color: #fbbf24;
}

.filter-panel,
.search-page-panel {
  margin-bottom: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.36);
}

.filter-row select option {
  color: #111827;
}

.detail-crumbs {
  margin-bottom: 22px;
}

.player-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 34px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 1;
  overflow: hidden;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}

.player-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 0, rgba(2, 6, 23, 0.42) 38%, rgba(2, 6, 23, 0.92) 100%),
    linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent 58%);
}

.play-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #111827;
  background: var(--accent);
  box-shadow: 0 0 0 18px rgba(245, 158, 11, 0.13), 0 20px 60px rgba(245, 158, 11, 0.3);
  transform: translate(-50%, -50%);
  font-size: 30px;
}

.player-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
  background: rgba(30, 41, 59, 0.5);
}

.detail-meta {
  margin-top: 18px;
}

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

.detail-main {
  display: grid;
  gap: 18px;
}

.detail-card,
.side-card {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 24px;
  background: rgba(30, 41, 59, 0.5);
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 15px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  font-size: 16px;
}

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 96px;
}

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

.side-list .movie-card {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
}

.side-list .poster-link {
  aspect-ratio: 1 / 1.05;
}

.side-list .card-body {
  padding: 12px;
}

.side-list .movie-card h3 {
  font-size: 15px;
}

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

.search-page-panel {
  display: grid;
  gap: 12px;
}

.search-page-form {
  max-width: 760px;
}

.mini-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.54);
}

.mini-card img {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}

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

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.footer-inner strong {
  font-size: 20px;
}

.footer-inner p {
  max-width: 700px;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-content: start;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .nav-wrap {
    flex-wrap: wrap;
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
    flex: 1;
  }

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

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

  .player-section,
  .detail-layout,
  .quick-search-panel {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    gap: 12px;
  }

  .brand {
    font-size: 17px;
  }

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

  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding-top: 8px;
  }

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

  .nav-links a {
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.5);
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    padding-top: 70px;
    padding-bottom: 86px;
  }

  .hero-control {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .hero-control.prev {
    left: 10px;
  }

  .hero-control.next {
    right: 10px;
  }

  .quick-search-panel {
    margin-top: -36px;
  }

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

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .movie-card-wide .poster-link {
    aspect-ratio: 16 / 10;
    min-height: auto;
  }

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

  .page-hero {
    padding: 28px 22px;
  }

  .player-info,
  .detail-card,
  .side-card {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .hot-grid,
  .latest-grid,
  .all-grid,
  .rank-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-search,
  .search-page-form {
    flex-direction: column;
  }

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

  .side-list .movie-card {
    grid-template-columns: 105px minmax(0, 1fr);
  }
}
