:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #e5e7eb;
  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-soft: #ecfdf5;
  --teal: #0d9488;
  --cyan: #0891b2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  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,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-shell {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.28);
}

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

.logo-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

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

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

.nav-link {
  padding: 9px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--emerald);
  background: var(--emerald-soft);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
  border-radius: 999px;
}

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

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

.mobile-link {
  padding: 12px 14px;
}

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

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 420px;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.44), transparent 42%), radial-gradient(circle at 80% 10%, rgba(8, 145, 178, 0.35), transparent 46%);
  pointer-events: none;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  min-height: 72vh;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-bg.poster-empty {
  background: linear-gradient(135deg, #064e3b, #0f172a 58%, #164e63);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.34)), linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.15) 46%, rgba(15, 23, 42, 0.20));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 96px 22px 88px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 430px;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #d1fae5;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(167, 243, 208, 0.32);
  border-radius: 999px;
  background: rgba(6, 95, 70, 0.38);
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.hero-desc {
  max-width: 680px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta {
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: var(--emerald-soft);
}

.hero-meta span {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 11px;
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

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

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

.btn-secondary {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: var(--emerald-dark);
  background: #ffffff;
}

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

.hero-panel {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, #064e3b, #0f172a);
}

.hero-panel.poster-empty {
  min-height: 560px;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.82), rgba(15, 23, 42, 0.90));
}

.hero-panel-info {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(14px);
}

.hero-panel-info strong {
  display: block;
  margin-bottom: 4px;
  font-size: 20px;
}

.hero-panel-info small {
  color: #cbd5e1;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  color: #ffffff;
  font-size: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 22px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-heading p,
.page-hero p,
.detail-title p,
.category-card p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #065f46, #0f172a 65%, #164e63);
}

.movie-card-compact .poster-frame {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.68));
  opacity: 0.82;
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.36);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

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

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

.tag-row,
.detail-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.tag-row span,
.detail-tags span,
.filter-chip {
  padding: 5px 9px;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.filter-panel,
.detail-card,
.category-card,
.text-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ranking-panel {
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f0fdfa, #ecfdf5);
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 20px;
}

.ranking-list {
  display: grid;
}

.ranking-item {
  display: grid;
  grid-template-columns: 42px 56px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s ease;
}

.ranking-item:hover {
  background: #f8fafc;
}

.ranking-no {
  color: var(--emerald);
  font-weight: 900;
}

.ranking-cover {
  width: 56px;
  height: 70px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, #065f46, #0f172a);
}

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

.ranking-text {
  min-width: 0;
}

.ranking-text strong,
.ranking-text small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-text small {
  margin-top: 4px;
  color: var(--muted);
}

.ranking-arrow {
  color: var(--muted);
  font-size: 24px;
}

.category-strip,
.category-grid {
  display: grid;
  gap: 18px;
}

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

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

.category-card {
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.category-card strong {
  display: block;
  font-size: 21px;
}

.category-card span {
  display: inline-flex;
  margin-top: 22px;
  color: var(--emerald);
  font-weight: 900;
}

.page-hero {
  padding: 58px 22px 42px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff 48%, #f0fdfa);
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

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

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

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.search-input,
.select-input {
  width: 100%;
  height: 48px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  outline: 0;
}

.search-input {
  padding: 0 16px;
}

.select-input {
  padding: 0 12px;
}

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

.empty-state {
  display: none;
  margin: 24px 0;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
}

.detail-hero {
  background: linear-gradient(135deg, #0f172a, #064e3b 58%, #0e7490);
  color: #ffffff;
}

.detail-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 22px 40px;
}

.detail-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: end;
}

.detail-title p {
  color: #d1fae5;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: linear-gradient(135deg, #065f46, #0f172a);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.player-section {
  max-width: 1280px;
  margin: -18px auto 0;
  padding: 0 22px;
}

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

.video-stage {
  position: relative;
  background: radial-gradient(circle at center, #064e3b, #020617 72%);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.play-ring {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  font-size: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 20px 50px rgba(5, 150, 105, 0.46);
  transition: transform 0.22s ease;
}

.player-overlay:hover .play-ring {
  transform: scale(1.06);
}

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

.detail-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 22px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.text-panel,
.detail-card {
  padding: 24px;
}

.text-panel + .text-panel {
  margin-top: 20px;
}

.text-panel h2,
.detail-card h2,
.detail-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #334155;
  font-size: 16px;
}

.detail-meta-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.detail-meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.detail-meta-list span {
  color: var(--muted);
}

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

.related-mini a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-mini img {
  width: 58px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #065f46, #0f172a);
}

.related-mini strong,
.related-mini small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-mini small {
  color: var(--muted);
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  max-width: 460px;
  margin: 14px 0 0;
}

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

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .hero-content,
  .feature-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 460px;
  }

  .ranking-panel {
    position: static;
  }

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

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

  .nav-toggle {
    display: block;
  }

  .nav-shell {
    height: 64px;
  }

  .logo-text strong {
    font-size: 17px;
  }

  .hero-content {
    min-height: auto;
    padding: 72px 18px 110px;
  }

  .hero-slider,
  .hero-bg img {
    min-height: 690px;
  }

  .hero-panel {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }

  .section,
  .page-hero-inner,
  .detail-hero-inner,
  .player-section,
  .detail-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-heading {
    display: block;
  }

  .movie-grid,
  .category-strip,
  .category-grid,
  .footer-inner,
  .detail-title {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster img {
    height: 340px;
  }
}

@media (max-width: 480px) {
  .movie-grid {
    gap: 16px;
  }

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

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

  .btn-primary,
  .btn-secondary,
  .btn-light {
    width: 100%;
  }
}
