:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --secondary: #06b6d4;
  --text: #1f2937;
  --muted: #64748b;
  --soft: #f8fafc;
  --border: #e2e8f0;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fff7ed 0, #f8fafc 240px, #f8fafc 100%);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 18px rgba(15, 23, 42, 0.08);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
  font-size: 14px;
}

.brand-text,
.footer-brand {
  font-size: 25px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  font-weight: 700;
  font-size: 15px;
  color: #475569;
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 0;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--border);
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 236px;
  height: 40px;
  border-radius: 999px 0 0 999px;
  padding: 0 16px;
}

.top-search button {
  width: 46px;
  height: 40px;
  border: 0;
  border-radius: 0 999px 999px 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #f1f5f9;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  color: #334155;
  font-size: 22px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  padding: 14px 16px 18px;
  background: #fff;
}

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

.mobile-search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: 12px 0 0 12px;
  padding: 0 14px;
}

.mobile-search button {
  height: 42px;
  border: 0;
  padding: 0 16px;
  border-radius: 0 12px 12px 0;
  color: #fff;
  background: var(--primary);
}

.mobile-menu nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  background: #f8fafc;
  color: #475569;
}

.mobile-nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.hero-carousel {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #0f172a;
}

.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-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide.is-active .hero-image {
  animation: heroZoom 7s ease both;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.55) 48%, rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
  padding-top: 32px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffedd5;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.35);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 22px;
  max-width: 660px;
  color: #e2e8f0;
  font-size: 19px;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 700;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.34);
}

.btn-secondary {
  color: #fff;
  background: linear-gradient(135deg, var(--secondary), #0891b2);
  box-shadow: 0 14px 32px rgba(6, 182, 212, 0.26);
}

.btn-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--primary);
}

.page-main,
.home-main {
  padding: 54px 0 0;
}

.home-main {
  display: grid;
  gap: 58px;
}

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

.section-head h1,
.section-head h2,
.page-title h1,
.detail-info h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.05em;
  line-height: 1.15;
}

.section-head h2,
.page-title h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.gradient-title {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p,
.page-title p,
.category-intro,
.search-lead {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 760px;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card > a {
  display: block;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card > a:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: var(--shadow);
}

.poster-box {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-box img,
.wide-poster img,
.category-thumb img,
.detail-cover img,
.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card > a:hover img,
.category-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster-box::after,
.wide-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(15, 23, 42, 0.82));
  transition: opacity 0.25s ease;
}

.movie-card > a:hover .poster-box::after,
.movie-card > a:hover .wide-poster::after {
  opacity: 1;
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-type,
.rank-badge {
  position: absolute;
  z-index: 4;
  top: 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.card-type {
  right: 12px;
  padding: 5px 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.rank-badge {
  left: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, var(--primary));
}

.card-body {
  padding: 16px;
}

.card-body h2,
.wide-body h2 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card > a:hover h2,
.related-card:hover strong {
  color: var(--primary);
}

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

.card-foot,
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.card-meta {
  justify-content: flex-start;
  margin-bottom: 8px;
}

.featured-scroll {
  position: relative;
}

.scroll-row {
  display: grid;
  grid-auto-columns: minmax(280px, 340px);
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 24px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.scroll-btn {
  position: absolute;
  top: 36%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.scroll-btn:hover {
  color: #fff;
  background: var(--primary);
  transform: scale(1.06);
}

.scroll-btn.left {
  left: -12px;
}

.scroll-btn.right {
  right: -12px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
}

.category-thumb {
  position: absolute;
  inset: 0;
}

.category-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.82));
}

.category-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.category-info strong {
  display: block;
  font-size: 22px;
  line-height: 1.2;
}

.category-info span {
  display: block;
  margin-top: 7px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.movie-card-wide > a {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 156px;
}

.wide-poster {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
}

.wide-body {
  padding: 18px;
  min-width: 0;
}

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

.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #475569;
  background: linear-gradient(135deg, #ffedd5, #cffafe);
  font-size: 12px;
  font-weight: 800;
}

.page-title {
  padding: 38px 0 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  padding: 0 14px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #fff;
  cursor: pointer;
  text-align: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.3), rgba(2, 6, 23, 0.86));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 20px 44px rgba(249, 115, 22, 0.32);
  font-size: 28px;
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.18;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  background: #e2e8f0;
}

.detail-side-card {
  padding: 18px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-side-card h2 {
  margin: 18px 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.detail-side-card p {
  color: var(--muted);
  margin: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.detail-meta span {
  color: #475569;
  background: #f1f5f9;
}

.detail-info {
  margin-top: 28px;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-info h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-info .lead {
  margin: 14px 0 20px;
  color: #475569;
  font-size: 18px;
}

.detail-section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #334155;
  text-align: justify;
}

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

.related-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.4);
}

.related-card img {
  height: 122px;
  border-radius: 14px;
  background: #e2e8f0;
}

.related-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-card span {
  display: block;
  margin-top: 6px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 44px;
  text-align: center;
  border-radius: 24px;
  color: #64748b;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.site-footer {
  margin-top: 64px;
  color: #cbd5e1;
  background: #111827;
}

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

.site-footer p {
  max-width: 430px;
  margin: 12px 0 0;
  color: #94a3b8;
}

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

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

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.1);
  }
}

@media (max-width: 1100px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

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

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

  .detail-side-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
  }
}

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

  .hero-carousel {
    height: 560px;
  }

  .hero-layer {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.4), rgba(2, 6, 23, 0.88));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 86px;
  }

  .hero-copy h1 {
    margin-top: 18px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

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

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

  .movie-card-wide > a {
    grid-template-columns: 118px 1fr;
  }

  .wide-body p,
  .tag-row {
    display: none;
  }

  .related-card {
    grid-template-columns: 76px 1fr;
  }

  .related-card img {
    height: 104px;
  }

  .detail-side-card {
    display: block;
  }
}

@media (max-width: 520px) {
  .brand-text {
    font-size: 21px;
  }

  .header-inner {
    height: 62px;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-light {
    width: 100%;
  }

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

  .poster-box {
    aspect-ratio: 16 / 11;
  }

  .card-body p {
    min-height: 0;
  }

  .scroll-row {
    grid-auto-columns: minmax(248px, 82vw);
  }

  .detail-info {
    padding: 20px;
  }
}