:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-strong: #f1f5f9;
  --color-text: #111827;
  --color-muted: #64748b;
  --color-soft: #e2e8f0;
  --color-primary: #0d9488;
  --color-primary-dark: #0f766e;
  --color-primary-soft: #ccfbf1;
  --color-black: #020617;
  --shadow-card: 0 16px 35px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 24px 55px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 28px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, var(--max-width));
  min-height: 68px;
  margin: 0 auto;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--color-text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), #14b8a6);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.32);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.desktop-nav a,
.mobile-nav a {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--color-primary);
}

.dropdown {
  position: relative;
}

.dropdown-button {
  padding: 0;
  color: #334155;
  background: transparent;
  border: 0;
  font-weight: 650;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  padding: 10px;
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: var(--color-primary-soft);
}

.site-search {
  display: flex;
  align-items: center;
  min-width: 260px;
  border: 1px solid var(--color-soft);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.site-search input,
.local-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--color-text);
  background: transparent;
}

.site-search input {
  padding: 10px 12px 10px 14px;
}

.site-search button,
.local-search button {
  border: 0;
  color: #ffffff;
  background: var(--color-primary);
  font-weight: 700;
  transition: background 0.2s ease;
}

.site-search button {
  align-self: stretch;
  padding: 0 15px;
}

.site-search button:hover,
.local-search button:hover {
  background: var(--color-primary-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--color-text);
  background: #ffffff;
  border: 1px solid var(--color-soft);
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--max-width));
  padding: 0 0 18px;
  margin: 0 auto;
}

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

.mobile-nav a {
  padding: 10px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.hero {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(90deg, #020617, #111827);
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 78% 20%, rgba(20, 184, 166, 0.35), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100% - 32px, var(--max-width));
  min-height: 570px;
  margin: 0 auto;
  padding: 64px 0;
}

.hero-eyebrow,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  color: #ccfbf1;
  background: rgba(13, 148, 136, 0.22);
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.hero h1 {
  max-width: 720px;
  margin: 22px 0 16px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-summary {
  max-width: 660px;
  margin: 0 0 26px;
  color: #d1d5db;
  font-size: 18px;
}

.hero-meta,
.movie-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.movie-meta span,
.card-meta span {
  display: inline-flex;
  padding: 5px 10px;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.hero .hero-meta span {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-actions,
.section-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: 0 18px 38px rgba(13, 148, 136, 0.32);
}

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

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.btn-light:hover {
  color: #ffffff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - var(--max-width)) / 2));
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 12px;
}

.hero-control {
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.hero-control:hover {
  background: var(--color-primary);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - var(--max-width)) / 2));
  bottom: 50px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 30px;
  height: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.36);
  border: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  background: #5eead4;
}

.main {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.page-hero {
  position: relative;
  padding: 54px 0 18px;
  overflow: hidden;
}

.page-hero-card {
  padding: clamp(28px, 4vw, 48px);
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 10%, rgba(45, 212, 191, 0.35), transparent 32%),
    linear-gradient(135deg, #0f172a, #111827 55%, #134e4a);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.page-hero h1,
.detail-title {
  margin: 14px 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #d1d5db;
  font-size: 17px;
}

.section {
  margin-top: 54px;
}

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

.section-title {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-desc {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--color-muted);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 8px;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--color-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--color-primary-dark);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  padding: 4px 8px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 15%, rgba(94, 234, 212, 0.32), transparent 28%),
    linear-gradient(135deg, #111827, #0f766e);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.category-card p {
  margin: 0 0 22px;
  color: #d1d5db;
}

.category-card span {
  color: #99f6e4;
  font-weight: 800;
}

.feature-strip {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.feature-panel,
.dark-panel {
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.feature-panel {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
}

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

.feature-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 42px);
}

.feature-text h2,
.feature-text h3 {
  margin: 12px 0 14px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.feature-text p {
  margin: 0;
  color: #d1d5db;
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.rank-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 13px;
  align-items: center;
  padding: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: rgba(20, 184, 166, 0.16);
}

.rank-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: 12px;
  font-weight: 900;
}

.rank-title {
  display: block;
  color: #ffffff;
  font-weight: 800;
}

.rank-meta {
  display: block;
  color: #94a3b8;
  font-size: 13px;
}

.local-search {
  display: flex;
  width: min(100%, 620px);
  margin-top: 24px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.06);
}

.local-search input {
  padding: 14px 16px;
}

.local-search button {
  padding: 0 20px;
}

.no-results {
  display: none;
  padding: 28px;
  margin-top: 20px;
  color: var(--color-muted);
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--color-soft);
  border-radius: var(--radius-lg);
}

.no-results.is-visible {
  display: block;
}

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

.breadcrumbs a {
  color: #99f6e4;
}

.detail-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 8%, rgba(20, 184, 166, 0.34), transparent 28%),
    linear-gradient(135deg, #020617, #0f172a 58%, #134e4a);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  width: min(100% - 32px, var(--max-width));
  min-height: 500px;
  padding: 54px 0;
  margin: 0 auto;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

.detail-summary {
  max-width: 720px;
  margin: 0 0 22px;
  color: #d1d5db;
  font-size: 18px;
}

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

.content-card {
  padding: clamp(22px, 3vw, 34px);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.content-card p {
  margin: 0 0 22px;
  color: #334155;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  background: #020617;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, rgba(20, 184, 166, 0.24), rgba(2, 6, 23, 0.42) 52%, rgba(2, 6, 23, 0.76));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 26px;
  color: #ffffff;
  background: var(--color-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 20px 45px rgba(13, 148, 136, 0.4);
  font-size: 18px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-start:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px) scale(1.02);
}

.side-card {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.side-card h2,
.side-card h3 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

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

.related-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.related-item:hover {
  background: #f8fafc;
  border-color: rgba(20, 184, 166, 0.45);
}

.related-item img {
  width: 90px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
}

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-item span {
  display: block;
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 12px;
}

.site-footer {
  padding: 38px 0;
  color: #cbd5e1;
  background: #111827;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p,
.site-footer a {
  color: #94a3b8;
}

.site-footer a:hover {
  color: #5eead4;
}

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

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav,
  .nav-shell > .site-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-controls {
    right: 18px;
    bottom: 22px;
  }

  .hero-dots {
    left: 18px;
    bottom: 38px;
  }

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

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

  .detail-hero-inner {
    min-height: auto;
  }
}

@media (max-width: 540px) {
  .nav-shell,
  .main,
  .hero-content,
  .detail-hero-inner,
  .footer-shell,
  .mobile-nav {
    width: min(100% - 24px, var(--max-width));
  }

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

  .hero h1,
  .detail-title,
  .page-hero h1 {
    font-size: 34px;
  }

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

  .poster {
    aspect-ratio: 16 / 9;
  }

  .local-search {
    flex-direction: column;
  }

  .local-search button {
    min-height: 44px;
  }

  .related-item {
    grid-template-columns: 82px 1fr;
  }
}
