:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #10b981;
  --accent-deep: #059669;
  --accent-soft: #ecfdf5;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  line-height: 1.65;
}

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: #ffffff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.header-inner {
  width: min(100% - 32px, var(--max));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #052e24;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.35);
  font-weight: 900;
}

.logo-title {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-subtitle {
  display: block;
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
}

.main-nav a {
  padding: 9px 0;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #34d399;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

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

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 0 0 16px;
  color: #e2e8f0;
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.page-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 35%, rgba(16, 185, 129, 0.28), transparent 30%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.76) 50%, rgba(15, 23, 42, 0.58) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max));
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: center;
  gap: 36px;
  padding: 72px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  color: #052e24;
  background: #34d399;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.32);
}

.btn-primary:hover {
  background: var(--accent-deep);
}

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

.hero-panel {
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

.hero-panel h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.hero-list {
  display: grid;
  gap: 12px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-mini:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.14);
}

.hero-mini img {
  width: 84px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini strong {
  display: block;
  color: #ffffff;
  line-height: 1.25;
}

.hero-mini span {
  display: block;
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #34d399;
}

.search-band {
  position: relative;
  z-index: 5;
  width: min(100% - 32px, var(--max));
  margin: -34px auto 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

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

.search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.section {
  padding: 72px 0 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 28px;
}

.section-title h2,
.section-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
}

.view-more {
  color: var(--accent-deep);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.16);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #cbd5e1;
}

.movie-card.poster .movie-cover {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.06);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.62) 100%);
  opacity: 0.75;
}

.quality-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: #f97316;
}

.play-mark {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  padding: 16px;
}

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

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.7;
}

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

.meta-row span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 9px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.tag-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

.tag-row span {
  color: #047857;
  background: #ecfdf5;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 22px;
  color: #ffffff;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.22);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 18%, rgba(52, 211, 153, 0.34), transparent 38%);
}

.category-card > * {
  position: relative;
  z-index: 2;
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #dbeafe;
  font-size: 14px;
}

.category-card span {
  display: inline-flex;
  margin-top: 20px;
  color: #a7f3d0;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: 0 15px 34px rgba(15, 23, 42, 0.12);
}

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

.rank-row img {
  width: 112px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rank-link {
  color: var(--accent-deep);
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(120deg, #0f172a, #1e293b);
}

.page-hero .page-shell {
  padding: 58px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 26px 0 0;
  color: #64748b;
  font-size: 14px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 170px 150px 160px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.empty-state {
  display: none;
  padding: 60px 24px;
  color: #64748b;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
  background: #ffffff;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.38;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 25%, rgba(16, 185, 129, 0.24), transparent 34%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 52px 0 64px;
}

.poster-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-copy p {
  max-width: 800px;
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 18px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 76px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #020617;
  cursor: pointer;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
}

.player-dark {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), rgba(2, 6, 23, 0.72));
}

.player-button {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.42);
  font-size: 34px;
  line-height: 1;
}

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

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 36px;
}

.story-card {
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: var(--muted-strong);
}

.site-footer {
  margin-top: 76px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 42px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  font-size: 14px;
}

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

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

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 58px 0 84px;
  }

  .hero-panel {
    display: none;
  }

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

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

  .detail-layout,
  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .poster-card {
    max-width: 360px;
  }

  .rank-row {
    grid-template-columns: 48px 92px minmax(0, 1fr);
  }

  .rank-link {
    display: none;
  }
}

@media (max-width: 620px) {
  .header-inner {
    width: min(100% - 22px, var(--max));
  }

  .logo-subtitle {
    display: none;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    min-height: 78vh;
    width: min(100% - 26px, var(--max));
  }

  .hero-actions,
  .search-form,
  .section-title {
    display: grid;
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.large,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 42px 82px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-row img {
    width: 82px;
  }

  .player-button {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
