:root {
  --amber: #d97706;
  --amber-light: #fbbf24;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --purple: #7c3aed;
  --red: #dc2626;
  --dark: #111827;
  --slate: #334155;
  --muted: #64748b;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--dark);
  background: linear-gradient(180deg, #f9fafb 0%, #eff6ff 48%, #fff7ed 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 {
  display: block;
  width: 100%;
}

button, input, select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.95), rgba(239, 246, 255, 0.95), rgba(255, 251, 235, 0.95));
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  max-width: 1280px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--blue));
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 700;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover, .nav-link.is-active {
  color: var(--amber);
}

.nav-link:hover::after, .nav-link.is-active::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.header-search input {
  width: 180px;
  border: 0;
  outline: 0;
  padding: 8px 10px 8px 14px;
  background: transparent;
}

.header-search button, .button-primary, .button-ghost {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search button, .button-primary {
  color: white;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.button-ghost {
  color: var(--dark);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.64);
}

.header-search button:hover, .button-primary:hover, .button-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.25);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  background: rgba(251, 191, 36, 0.18);
  color: var(--dark);
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.hero-section {
  position: relative;
  margin-bottom: 64px;
}

.hero-stage {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.46) 48%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  right: clamp(24px, 10vw, 120px);
  bottom: clamp(30px, 8vw, 76px);
  z-index: 2;
  color: #fff;
  max-width: 860px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: white;
  background: rgba(245, 158, 11, 0.92);
  font-weight: 800;
}

.hero-content h1, .hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(16px, 2.2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  color: #e5e7eb;
  font-weight: 700;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.44);
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

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

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

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: white;
}

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

.section-heading h1, .section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

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

.section-heading a {
  color: var(--amber);
  font-weight: 800;
}

.content-section {
  margin-bottom: 64px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

.card-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover img, .category-card:hover img, .horizontal-card:hover img, .related-card:hover img {
  transform: scale(1.09);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.02));
  opacity: 0.62;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(245, 158, 11, 0.9);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark, .related-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge, .rank-mini {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--amber));
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta, .stat-row, .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.card-body h2, .horizontal-info h2, .related-card h2 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.card-body p, .horizontal-info p {
  margin: 0 0 14px;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.stat-row {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  overflow: hidden;
  border-radius: 20px;
  background: white;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.horizontal-cover {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  background: #111827;
}

.horizontal-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.horizontal-info {
  padding: 18px 20px 18px 0;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: 26px;
  background: linear-gradient(135deg, #fffbeb, #eff6ff, #faf5ff);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transition: transform 0.55s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95), rgba(239, 246, 255, 0.82), rgba(17, 24, 39, 0.2));
}

.category-card-content {
  position: relative;
  z-index: 2;
  padding: 28px;
}

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

.category-card p {
  max-width: 560px;
  margin: 0 0 20px;
  color: #475569;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.category-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #1e40af;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input, .filter-panel select {
  width: 100%;
  border: 1px solid #fde68a;
  border-radius: 14px;
  outline: 0;
  padding: 12px 14px;
  color: var(--dark);
  background: white;
}

.filter-panel input:focus, .filter-panel select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.28);
}

.empty-state {
  padding: 36px;
  margin: 24px 0;
  text-align: center;
  border-radius: 22px;
  color: var(--muted);
  background: white;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 22px;
  color: var(--muted);
  font-weight: 700;
}

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

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

.player-panel, .detail-info, .side-panel, .article-panel {
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
  margin-bottom: 28px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.66));
}

.player-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: 34px;
  background: linear-gradient(135deg, var(--amber), var(--blue));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.34);
  transition: transform 0.25s ease;
}

.player-overlay:hover span {
  transform: scale(1.08);
}

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

.detail-info {
  padding: 28px;
  margin-bottom: 28px;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.12;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-weight: 800;
}

.detail-lead {
  margin: 0;
  color: #334155;
  font-size: 18px;
  font-weight: 700;
}

.article-panel {
  padding: 28px;
  margin-bottom: 28px;
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.article-panel p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 17px;
}

.side-panel {
  padding: 22px;
}

.side-panel h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.side-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.side-item img {
  aspect-ratio: 16 / 9;
  height: 70px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.side-item strong {
  display: block;
  line-height: 1.25;
}

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

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

.related-card h2 {
  padding: 0 14px 14px;
  font-size: 17px;
}

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

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

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1e293b, #0f172a);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}

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

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

.site-footer p {
  max-width: 420px;
  margin: 0;
  color: #9ca3af;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

  .side-panel {
    order: 2;
  }
}

@media (max-width: 860px) {
  .nav-wrap {
    flex-wrap: wrap;
    min-height: auto;
    padding: 14px 18px;
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 4;
    margin-left: 0;
    padding: 14px 0 4px;
    border-top: 1px solid rgba(251, 191, 36, 0.22);
  }

  .main-nav.is-open {
    display: grid;
    gap: 12px;
  }

  .nav-link::after {
    display: none;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .header-search input {
    width: 100%;
  }

  .hero-stage {
    height: 480px;
    border-radius: 22px;
  }

  .hero-control {
    display: none;
  }

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

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

  .horizontal-card {
    grid-template-columns: 1fr;
  }

  .horizontal-cover {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .horizontal-info {
    padding: 0 18px 18px;
  }

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

@media (max-width: 560px) {
  .page-shell {
    padding: 22px 14px 50px;
  }

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

  .hero-stage {
    height: 420px;
  }

  .hero-content h1, .hero-content h2 {
    font-size: 34px;
  }

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

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

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