:root {
  --emerald: #10b981;
  --emerald-dark: #059669;
  --cyan: #06b6d4;
  --yellow: #fde68a;
  --pink: #f9a8d4;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f3f4f6;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.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);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand,
.footer-brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-text,
.footer-brand span:last-child,
.mobile-brand {
  font-size: 24px;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--emerald-dark), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.25);
}

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

.nav-link {
  color: #374151;
  font-weight: 650;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald-dark);
  border-color: var(--emerald);
}

.header-search,
.mobile-search,
.page-search,
.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.page-search input,
.search-panel input,
.local-search {
  width: 260px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.search-panel input:focus,
.local-search:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.header-search button,
.mobile-search button,
.page-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--emerald-dark);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: #374151;
  transition: transform 0.2s ease;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: 18px 24px 24px;
}

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

.mobile-menu nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  color: #374151;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--emerald-dark);
  background: #ecfdf5;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #020617;
}

.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;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) brightness(0.44) saturate(1.05);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.48), transparent 34%), linear-gradient(125deg, rgba(6, 182, 212, 0.68), rgba(2, 6, 23, 0.92) 58%, rgba(15, 23, 42, 0.98));
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: 48px;
  align-items: center;
  min-height: 650px;
  padding: 80px 0;
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 24px 0 14px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy h1 span,
.hero-copy h2 span {
  color: transparent;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-title {
  margin: 0 0 10px;
  color: #cffafe;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.hero-tags span,
.tag-cloud span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #065f46;
  background: #d1fae5;
  font-size: 14px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--emerald-dark);
  background: var(--white);
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.22);
}

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

.ghost-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.ghost-btn.dark {
  color: var(--emerald-dark);
  border-color: rgba(5, 150, 105, 0.18);
  background: #ecfdf5;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

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

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

.hero-mini-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-mini {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-mini img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-mini span {
  display: block;
  overflow: hidden;
  padding: 9px 10px 11px;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  background: var(--white);
}

.stats-strip {
  background: var(--white);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 0;
}

.stats-grid a {
  display: grid;
  gap: 4px;
  border-radius: 18px;
  padding: 18px;
  background: #f8fafc;
  transition: transform 0.2s ease, background 0.2s ease;
}

.stats-grid a:hover {
  background: #ecfdf5;
  transform: translateY(-2px);
}

.stats-grid strong {
  color: #0f172a;
  font-size: 18px;
}

.stats-grid span {
  color: var(--muted);
  font-size: 14px;
}

.content-section {
  padding: 54px 0;
}

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

.section-head h2,
.story-card h2,
.inline-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

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

.section-more {
  flex: none;
  color: var(--emerald-dark);
  font-weight: 800;
}

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

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

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

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 38px rgba(15, 23, 42, 0.14);
}

.movie-card figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

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

.movie-card figcaption,
.card-type {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(10px);
}

.movie-card figcaption {
  left: 10px;
  top: 10px;
}

.card-type {
  right: 10px;
  bottom: 10px;
}

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 15px;
}

.movie-card h3 {
  overflow: hidden;
  margin: 0;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #64748b;
  font-size: 12px;
}

.movie-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1f5f9;
}

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

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: var(--white);
  background: #0f172a;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) saturate(1.05);
  transition: transform 0.25s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.74), rgba(8, 47, 73, 0.72));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span {
  width: fit-content;
  height: fit-content;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.category-tile strong {
  align-self: end;
  font-size: 24px;
}

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

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

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

.rank-row a {
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row a:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.13);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 900;
}

.rank-row img {
  width: 72px;
  height: 98px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row h3 {
  overflow: hidden;
  margin: 0 0 6px;
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 9px;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  padding: 70px 0;
}

.soft-hero {
  background: radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.22), transparent 28%), linear-gradient(135deg, var(--emerald), var(--cyan));
}

.rank-hero {
  background: linear-gradient(135deg, #0f172a, #065f46 55%, #0891b2);
}

.search-hero {
  background: linear-gradient(135deg, #0369a1, var(--emerald));
}

.page-hero p {
  margin: 0 0 12px;
  font-weight: 800;
  opacity: 0.9;
}

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

.page-hero span {
  display: block;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.page-search,
.search-panel {
  margin-top: 26px;
}

.search-panel input {
  width: min(640px, 100%);
  padding: 16px 22px;
  font-size: 18px;
}

.section-toolbar {
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #374151;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.local-search {
  width: min(420px, 100%);
}

.detail-top {
  color: var(--white);
  background: radial-gradient(circle at 12% 20%, rgba(16, 185, 129, 0.42), transparent 28%), linear-gradient(145deg, #020617, #064e3b 64%, #0e7490);
  padding: 28px 0 54px;
}

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

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

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

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

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

.detail-kicker {
  margin: 0 0 10px;
  color: #a7f3d0;
  font-weight: 800;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.player-section {
  padding: 46px 0;
  background: #0f172a;
}

.player-shell {
  border-radius: 28px;
  padding: 22px;
  background: #111827;
  box-shadow: var(--shadow);
}

.inline-head {
  color: var(--white);
  margin-bottom: 18px;
}

.inline-head h2 {
  color: var(--white);
}

.inline-head p {
  color: rgba(255, 255, 255, 0.72);
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.watch-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

.play-layer.is-hidden {
  display: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  padding-left: 4px;
  color: var(--emerald-dark);
  background: var(--white);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
  font-size: 32px;
}

.play-layer strong {
  font-size: 20px;
}

.detail-content {
  background: #f8fafc;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 22px;
}

.story-card {
  border-radius: 24px;
  padding: 28px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.story-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.review-card {
  background: linear-gradient(160deg, #ecfdf5, #eff6ff);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 30px;
}

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 18px;
}

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

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  margin-top: 28px;
  padding-top: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.is-hidden-card {
  display: none !important;
}

@media (max-width: 1100px) {
  .movie-grid,
  .all-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .header-search {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-bar {
    min-height: 64px;
  }

  .hero-carousel,
  .hero-layout {
    min-height: auto;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 58px 0 86px;
  }

  .hero-panel {
    grid-template-columns: minmax(170px, 0.8fr);
    justify-content: center;
  }

  .hero-mini-list {
    display: none;
  }

  .stats-grid,
  .rank-preview,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 280px;
  }

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

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

  .brand-text,
  .footer-brand span:last-child,
  .mobile-brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 40px;
  }

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

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

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

  .rank-number {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

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

  .rank-row h3 {
    font-size: 16px;
  }

  .rank-row p {
    font-size: 13px;
  }

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

  .player-shell {
    border-radius: 20px;
    padding: 12px;
  }

  .watch-player {
    border-radius: 16px;
  }

  .play-circle {
    width: 62px;
    height: 62px;
    font-size: 26px;
  }

  .story-card {
    padding: 20px;
  }
}
