:root {
  --color-emerald-900: #064e3b;
  --color-emerald-800: #065f46;
  --color-emerald-700: #047857;
  --color-emerald-600: #059669;
  --color-emerald-500: #10b981;
  --color-teal-700: #0f766e;
  --color-cyan-800: #155e75;
  --color-gray-950: #030712;
  --color-gray-900: #111827;
  --color-gray-800: #1f2937;
  --color-gray-700: #374151;
  --color-gray-600: #4b5563;
  --color-gray-500: #6b7280;
  --color-gray-300: #d1d5db;
  --color-gray-200: #e5e7eb;
  --color-gray-100: #f3f4f6;
  --color-gray-50: #f9fafb;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 35px rgba(15, 23, 42, 0.10);
  --radius-large: 28px;
  --radius-card: 18px;
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  color: var(--color-gray-900);
  background: linear-gradient(180deg, #f9fafb 0%, #eef2f7 100%);
  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,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.shell,
.nav-container,
.footer-grid,
.footer-bottom {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-emerald-800), var(--color-teal-700), var(--color-cyan-800));
  box-shadow: 0 10px 30px rgba(6, 95, 70, 0.24);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  transition: transform 0.25s ease;
}

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

.brand-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 24px;
  line-height: 1.1;
}

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

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #d1fae5;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 999px;
}

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

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

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

.mobile-link:hover,
.mobile-link.is-active {
  background: rgba(255, 255, 255, 0.14);
}

.hero-section {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: var(--color-gray-950);
}

.hero-media,
.hero-media .hero-image,
.hero-media .hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.hero-overlay {
  background:
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.25), transparent 35%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: relative;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 42px;
}

.hero-copy {
  max-width: 760px;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
}

.hero-badge {
  padding: 6px 16px;
  margin-bottom: 18px;
  color: #ffffff;
  border-radius: 999px;
  background: var(--color-emerald-500);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 850;
}

.hero-copy p,
.detail-copy p {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(18px, 2.2vw, 24px);
}

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

.hero-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.movie-meta span {
  color: var(--color-gray-600);
  background: var(--color-gray-100);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

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

.primary-button {
  color: #ffffff;
  background: var(--color-emerald-500);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.35);
}

.primary-button:hover {
  background: var(--color-emerald-600);
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-large);
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

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

.hero-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-panel span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: var(--color-emerald-500);
  font-weight: 800;
}

.stats-section {
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}

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

.stat-card {
  padding: 28px;
  text-align: center;
  border-radius: var(--radius-card);
}

.stat-card strong {
  display: block;
  color: var(--color-emerald-600);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--color-gray-600);
}

.stat-emerald {
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
}

.stat-blue {
  background: linear-gradient(135deg, #eff6ff, #cffafe);
}

.stat-amber {
  background: linear-gradient(135deg, #fffbeb, #fed7aa);
}

.stat-rose {
  background: linear-gradient(135deg, #fff1f2, #fce7f3);
}

.search-band,
.content-section {
  padding: 58px 0;
}

.search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 32px;
  align-items: center;
  padding: 34px;
  color: #ffffff;
  border-radius: var(--radius-large);
  background: linear-gradient(90deg, var(--color-emerald-700), var(--color-teal-700));
  box-shadow: var(--shadow-soft);
}

.search-card h2,
.section-heading h2,
.ranking-panel h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.15;
  font-weight: 850;
}

.search-card p,
.section-heading p,
.ranking-panel p {
  margin: 10px 0 0;
  color: var(--color-gray-600);
}

.search-card p {
  color: #d1fae5;
}

.search-controls,
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.search-controls input,
.search-controls select,
.filter-toolbar input,
.filter-toolbar select {
  min-height: 46px;
  padding: 0 15px;
  color: var(--color-gray-900);
  border: 1px solid var(--color-gray-200);
  border-radius: 14px;
  background: #ffffff;
  outline: none;
}

.search-controls input,
.filter-toolbar input {
  flex: 1 1 230px;
}

.search-controls select,
.filter-toolbar select {
  flex: 0 1 160px;
}

.filter-toolbar {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
}

.result-count {
  margin: 0 0 18px;
  color: var(--color-gray-600);
  font-weight: 700;
}

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

.eyebrow {
  margin-bottom: 8px;
  color: var(--color-emerald-600);
}

.section-link {
  color: var(--color-emerald-700);
  background: #ecfdf5;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

.movie-grid--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 55px rgba(15, 23, 42, 0.18);
}

.poster-frame,
.category-cover,
.ranking-cover,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(5, 150, 105, 0.88), rgba(21, 94, 117, 0.86)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 30%);
}

