:root {
  color-scheme: light;
  --emerald: #059669;
  --emerald-2: #10b981;
  --teal: #0d9488;
  --slate: #0f172a;
  --slate-2: #1e293b;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  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;
  color: var(--slate);
  background:
    radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.13), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(135deg, #ecfdf5 0%, #eff6ff 45%, #faf5ff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

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

.desktop-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
}

.header-search,
.mobile-search,
.search-tools,
.filter-panel,
.hero-search-card form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.search-tools input,
.filter-panel input,
.hero-search-card input,
.search-tools select,
.filter-panel select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  outline: 0;
  padding: 11px 16px;
  min-width: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-tools input:focus,
.filter-panel input:focus,
.hero-search-card input:focus,
.search-tools select:focus,
.filter-panel select:focus {
  border-color: var(--emerald-2);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.header-search button,
.mobile-search button,
.search-tools button,
.hero-search-card button {
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  padding: 11px 18px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.24);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #f1f5f9;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #0f172a;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

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

.mobile-search {
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
}

.mobile-nav {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 38%, rgba(15, 23, 42, 0.25) 68%, rgba(2, 6, 23, 0.72) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 42%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 78px 24px 96px;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 380px;
  gap: 52px;
  align-items: center;
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--emerald-2);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-copy .lead {
  margin: 22px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.tag-row.large span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.32);
}

.btn.glass,
.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.btn.ghost {
  color: var(--slate);
  background: #fff;
  border-color: var(--line);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: 34px;
  line-height: 1;
}

.hero-arrow.prev {
  left: 24px;
}

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

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

.hero-dot {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

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

.hero-strip {
  max-width: 1280px;
  margin: -62px auto 0;
  position: relative;
  z-index: 8;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 0.95fr 1.35fr;
  gap: 22px;
}

.hero-search-card,
.soft-panel,
.rank-list-panel,
.story-card,
.text-page,
.search-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-search-card {
  padding: 26px;
}

.hero-search-card h2,
.section-head h2,
.story-card h2,
.rank-list-panel h2 {
  margin: 0;
  color: var(--slate);
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.hero-search-card p,
.section-head p,
.story-card p,
.text-page p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-search-card form {
  margin-top: 20px;
}

.hero-search-card input {
  flex: 1;
}

.quick-cats,
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-cats a,
.footer-tags a {
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

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

.content-section {
  max-width: 1280px;
  margin: 70px auto 0;
  padding: 0 24px;
}

.soft-panel,
.rank-list-panel,
.text-page,
.search-panel {
  padding: 34px;
}

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

.section-head p {
  margin: 8px 0 0;
  max-width: 720px;
}

.section-link {
  color: var(--emerald);
  font-weight: 900;
  white-space: nowrap;
}

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

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

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

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.36s ease;
}

.movie-card:hover .poster img {
  transform: scale(1.07);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 58%);
}

.quality-badge,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.quality-badge,
.rank-badge {
  left: 12px;
  top: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.rank-badge {
  min-width: 34px;
  text-align: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  color: #ecfdf5;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.meta-line span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.movie-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.compact .card-body {
  padding: 13px;
}

.movie-card.compact h3 {
  font-size: 15px;
}

.movie-card.compact p {
  font-size: 13px;
}

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

.category-tile,
.category-overview {
  display: block;
  min-height: 170px;
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  border: 1px solid rgba(16, 185, 129, 0.18);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.category-overview:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-overview strong {
  display: block;
  color: #047857;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-tile p,
.category-overview p {
  margin: 0;
  color: #64748b;
  line-height: 1.75;
}

.category-overview div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-overview div span {
  border-radius: 999px;
  background: #fff;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: #020617;
  color: #fff;
}

.small-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.32), transparent 28rem),
    linear-gradient(135deg, #0f172a, #1e293b 58%, #064e3b);
}

.page-hero > div {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 24px;
}

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

.crumbs a:hover {
  color: #6ee7b7;
}

.filter-panel,
.search-tools {
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.filter-panel input,
.search-tools input {
  flex: 1;
}

.detail-hero {
  min-height: 620px;
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.04);
}

.detail-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.92)),
    linear-gradient(0deg, #020617, transparent 45%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 82px 24px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

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

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

.player-section {
  max-width: 1120px;
  margin: -72px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.32);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.18));
}

.play-circle {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.34);
  font-size: 34px;
}

.play-overlay strong {
  max-width: 80%;
  font-size: clamp(20px, 3vw, 32px);
  text-align: center;
}

.player-wrap.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-error {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 4;
  color: #fff;
  text-align: center;
  font-weight: 800;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.story-card {
  padding: 28px;
}

.story-card p + p,
.text-page p + p {
  margin-top: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(200px, 0.65fr);
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.rank-row:hover {
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-row span {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: #64748b;
  font-style: normal;
  font-size: 14px;
  text-align: right;
}

.text-page {
  max-width: 960px;
}

.search-tools {
  flex-wrap: wrap;
}

.search-tools select {
  min-width: 160px;
}

.site-footer {
  margin-top: 78px;
  background: linear-gradient(135deg, #0f172a, #111827 62%, #064e3b);
  color: #fff;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.75fr 1fr 0.75fr;
  gap: 34px;
}

.footer-grid section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-grid h2 {
  margin: 0 0 8px;
  color: #6ee7b7;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
}

.footer-grid a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.62);
}

.footer-bottom button {
  color: #6ee7b7;
  background: transparent;
  font-weight: 900;
}

[hidden],
.movie-card.is-hidden {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-inner,
  .hero-strip,
  .detail-shell,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .nav-shell {
    padding: 12px 16px;
  }

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

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

  .hero-inner {
    padding: 74px 18px 88px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-strip,
  .content-section,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-strip {
    margin-top: -44px;
  }

  .hero-search-card form,
  .filter-panel,
  .search-tools,
  .section-head,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .rank-row em {
    grid-column: 2;
    text-align: left;
  }

  .detail-shell {
    padding: 58px 16px 96px;
  }

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

@media (max-width: 520px) {
  .mini-grid,
  .movie-grid,
  .ranking-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-search-card,
  .soft-panel,
  .rank-list-panel,
  .story-card,
  .text-page,
  .search-panel {
    padding: 22px;
  }
}
