
:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-dark: #0f172a;
  --surface-deep: #020617;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --radius: 22px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 45%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  color: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(16px);
}

.navbar {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fde68a, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.5);
  font-size: 15px;
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #cbd5e1;
  font-weight: 650;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(245, 158, 11, 0.18);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

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

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-image,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.36), transparent 28%), linear-gradient(135deg, #0f172a, #334155);
}

.hero-image.missing,
.detail-bg.missing,
.poster-img.missing,
.category-tile img.missing,
.category-panel img.missing,
.type-chip img.missing {
  opacity: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.56) 47%, rgba(15, 23, 42, 0.08)), linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 70vh;
  margin: 0 auto;
  padding: 0 24px 88px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 14px;
  font-weight: 750;
}

.hero-content h1,
.detail-info h1,
.page-hero h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.hero-content p {
  max-width: 720px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags .tag,
.detail-info .tag-row .tag {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

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

.primary-button,
.search-form button {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.3);
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-button.dark {
  color: #111827;
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.1);
}

.primary-button:hover,
.ghost-button:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
  width: 30px;
  background: #f59e0b;
}

.page-container,
.content-section {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.quick-search-section {
  margin-top: -38px;
  position: relative;
  z-index: 4;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input,
.select-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  background: #fff;
}

.search-form input:focus,
.select-row select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.select-row {
  display: flex;
  gap: 10px;
}

.select-row select {
  min-width: 150px;
}

.empty-state {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
}

.content-section {
  padding: 56px 0 0;
}

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

.section-heading p,
.page-hero p {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.8vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-more {
  color: #b45309;
  font-weight: 800;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: radial-gradient(circle at 32% 16%, rgba(245, 158, 11, 0.36), transparent 30%), linear-gradient(135deg, #111827, #334155);
}

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

.movie-card:hover .poster-img,
.category-tile:hover img,
.category-panel:hover img,
.type-chip:hover img {
  transform: scale(1.055);
}

.duration-pill,
.rank-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: white;
  background: rgba(2, 6, 23, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  top: 10px;
  bottom: auto;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.movie-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.movie-card h3 {
  margin: 0;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #334155);
  box-shadow: var(--shadow);
}

.category-tile img,
.category-panel img,
.type-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.category-tile span {
  position: absolute;
  left: 22px;
  bottom: 20px;
  color: white;
  font-size: 24px;
  font-weight: 900;
}

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

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

.movie-card.horizontal {
  min-height: 160px;
  flex-direction: row;
}

.movie-card.horizontal .poster-frame {
  width: 126px;
  flex: 0 0 126px;
  aspect-ratio: auto;
}

.movie-card.horizontal .movie-card-body {
  justify-content: center;
}

.page-hero {
  padding: 74px 0 34px;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.2), transparent 34%), linear-gradient(180deg, #ffffff, #f8fafc);
}

.page-hero.compact h1 {
  color: #0f172a;
  font-size: clamp(36px, 5vw, 62px);
}

.dark-hero {
  color: white;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.38), transparent 34%), linear-gradient(135deg, #020617, #1e293b);
}

.dark-hero h1,
.dark-hero .page-lead {
  color: white;
}

.page-lead {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px 0 0;
}

.pagination a {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: #334155;
  font-weight: 800;
}

.pagination a.active,
.pagination a:hover {
  color: #111827;
  border-color: var(--amber);
  background: #fef3c7;
}

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

.category-panel {
  min-height: 220px;
  position: relative;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 26px;
  color: white;
  background: linear-gradient(135deg, #0f172a, #334155);
  box-shadow: var(--shadow);
}

.category-panel:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.08));
}

.category-panel img {
  position: absolute;
  inset: 0;
}

.category-panel div {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.category-panel span {
  color: #fde68a;
  font-weight: 800;
}

.category-panel h2 {
  margin: 8px 0;
  font-size: 34px;
}

.category-panel p {
  margin: 0;
  color: #e2e8f0;
}

.type-chip-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.type-chip {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.type-chip:after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.type-chip span {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 14px;
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-cloud a {
  padding: 9px 13px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: #334155;
  font-weight: 700;
}

.detail-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  color: white;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.45)), linear-gradient(0deg, #0f172a, transparent 45%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  min-height: 660px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 58px 0;
}

.detail-poster {
  border-radius: 26px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
  color: white;
  font-size: clamp(38px, 5.8vw, 74px);
}

.detail-meta,
.detail-one-line {
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.75;
}

.detail-one-line {
  max-width: 780px;
  font-size: 20px;
}

.player-section,
.detail-text-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28), rgba(2, 6, 23, 0.54));
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.32);
}

.detail-text-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.76fr);
  gap: 18px;
}

.detail-text-grid article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.detail-text-grid h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-text-grid p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #020617, #0f172a 58%, #111827);
}

.footer-grid {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fbbf24;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  line-height: 1.75;
}

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  text-align: center;
}

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

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

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

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-control {
    display: none;
  }

  .hero-content {
    padding-bottom: 70px;
  }

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

  .search-form,
  .select-row {
    flex-direction: column;
  }

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

  .category-strip,
  .category-panels,
  .rank-list,
  .rank-list.wide,
  .detail-text-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

@media (max-width: 560px) {
  .navbar,
  .page-container,
  .content-section,
  .player-section,
  .detail-text-section,
  .footer-grid,
  .footer-bottom,
  .detail-layout {
    width: min(100% - 30px, 1280px);
    padding-left: 0;
    padding-right: 0;
  }

  .brand {
    font-size: 18px;
  }

  .hero,
  .hero-content {
    min-height: 66vh;
    height: 66vh;
  }

  .hero-content h1,
  .detail-info h1,
  .page-hero.compact h1 {
    font-size: 34px;
    line-height: 1.04;
  }

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

  .movie-card.horizontal {
    min-height: auto;
  }

  .movie-card.horizontal .poster-frame {
    width: 104px;
    flex-basis: 104px;
  }

  .movie-line {
    -webkit-line-clamp: 2;
  }
}
