:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #f97316;
  --brand-2: #ec4899;
  --brand-3: #facc15;
  --dark: #0f172a;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.35);
}

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  color: #4b5563;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: rgba(249, 115, 22, 0.1);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-button {
  border: 0;
  background: transparent;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 10px;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #4b5563;
}

.dropdown-panel a:hover {
  color: var(--brand);
  background: rgba(249, 115, 22, 0.08);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.1);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: white;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 8px;
  color: #4b5563;
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 16% 12%, rgba(249, 115, 22, 0.22), transparent 34%), radial-gradient(circle at 84% 18%, rgba(236, 72, 153, 0.22), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b 52%, #111827);
  color: white;
}

.hero-shell {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  padding: 70px 0;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 44px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.45s ease both;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.gradient-text {
  background: linear-gradient(135deg, #fb923c, #f472b6, #fde047);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.34);
}

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

.button-primary:hover,
.button-secondary:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-search {
  display: flex;
  width: min(560px, 100%);
  margin-top: 30px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 0 16px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.hero-search button {
  border: 0;
  padding: 0 18px;
  min-height: 42px;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.hero-poster {
  position: relative;
  min-height: 440px;
}

.hero-poster img {
  height: 520px;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
}

.hero-poster:before,
.hero-poster:after {
  content: "";
  position: absolute;
  border-radius: 34px;
  inset: 18px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.75), rgba(236, 72, 153, 0.6));
  z-index: -1;
  transform: rotate(-6deg);
}

.hero-poster:after {
  inset: 44px -18px -20px 34px;
  filter: blur(38px);
  opacity: 0.55;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

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

.hero-dot.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.section {
  padding: 72px 0;
}

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

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

.section-heading h2,
.page-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
  font-weight: 950;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: white;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc, #e5e7eb);
}

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

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

.poster-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
}

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

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2,
.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #ea580c;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  overflow: hidden;
  border-radius: 24px;
  color: white;
  background: linear-gradient(135deg, #fb923c, #ec4899);
  box-shadow: 0 16px 42px rgba(236, 72, 153, 0.18);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.category-card:before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  top: -44px;
  right: -36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card strong {
  position: relative;
  font-size: 22px;
  font-weight: 950;
}

.category-card span {
  position: relative;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.page-hero {
  color: white;
  background: radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.32), transparent 28%), linear-gradient(135deg, #111827, #1f2937);
}

.page-hero-inner {
  padding: 70px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.68);
}

.breadcrumb a {
  color: #fed7aa;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 16px;
  margin-bottom: 28px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  color: var(--ink);
  background: #f9fafb;
}

.filter-panel button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: white;
  font-weight: 850;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

.rank-item img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.rank-item h2,
.rank-item h3 {
  margin: 4px 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.rank-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.rank-score {
  color: var(--brand);
  font-weight: 950;
}

.detail-main {
  padding: 46px 0 80px;
}

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

.player-card,
.detail-card,
.side-card {
  border-radius: 28px;
  background: white;
  box-shadow: 0 12px 42px rgba(15, 23, 42, 0.08);
}

.player-card {
  overflow: hidden;
}

.video-stage {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: rgba(2, 6, 23, 0.46);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 45px rgba(236, 72, 153, 0.35);
  font-size: 28px;
  transform: translateX(2px);
}

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

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-title {
  padding: 34px 0 26px;
}

.detail-title h1 {
  color: white;
}

.detail-title p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 750;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.detail-card p {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.9;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.compact-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: #fff7ed;
  transform: translateX(2px);
}

.compact-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
}

.compact-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-style: normal;
}

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

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

.empty-state.show {
  display: block;
}

.site-footer {
  color: white;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

.footer-grid h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 900;
}

.footer-grid p,
.footer-links a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

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

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding: 20px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero-shell {
    min-height: auto;
    padding: 46px 0;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: auto;
  }

  .hero-poster img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-block;
    margin-top: 12px;
  }

  .movie-grid,
  .rank-list,
  .search-results,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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