:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4fb;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #020617;
  --dark-2: #0f172a;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 48%, #f8fafc 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #020617 0%, #0f172a 55%, #020617 100%);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #03111f;
  font-size: 15px;
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.34);
}

.brand-text {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #67e8f9, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #67e8f9;
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.header-search input,
.mobile-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: #fff;
  padding: 10px 14px;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #cbd5e1;
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #fff;
  padding: 10px 15px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.85);
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #fff;
}

.mobile-panel {
  display: none;
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: #0f172a;
}

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

.mobile-search {
  width: 100%;
  margin-bottom: 16px;
}

.mobile-search input {
  width: 100%;
}

.mobile-link {
  display: block;
  padding: 12px 0;
}

.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.hero {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 560px;
  overflow: hidden;
  border-radius: 0 0 34px 34px;
  color: #fff;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 560px;
}

.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 {
  position: absolute;
  inset: 0;
  display: block;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.74) 38%, rgba(15, 23, 42, 0.24) 72%, rgba(2, 6, 23, 0.52) 100%);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0));
}

.hero-panel {
  position: relative;
  z-index: 2;
  width: min(660px, 92%);
  padding: 108px 0 80px 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(37, 99, 235, 0.95));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 18px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-weight: 600;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.36);
}

.btn.secondary {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(226, 232, 240, 0.22);
  box-shadow: none;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.26);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(6, 182, 212, 0.8);
}

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

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

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 56px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: #67e8f9;
}

.section {
  margin-top: 42px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-lead {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.text-link {
  color: #0891b2;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  min-height: 142px;
  background: linear-gradient(135deg, #0f172a, #1e40af);
  box-shadow: var(--shadow);
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #111827, #7c3aed);
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -50px;
  bottom: -60px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

.category-tile p {
  margin: 0;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.08);
  opacity: 0.88;
}

.play-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(10px);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.card-title:hover {
  color: #0891b2;
}

.card-meta {
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

.card-desc {
  min-height: 48px;
  margin: 0 0 12px;
  color: #334155;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0369a1;
  font-size: 12px;
  font-weight: 700;
  background: #e0f2fe;
}

.index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.filter-panel,
.detail-panel,
.category-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.rank-panel h2,
.filter-panel h2,
.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.rank-list {
  display: grid;
  gap: 9px;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  background: #0f172a;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.rank-score {
  color: #ea580c;
  font-weight: 900;
  text-align: right;
}

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

.latest-item {
  display: flex;
  gap: 13px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.latest-item img {
  width: 120px;
  height: 76px;
  flex: 0 0 120px;
  object-fit: cover;
  border-radius: 12px;
}

.latest-item h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.latest-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.page-hero {
  border-radius: 26px;
  padding: 38px;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.28), transparent 32%), linear-gradient(135deg, #020617 0%, #0f172a 54%, #1e3a8a 100%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #dbeafe;
  line-height: 1.8;
}

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

.category-card {
  padding: 24px;
}

.category-card h2 {
  margin: 0 0 10px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.sample-links a {
  padding: 7px 11px;
  border-radius: 999px;
  color: #0369a1;
  font-size: 13px;
  font-weight: 700;
  background: #e0f2fe;
}

.filter-panel {
  margin: 28px 0;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 14px;
}

.filter-panel input,
.filter-panel select,
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #fff;
  padding: 13px 15px;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.54));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.38);
}

.detail-panel {
  padding: 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #0891b2;
  font-weight: 700;
}

.detail-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #075985;
  font-weight: 750;
  background: #e0f2fe;
}

.score-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
}

.score-box strong {
  color: #ea580c;
  font-size: 36px;
}

.score-box span {
  color: var(--muted);
}

.content-card {
  margin-top: 26px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.9;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 28px 0;
}

.search-box button {
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.empty-state {
  display: none;
  padding: 40px;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: var(--surface);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 8px 0 0;
  max-width: 680px;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  gap: 18px;
  white-space: nowrap;
}

.footer-links a:hover {
  color: #67e8f9;
}

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

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

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

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

  .rank-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

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

  .main-wrap {
    padding: 22px 16px 42px;
  }

  .hero,
  .hero-track {
    min-height: 560px;
    border-radius: 0 0 24px 24px;
  }

  .hero-panel {
    width: auto;
    padding: 80px 24px 86px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-control {
    top: auto;
    bottom: 28px;
  }

  .hero-control.prev {
    left: auto;
    right: 78px;
  }

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

  .hero-dots {
    left: 24px;
    bottom: 42px;
  }

  .section-head,
  .footer-inner {
    display: block;
  }

  .movie-grid,
  .category-strip,
  .category-overview,
  .latest-list {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .search-box {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .content-card,
  .detail-panel {
    padding: 22px;
  }

  .latest-item img {
    width: 104px;
    height: 70px;
    flex-basis: 104px;
  }

  .footer-links {
    margin-top: 18px;
  }
}
