:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #059669;
  --primary-dark: #047857;
  --primary-soft: #ecfdf5;
  --teal: #0f766e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.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.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
}

.nav-shell {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
  font-size: 16px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-text em {
  margin-top: 4px;
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 650;
}

.nav-link {
  position: relative;
  color: #334155;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -23px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--primary);
  transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #334155;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: var(--surface);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
}

.mobile-nav a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #064e3b 55%, #0f766e);
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 30%, rgba(16, 185, 129, 0.45), transparent 34%), linear-gradient(135deg, #0f172a, #064e3b);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  transform: scale(1.03);
}

.hero-media img.image-missing {
  opacity: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 46%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 78px;
}

.hero-content {
  width: min(760px, 100%);
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(110, 231, 183, 0.36);
  color: #d1fae5;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
}

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

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

.btn-primary,
.btn-ghost,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.32);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover,
.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.btn-light {
  background: #fff;
  color: var(--primary-dark);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.main-content {
  padding: 54px 0 76px;
}

.section {
  margin-bottom: 68px;
}

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

.section-kicker {
  display: inline-block;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.section h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.04em;
}

.section h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 800;
}

.section-more span {
  transition: transform 0.2s ease;
}

.section-more:hover span {
  transform: translateX(3px);
}

.search-panel,
.filter-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.search-input,
.filter-select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.search-input {
  flex: 1 1 320px;
}

.search-input:focus,
.filter-select:focus {
  border-color: rgba(5, 150, 105, 0.6);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(5, 150, 105, 0.22);
}

.poster-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 68% 24%, rgba(16, 185, 129, 0.35), transparent 34%), linear-gradient(135deg, #0f172a, #115e59);
}

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

.image-missing {
  opacity: 0;
}

.card-link:hover .poster-img,
.category-card:hover .poster-img,
.rank-link:hover .poster-img {
  transform: scale(1.08);
}

.duration-badge,
.play-badge,
.category-pill {
  position: absolute;
  z-index: 2;
}

.duration-badge {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.play-badge {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-dark);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.card-link:hover .play-badge,
.rank-link:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.card-link:hover h3,
.rank-link:hover h3 {
  color: var(--primary);
}

.movie-card-line {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.movie-meta,
.view-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.movie-meta {
  color: #64748b;
  font-size: 13px;
}

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

.tag-row {
  margin-top: 12px;
}

.tag-row strong {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.view-row {
  justify-content: space-between;
  margin-top: 12px;
  color: #94a3b8;
  font-size: 12px;
}

.category-strip {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  border: 1px solid rgba(16, 185, 129, 0.16);
}

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

.category-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.75);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-cover {
  aspect-ratio: 16 / 9;
}

.category-body {
  padding: 18px;
}

.category-body h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.category-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 56px 160px 1fr 28px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-link:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
}

.rank-poster {
  border-radius: 14px;
}

.rank-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-arrow {
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
}

.page-hero {
  padding: 64px 0;
  color: #fff;
  background: linear-gradient(135deg, #059669, #0f766e);
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.page-title p {
  max-width: 780px;
  margin: 14px 0 0;
  color: #e6fffa;
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-hero {
  padding: 48px 0;
  color: #fff;
  background: radial-gradient(circle at 72% 24%, rgba(16, 185, 129, 0.28), transparent 34%), linear-gradient(135deg, #0f172a, #064e3b);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
}

.detail-poster .poster-shell {
  aspect-ratio: 16 / 10;
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 58px);
  color: #fff;
}

.detail-title p {
  color: #dbeafe;
  line-height: 1.85;
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ecfdf5;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 750;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.content-card {
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.82);
  box-shadow: var(--shadow-soft);
  padding: 26px;
  margin-bottom: 24px;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.content-card p {
  margin: 0;
  color: #475569;
  line-height: 1.95;
  font-size: 16px;
}

.player-card {
  padding: 0;
  overflow: hidden;
}

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

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  z-index: 3;
}

.player-overlay span:first-child {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 26px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

.player-overlay span:last-child {
  font-size: 18px;
  font-weight: 850;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.video-shell.is-playing .player-overlay {
  display: none;
}

.player-message {
  min-height: 24px;
  padding: 12px 16px 16px;
  color: #ef4444;
  font-weight: 700;
}

.sidebar-card {
  position: sticky;
  top: 92px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.mini-card .poster-shell {
  border-radius: 12px;
}

.mini-card h3 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.35;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 0 0;
}

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

.footer-logo .brand-text strong {
  color: #fff;
}

.footer-logo .brand-text em {
  color: #94a3b8;
}

.footer-brand p {
  max-width: 540px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer a:not(.brand) {
  display: block;
  color: #cbd5e1;
  margin: 10px 0;
}

.site-footer a:hover {
  color: #34d399;
}

.footer-bottom {
  margin-top: 36px;
  padding: 22px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

  .menu-button {
    display: flex;
  }

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

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

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

  .sidebar-card {
    position: static;
  }
}

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

  .hero,
  .hero-inner {
    min-height: 600px;
  }

  .hero-inner {
    padding: 90px 0 70px;
  }

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

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

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

  .rank-arrow {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
