:root {
  --emerald: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --rose: #e11d48;
  --yellow: #facc15;
  --slate: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --card: #ffffff;
  --soft: #f8fafc;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 52%, #ecfeff 100%);
}

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

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

img.image-missing {
  opacity: 0;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--emerald), var(--teal), var(--cyan));
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.25);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: #d1fae5;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #ffffff;
  font-weight: 700;
}

.nav-link,
.nav-dropdown > button {
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  padding: 10px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown > button:hover {
  color: #d1fae5;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  width: 190px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #334155;
  font-weight: 650;
}

.dropdown-panel a:hover {
  background: #ecfdf5;
  color: var(--emerald);
}

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

.nav-search input,
.mobile-search input {
  width: 260px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.nav-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--emerald);
  font-weight: 800;
  background: #ffffff;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  background: rgba(4, 120, 87, 0.92);
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  padding: 14px 0;
}

.mobile-panel a {
  color: #ffffff;
  font-weight: 700;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  width: auto;
}

.hero-slider {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 max(24px, calc((100vw - 1280px) / 2 + 24px));
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(16, 185, 129, 0.22), transparent 35%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 58%);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 760px;
  color: #ffffff;
}

.eyebrow,
.page-hero span,
.section-title span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.eyebrow {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.14);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.28);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.75;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span {
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-tags span:first-child {
  background: var(--emerald);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, #10b981, #14b8a6);
  box-shadow: 0 16px 34px rgba(20, 184, 166, 0.28);
}

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

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.ghost-dark-btn {
  color: #0f766e;
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.18);
}

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

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.72;
}

.hero-dot.active {
  width: 32px;
  opacity: 1;
  background: #10b981;
}

.quick-panel {
  max-width: 1180px;
  margin: -48px auto 42px;
  padding: 0 24px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.quick-search-card,
.quick-links {
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.quick-search-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--emerald);
  font-size: 15px;
  font-weight: 900;
}

.quick-search-card form {
  display: flex;
  gap: 12px;
}

.quick-search-card input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 14px 18px;
  color: #0f172a;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px var(--line);
}

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

.quick-search-card button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-links a {
  border-radius: 16px;
  padding: 14px;
  color: #0f766e;
  font-weight: 900;
  text-align: center;
  background: #ecfdf5;
}

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

.slim-wrap {
  padding-top: 38px;
  padding-bottom: 0;
}

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

.section-title span,
.page-hero span {
  color: var(--emerald);
  background: #d1fae5;
}

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

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

.inline-title {
  display: block;
}

.inline-title h2 {
  margin-top: 12px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 20%, rgba(16, 185, 129, 0.55), transparent 32%),
    linear-gradient(135deg, #0f172a, #0f766e);
}

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

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

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

.poster-type,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.poster-type {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
}

.poster-year {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.35);
}

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

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

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  background: #ecfdf5;
}

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

.category-card,
.category-overview-card {
  border-radius: 24px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.category-preview img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.category-preview.large img {
  aspect-ratio: 4 / 3;
}

.category-card strong,
.category-overview-card h2 {
  margin: 0 0 9px;
  display: block;
  font-size: 20px;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.ranking-panel,
.content-card {
  border-radius: 24px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
}

.panel-title {
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 950;
}

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

.horizontal-list.small {
  margin-top: 18px;
}

.horizontal-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 8px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.horizontal-item:hover {
  background: #ecfdf5;
  transform: translateX(3px);
}

.horizontal-item img {
  width: 74px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

.horizontal-item span {
  min-width: 0;
}

.horizontal-item strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-item small {
  display: block;
  margin-top: 5px;
  color: #64748b;
}

.mini-rank {
  display: inline-flex;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: var(--rose);
}

.page-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  padding: 76px max(24px, calc((100vw - 1280px) / 2 + 24px));
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 18%, rgba(45, 212, 191, 0.45), transparent 35%),
    linear-gradient(135deg, #064e3b, #0f766e 48%, #0e7490);
}

.compact-hero {
  min-height: 300px;
}

.ranking-hero {
  background:
    radial-gradient(circle at 78% 20%, rgba(244, 63, 94, 0.42), transparent 34%),
    linear-gradient(135deg, #0f172a, #0f766e 54%, #be123c);
}

.page-hero h1 {
  max-width: 860px;
  margin: 16px 0;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 180px;
  gap: 14px;
}

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

.ranking-long-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0f172a, #0f766e);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--emerald);
  font-weight: 850;
}

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

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #475569;
  font-size: 19px;
  line-height: 1.85;
}

.detail-tags span {
  color: #0f766e;
  background: #d1fae5;
}

.player-section {
  padding-top: 28px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

.video-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-symbol {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 36px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  box-shadow: 0 18px 42px rgba(20, 184, 166, 0.35);
}

.video-overlay strong {
  font-size: 22px;
}

.detail-content {
  display: grid;
  gap: 22px;
}

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

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

.site-footer {
  margin-top: 68px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1f2937 52%, #111827);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 22px;
}

.footer-brand span {
  color: #34d399;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  text-align: center;
  color: #94a3b8;
}

[hidden] {
  display: none !important;
}

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

  .mobile-toggle {
    display: block;
  }

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

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

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

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

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

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

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

  .brand-text small {
    display: none;
  }

  .hero-slider {
    height: 640px;
  }

  .hero-slide {
    align-items: flex-end;
    padding: 0 18px 96px;
  }

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

  .hero-content p {
    font-size: 16px;
  }

  .quick-panel {
    grid-template-columns: 1fr;
    margin-top: -32px;
    padding: 0 16px;
  }

  .quick-search-card form,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .quick-links {
    grid-template-columns: 1fr 1fr;
  }

  .section-wrap {
    padding: 38px 16px;
  }

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

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .full-grid,
  .top-three,
  .ranking-long-list {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    padding: 56px 18px;
  }

  .detail-hero {
    padding: 36px 16px 18px;
    gap: 24px;
  }

  .detail-poster {
    max-width: none;
  }

  .detail-actions,
  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .ghost-dark-btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 36px 16px;
  }
}
