:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gold: #fbbf24;
  --red: #f43f5e;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.26), transparent 34rem),
    radial-gradient(circle at 92% 10%, rgba(34, 211, 238, 0.20), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  max-width: 1320px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.28);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.desktop-nav a,
.mobile-panel a {
  color: #dbeafe;
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--cyan);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 270px;
}

.nav-search input,
.big-search input,
.page-search input,
.page-search select,
.search-filter-form select {
  width: 100%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  padding: 11px 86px 11px 18px;
}

.nav-search button,
.big-search button,
.page-search button {
  border: 0;
  color: #020617;
  background: linear-gradient(135deg, #93c5fd, #22d3ee);
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.18);
}

.nav-search button {
  position: absolute;
  right: 4px;
  padding: 8px 14px;
}

.nav-search input:focus,
.big-search input:focus,
.page-search input:focus,
.page-search select:focus,
.search-filter-form select:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-panel {
  display: none;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.page-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.home-main {
  padding-top: 24px;
}

.inner-main,
.detail-main {
  padding-top: 38px;
}

.hero-slider {
  position: relative;
  min-height: min(760px, calc(100vh - 98px));
  overflow: hidden;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.04);
  opacity: 0.44;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 22%, rgba(34, 211, 238, 0.26), transparent 24rem),
    radial-gradient(circle at 12% 80%, rgba(59, 130, 246, 0.28), transparent 28rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 56px;
  align-items: center;
  padding: 76px clamp(28px, 6vw, 86px);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 26px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  font-size: 13px;
}

.hero-actions,
.detail-info .btn-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn-primary,
.btn-ghost,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #020617;
  background: linear-gradient(135deg, #93c5fd, #22d3ee);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.btn-ghost,
.section-more {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.44);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.58);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #020617;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.48);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
}

.hero-quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 22px 0 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(16px);
}

.big-search,
.page-search,
.search-filter-form {
  display: flex;
  gap: 12px;
}

.big-search input,
.page-search input,
.page-search select,
.search-filter-form select {
  min-height: 52px;
  padding: 0 18px;
}

.big-search button,
.page-search button {
  min-height: 52px;
  padding: 0 24px;
}

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

.quick-links a {
  padding: 12px 15px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

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

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

.movie-card {
  overflow: hidden;
  min-width: 0;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.84));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 28px 72px rgba(2, 6, 23, 0.36);
}

.movie-card-wide,
.movie-card-rank {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card-wide .poster-link img,
.movie-card-rank .poster-link img {
  height: 100%;
  min-height: 250px;
  aspect-ratio: auto;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.14);
}

.poster-play,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.poster-play {
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  color: #020617;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  color: #020617;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 12px 28px rgba(251, 191, 36, 0.24);
}

.card-body {
  padding: 18px;
}

.card-meta-row,
.card-stats,
.detail-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-category {
  color: #67e8f9;
  font-weight: 800;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 14px;
}

.tag-row {
  margin-top: 14px;
  gap: 8px;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12px;
}

.card-stats {
  margin-top: 16px;
}

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

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: #0f172a;
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.24);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-tile:hover img {
  opacity: 0.6;
  transform: scale(1.08);
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 22px;
  font-style: normal;
}

.category-tile em {
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.65;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.16), transparent 20rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(2, 6, 23, 0.92));
  box-shadow: var(--shadow);
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: end;
  padding: clamp(28px, 5vw, 54px);
}

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

.page-hero p {
  max-width: 840px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

.page-search {
  align-items: center;
  justify-content: flex-end;
}

.page-search input {
  min-width: 280px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(24px, 5vw, 56px);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.45);
}

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

.detail-info h1 {
  font-size: clamp(40px, 7vw, 76px);
}

.detail-one-line {
  max-width: 860px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

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

.detail-stats {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 15px;
}

.player-section {
  margin-top: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  border: 0;
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: #020617;
  background: linear-gradient(135deg, #ffffff, #67e8f9);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.36);
}

.player-overlay strong {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
}

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

.text-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.text-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.95;
  font-size: 16px;
}

.empty-state {
  display: none;
  padding: 42px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.64);
}

.empty-state.show {
  display: block;
}

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

.footer-grid {
  max-width: 1320px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-logo {
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  display: block;
  color: #94a3b8;
  line-height: 1.8;
  font-size: 14px;
}

.site-footer h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #64748b;
  font-size: 13px;
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-poster {
    max-width: 310px;
    transform: none;
  }

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

  .wide-grid,
  .rank-grid,
  .rank-list,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-quick-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-wrap,
  .page-main {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-slider {
    min-height: 680px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 44px 22px 74px;
    gap: 28px;
  }

  .hero-copy h1,
  .detail-info h1 {
    font-size: 42px;
  }

  .hero-control {
    display: none;
  }

  .big-search,
  .page-search,
  .search-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .wide-grid,
  .rank-grid,
  .rank-list,
  .category-grid,
  .large-category-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-wide,
  .movie-card-rank {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .movie-card-wide .poster-link img,
  .movie-card-rank .poster-link img {
    min-height: 100%;
  }

  .detail-hero,
  .page-hero {
    padding: 24px;
    border-radius: 24px;
  }

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

  .page-search input {
    min-width: 0;
  }
}
