:root {
  color-scheme: light;
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --teal-700: #0f766e;
  --cyan-800: #155e75;
  --cyan-700: #0e7490;
  --orange-500: #f97316;
  --red-500: #ef4444;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-soft: 0 20px 50px rgba(15, 23, 42, 0.14);
  --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-900);
  background: #f8fafc;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--emerald-800), var(--teal-700), var(--cyan-800));
  box-shadow: 0 16px 40px rgba(2, 44, 34, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

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

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease;
}

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

.brand-title {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  color: #d1fae5;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: #a7f3d0;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
  background: rgba(255, 255, 255, 0.18);
}

.hero-shell {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 18% 22%, rgba(16, 185, 129, 0.42), transparent 32%),
    linear-gradient(135deg, #022c22 0%, #064e3b 42%, #155e75 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.25;
  filter: blur(2px) saturate(1.08);
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(2, 44, 34, 0.96), rgba(6, 78, 59, 0.8) 45%, rgba(8, 145, 178, 0.54));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 48px;
  padding: 96px 0 112px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  color: #d1fae5;
  font-size: 14px;
  font-weight: 700;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 760px;
  margin: 0 0 24px;
  color: #dffcf2;
  font-size: clamp(17px, 2.3vw, 22px);
}

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

.hero-meta span,
.detail-meta span,
.movie-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn-primary {
  color: var(--emerald-800);
  background: var(--white);
  box-shadow: 0 12px 26px rgba(255, 255, 255, 0.18);
}

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

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.btn-gradient {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--cyan-700));
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.22);
}

.hero-poster {
  position: relative;
  isolation: isolate;
  display: block;
  border-radius: 30px;
  transform: rotate(2deg);
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.hero-poster::before {
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: -1;
  content: "";
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.45), rgba(6, 182, 212, 0.4));
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

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

.hero-nav button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.hero-arrow {
  width: 40px;
  height: 40px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  opacity: 0.55;
}

.hero-dot.is-active {
  width: 32px;
  opacity: 1;
  background: var(--white);
}

.quick-search {
  position: relative;
  z-index: 5;
  margin-top: -42px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-form input,
.search-form select,
.search-toolbar input,
.search-toolbar select {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.search-form select:focus,
.search-toolbar input:focus,
.search-toolbar select:focus {
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.section {
  padding: 76px 0;
}

.section-tight {
  padding: 52px 0;
}

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

.section-kicker {
  color: var(--emerald-600);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin: 4px 0 0;
  color: var(--gray-900);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.category-band {
  color: var(--white);
  background: linear-gradient(110deg, var(--emerald-900), var(--teal-700), var(--cyan-800));
}

.category-band .section-title,
.category-band .section-desc {
  color: var(--white);
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  padding: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: transform 0.22s ease, background 0.22s ease;
}

.category-tile::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 35%);
  transition: opacity 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.18);
}

.category-tile:hover::before {
  opacity: 1;
}

.category-tile strong,
.category-tile span,
.category-tile p {
  position: relative;
}

.category-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 24px;
}

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

.category-tile p {
  margin: 8px 0 10px;
  color: #d1fae5;
  font-size: 14px;
}

.category-tile span {
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #064e3b, #155e75);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 2.85;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--emerald-700);
}

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

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

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 108px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  font-size: 18px;
  font-weight: 900;
}

.rank-card img {
  width: 108px;
  aspect-ratio: 2 / 2.7;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #064e3b, #155e75);
}

.rank-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

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

.rank-score {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: #ecfdf5;
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  padding: 80px 0 70px;
  color: var(--white);
  background: radial-gradient(circle at 28% 26%, rgba(16, 185, 129, 0.32), transparent 35%),
    linear-gradient(120deg, var(--emerald-900), var(--teal-700), var(--cyan-800));
}

.page-hero h1 {
  max-width: 920px;
  margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

.search-toolbar {
  display: grid;
  grid-template-columns: 1fr 220px 170px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

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

.player-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 12% 20%, rgba(16, 185, 129, 0.34), transparent 34%),
    linear-gradient(135deg, #020617, #064e3b 48%, #155e75);
}

.player-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.1), rgba(3, 7, 18, 0.36));
}

.player-content {
  position: relative;
  padding: 38px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #bbf7d0;
  font-size: 14px;
  font-weight: 800;
}

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

.detail-title {
  max-width: 960px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-lead {
  max-width: 920px;
  margin: 0 0 26px;
  color: #dffcf2;
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.46));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-cover span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26), 0 20px 50px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  font-size: 42px;
}

.side-panel {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
}

.side-panel img {
  width: 100%;
  aspect-ratio: 2 / 2.75;
  object-fit: cover;
  background: linear-gradient(135deg, #064e3b, #155e75);
}

.side-panel-body {
  padding: 18px;
}

.side-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.15);
  color: #ecfeff;
}

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

.story-block,
.info-card {
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.story-block {
  padding: 28px;
}

.story-block + .story-block {
  margin-top: 20px;
}

.story-block h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-block p,
.info-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 16px;
}

.info-card {
  padding: 24px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  color: var(--gray-700);
}

.info-list dt {
  color: var(--gray-500);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
}

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

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

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 17px;
}

.footer-grid p {
  margin: 0;
  color: #9ca3af;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 24px;
  background: var(--white);
  text-align: center;
  color: var(--gray-600);
}

.empty-state.is-visible {
  display: block;
}

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

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

  .side-panel {
    display: grid;
    grid-template-columns: 220px 1fr;
  }
}

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

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

  .mobile-nav.is-open {
    display: block;
  }

  .hero-shell {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 70px 0 108px;
  }

  .hero-poster {
    width: min(320px, 82vw);
    margin: 0 auto;
  }

  .search-form,
  .search-toolbar {
    grid-template-columns: 1fr;
  }

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

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

  .rank-card {
    grid-template-columns: 54px 92px 1fr;
  }

  .rank-score {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-title {
    font-size: 19px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .hero-shell {
    min-height: 720px;
  }

  .hero-title {
    font-size: 38px;
  }

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

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

  .rank-card {
    grid-template-columns: 48px 86px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
  }

  .rank-card img {
    width: 86px;
  }

  .side-panel {
    grid-template-columns: 1fr;
  }

  .story-block,
  .info-card {
    padding: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