.poster-frame {
  aspect-ratio: 3 / 4;
}

.cover-image,
.category-image,
.ranking-image,
.detail-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.image-missing {
  opacity: 0;
}

.movie-card:hover .cover-image {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  inset: auto 12px 12px auto;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: var(--color-emerald-500);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

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

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

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.movie-tags span,
.detail-genres span,
.tag-links a {
  display: inline-flex;
  padding: 4px 9px;
  color: var(--color-emerald-700);
  border-radius: 999px;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
}

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

.ranking-panel,
.detail-side,
.detail-article,
.player-card {
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-large);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.ranking-panel {
  position: sticky;
  top: 100px;
  height: fit-content;
  padding: 24px;
}

.ranking-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--color-gray-50);
  transition: background 0.2s ease;
}

.ranking-row:hover {
  background: #ecfdf5;
}

.ranking-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: var(--color-emerald-500);
  font-weight: 900;
}

.ranking-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

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

.page-hero {
  padding: 88px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 25%, rgba(34, 211, 238, 0.2), transparent 32%),
    linear-gradient(90deg, var(--color-emerald-800), var(--color-teal-700), var(--color-cyan-800));
}

.page-hero--compact {
  padding: 68px 0;
}

.page-hero p {
  max-width: 840px;
  margin: 16px 0 0;
  color: #d1fae5;
  font-size: 19px;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-large);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.category-cover {
  aspect-ratio: 16 / 9;
}

.category-cover span,
.ranking-cover span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  font-weight: 900;
}

.category-card div:last-child {
  padding: 20px;
}

.category-card h2 {
  margin: 0;
  font-size: 22px;
}

.category-card p {
  margin: 9px 0 0;
  color: var(--color-gray-600);
}

.genre-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.genre-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--color-emerald-700);
  background: #ffffff;
  border: 1px solid var(--color-gray-200);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  font-weight: 800;
}

.genre-cloud span {
  display: inline-grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: var(--color-emerald-500);
  font-size: 12px;
}

.ranking-cards {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 14px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-card);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.ranking-cover {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.ranking-info h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.ranking-info p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--color-gray-600);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--color-gray-950);
}

.detail-bg,
.detail-bg-overlay,
.detail-bg-image {
  position: absolute;
  inset: 0;
}

.detail-bg-image {
  opacity: 0.45;
  filter: blur(2px);
}

.detail-bg-overlay {
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.72)),
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.28), transparent 35%);
}

.detail-shell {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 560px;
  padding: 64px 0;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-large);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.detail-genres,
.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000000;
}

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

.player-start {
  position: absolute;
  inset: 50% auto auto 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.34);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.player-start.is-hidden {
  display: none;
}

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

.detail-article {
  padding: 28px;
}

.detail-article h2 {
  margin-top: 26px;
  font-size: 26px;
}

.detail-article h2:first-child {
  margin-top: 0;
}

.detail-article p {
  margin: 12px 0 0;
  color: var(--color-gray-700);
  font-size: 17px;
}

.detail-side {
  height: fit-content;
  padding: 24px;
}

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: var(--color-gray-500);
  font-size: 13px;
  font-weight: 800;
}

.detail-side dd {
  margin: -6px 0 0;
  color: var(--color-gray-900);
  font-weight: 750;
}

.search-page {
  min-height: 620px;
}

.site-footer {
  color: #d1d5db;
  background: var(--color-gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0 34px;
}

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

.footer-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--color-emerald-500);
}

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

.site-footer p {
  color: #9ca3af;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
  margin: 0;
}

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

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

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

  .desktop-nav {
    gap: 16px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .search-card,
  .split-layout,
  .detail-layout,
  .detail-shell,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

  .stats-grid,
  .category-grid,
  .movie-grid--six,
  .movie-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-shell {
    min-height: auto;
  }

  .detail-poster {
    width: min(280px, 80vw);
  }
}

@media (max-width: 620px) {
  .brand-copy strong {
    font-size: 19px;
  }

  .brand-copy small {
    display: none;
  }

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

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

  .stats-grid,
  .movie-grid--six,
  .movie-grid--four,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
  }
}
