* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(30, 41, 59, 0.82);
  --panel-solid: #1e293b;
  --panel-soft: rgba(51, 65, 85, 0.65);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --accent: #3b82f6;
  --accent-2: #67e8f9;
  --accent-3: #60a5fa;
  --danger: #ef4444;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.20), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.28);
}

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

.site-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

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

.quick-search input {
  width: 210px;
  border: 0;
  outline: none;
  color: #fff;
  background: transparent;
  padding: 8px 10px;
}

.quick-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: var(--accent);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
}

.hero-copy h1 {
  margin: 16px 0 18px;
  max-width: 760px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

.btn-ghost {
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  font-size: 32px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.hero-dot.active {
  width: 30px;
  background: #fff;
}

.stats-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -44px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stats-strip div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(14px);
}

.stats-strip strong {
  display: block;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.stats-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 14px;
}

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

.panel-section {
  width: min(1180px, calc(100% - 32px));
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(30, 41, 59, 0.54);
  box-shadow: var(--shadow);
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.72);
  transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

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

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 38px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.28);
}

.card-content {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: rgba(148, 163, 184, 0.65);
}

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

.card-content h3 a:hover {
  color: var(--accent-2);
}

.card-content p {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-entry {
  padding-top: 56px;
}

.search-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(30, 64, 175, 0.34));
}

.search-card h2 {
  margin: 8px 0 0;
  font-size: 28px;
}

.large-search {
  display: flex;
  gap: 12px;
}

.large-search input {
  flex: 1;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  color: #fff;
  background: rgba(15, 23, 42, 0.64);
}

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

.category-tile,
.category-card-large {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.7);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.22);
}

.category-tile {
  padding: 22px;
}

.category-tile-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.category-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 22px;
  font-weight: 800;
}

.category-tile h3,
.category-card-large h2 {
  margin: 0 0 8px;
}

.category-tile p,
.category-card-large p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.mini-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
}

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

.mini-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 8px 8px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-link {
  display: inline-flex;
  color: var(--accent-2);
  font-weight: 700;
}

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

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 24px;
}

.compact-hero {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero h1 {
  margin: 12px 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06;
}

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

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

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

.category-list-large {
  display: grid;
  gap: 24px;
}

.category-card-large {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 24px;
  padding: 26px;
}

.category-card-copy h2 {
  margin-top: 8px;
  font-size: 30px;
}

.category-card-copy .btn {
  margin-top: 22px;
}

.category-preview-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.category-preview-row a {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.category-preview-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-preview-row span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 8px 8px;
  overflow: hidden;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.filter-panel h2 {
  margin: 0 0 18px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 14px;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13px;
}

.filter-controls input,
.filter-controls select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  padding: 0 12px;
}

.filter-empty {
  margin: 16px 0 0;
  color: var(--muted);
}

.movie-hero-detail {
  position: relative;
  padding: 56px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.22), transparent 36rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.68), rgba(15, 23, 42, 0));
}

.movie-hero-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

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

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

.detail-copy h1 {
  margin: 14px 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 860px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.detail-meta a {
  color: var(--accent-2);
}

.player-section {
  padding: 44px 0 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.68));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
  font-size: 30px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding-top: 30px;
}

.detail-article,
.detail-side {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.66);
}

.detail-article {
  padding: 30px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.95;
}

.genre-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-line span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
}

.detail-side {
  align-self: start;
  padding: 24px;
  position: sticky;
  top: 96px;
}

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 13px;
}

.detail-side dt:first-child {
  margin-top: 0;
}

.detail-side dd {
  margin: 6px 0 0;
  color: #fff;
  line-height: 1.65;
}

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

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

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

.footer-logo {
  margin-bottom: 14px;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

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

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

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .quick-search {
    display: none;
  }

  .site-nav {
    justify-content: end;
  }

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

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

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

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

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero {
    height: auto;
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 80px 0 110px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    transform: none;
  }

  .hero-arrow {
    display: none;
  }

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

  .search-card,
  .category-card-large,
  .movie-hero-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .large-search {
    flex-direction: column;
  }

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 560px) {
  .container,
  .page-hero,
  .stats-strip,
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-copy h1,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .stats-strip,
  .cards-grid,
  .featured-grid,
  .category-grid,
  .filter-controls {
    grid-template-columns: 1fr;
  }

  .panel-section {
    padding: 24px;
  }

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

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