:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --teal: #0f766e;
  --cyan: #06b6d4;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

.nav-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  justify-content: flex-end;
}

.nav-link {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
}

.top-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 180px;
  padding: 10px 14px;
}

.top-search button,
.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  cursor: pointer;
}

.top-search input:focus,
.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(37, 99, 235, 0.8);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  padding: 78px 0 50px;
  background: radial-gradient(circle at 18% 15%, rgba(37, 99, 235, 0.18), transparent 30%), linear-gradient(135deg, #0f172a, #1e3a8a 48%, #0f766e);
  color: #ffffff;
}

.hero-bg-glow {
  position: absolute;
  inset: auto -10% -30% 40%;
  height: 420px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.23);
  filter: blur(72px);
}

.hero-wrap {
  position: relative;
}

.hero-slider {
  position: relative;
  min-height: 500px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 46px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero-media {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  min-height: 450px;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.65));
}

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

.hero-copy {
  max-width: 590px;
}

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.watch-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.watch-copy p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.hero-tags span,
.card-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 700;
}

.card-tags span {
  color: var(--blue);
  background: #eff6ff;
  border: 0;
}

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

.hero-actions.slim {
  margin-top: 20px;
}

.btn,
.text-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.btn {
  min-height: 48px;
  padding: 0 22px;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.11);
}

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

.hero-control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}

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

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

.hero-dot.active {
  width: 28px;
  opacity: 1;
  background: #ffffff;
}

.hero-quick {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-quick a {
  color: #ffffff;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--blue);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

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

.movie-card:hover .poster-link img,
.rank-item:hover img,
.category-tile:hover img {
  transform: scale(1.06);
}

.poster-badge,
.poster-score {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.poster-badge {
  left: 12px;
}

.poster-score {
  right: 12px;
  background: rgba(249, 115, 22, 0.9);
}

.card-body {
  padding: 16px;
}

.card-body h2,
.rank-content h2,
.detail-main h2,
.detail-side h2,
.category-card-large h2 {
  margin: 0;
  line-height: 1.25;
}

.card-body h2 {
  margin-top: 10px;
  font-size: 18px;
}

.card-body p,
.rank-content p,
.category-card-large p {
  color: var(--muted);
}

.card-meta,
.watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 24px;
  padding: 20px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.86));
}

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

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  display: block;
  margin-top: 72px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.rank-strip {
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 96px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--blue));
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  width: 96px;
  height: 118px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.page-hero,
.watch-section {
  color: #ffffff;
  background: radial-gradient(circle at 20% 18%, rgba(56, 189, 248, 0.18), transparent 30%), linear-gradient(135deg, #1e3a8a, #0f766e);
}

.page-hero {
  padding: 76px 0;
}

.page-hero .container {
  max-width: 980px;
}

.page-hero h1 {
  margin-bottom: 16px;
}

.hero-search {
  margin-top: 26px;
  max-width: 620px;
}

.hero-search input {
  flex: 1;
  padding: 14px 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.category-covers img {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.watch-section {
  padding: 32px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.player-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 30px;
  align-items: center;
}

.video-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.46);
}

.video-box video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.video-box video {
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(2, 6, 23, 0.64));
}

.player-cover img {
  object-fit: cover;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36);
  transform: translate(-50%, -50%);
  cursor: pointer;
  font-size: 28px;
}

.watch-copy h1 {
  margin-bottom: 14px;
}

.watch-meta {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
}

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

.detail-main,
.detail-side {
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

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

.detail-main p {
  color: #334155;
  font-size: 17px;
}

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

.info-list div {
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 4px 0 0;
  font-weight: 800;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  box-shadow: none;
  border: 1px solid var(--line);
}

.compact-card .poster-link {
  height: 124px;
}

.compact-card .card-body {
  padding: 10px 10px 10px 0;
}

.compact-card .card-tags,
.compact-card .poster-score {
  display: none;
}

.compact-card .card-body h2 {
  margin-top: 0;
  font-size: 16px;
}

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

.site-footer {
  margin-top: 30px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
}

.site-footer p {
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-menu {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
  }

  .nav-menu.open {
    display: flex;
  }

  .top-search {
    width: 100%;
  }

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

  .hero-slide,
  .player-panel,
  .detail-layout,
  .category-card-large,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 44px;
  }

  .hero-slider {
    min-height: auto;
  }

  .hero-media,
  .hero-media img {
    min-height: 340px;
  }

  .movie-grid,
  .category-grid,
  .category-list-grid,
  .rank-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .brand {
    font-size: 19px;
  }

  .hero-copy h1,
  .page-hero h1,
  .watch-copy h1 {
    font-size: 34px;
  }

  .hero-media,
  .hero-media img {
    min-height: 260px;
  }

  .movie-grid,
  .category-grid,
  .category-list-grid,
  .filter-panel,
  .rank-mini-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 80px 1fr;
    gap: 12px;
  }

  .rank-cover {
    width: 80px;
    height: 104px;
  }

  .hero-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .play-button {
    width: 68px;
    height: 68px;
  }
}
