:root {
  --color-primary: #f97316;
  --color-primary-dark: #ea580c;
  --color-accent: #ef4444;
  --color-pink: #ec4899;
  --color-blue: #2563eb;
  --color-green: #16a34a;
  --color-amber: #d97706;
  --color-bg: #f8fafc;
  --color-soft: #fff7ed;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.10);
  --shadow-hover: 0 24px 70px rgba(15, 23, 42, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.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.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.navbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
  font-size: 15px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 650;
  color: #374151;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  color: var(--color-primary-dark);
  font-size: 22px;
  cursor: pointer;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #f97316, #ef4444 48%, #ec4899);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.26), transparent 26%),
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(120deg, rgba(251, 146, 60, 0.92), rgba(239, 68, 68, 0.86), rgba(236, 72, 153, 0.82));
}

.hero-shell {
  position: relative;
  min-height: 620px;
  padding: 86px 0 42px;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  align-items: center;
  gap: 56px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 86px;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: translateY(18px);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  position: relative;
  top: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 12px;
  font-weight: 750;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 36px 80px rgba(17, 24, 39, 0.35);
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(17, 24, 39, 0.4));
}

.hero-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.4));
}

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

.hero-poster:hover img {
  transform: scale(1.05);
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.active {
  background: #fff;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.hero-stats a {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-stats strong {
  display: block;
  font-size: 22px;
}

.hero-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.section {
  padding: 68px 0;
  background: #fff;
}

.section-blue {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-warm {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

.section-title-between {
  justify-content: space-between;
  align-items: flex-end;
}

.section-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dbeafe;
  color: var(--color-blue);
  font-weight: 900;
}

.more-link {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.featured-grid .movie-card:first-child {
  grid-column: span 2;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fecaca);
}

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(22, 163, 74, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 44px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--color-primary-dark);
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.card-meta a {
  color: var(--color-primary-dark);
}

.card-compact .card-body h3 {
  font-size: 14px;
}

.card-compact .card-body p {
  font-size: 12px;
}

.card-compact .tag-list {
  display: none;
}

.tag-list span {
  background: #fff7ed;
  color: #c2410c;
}

.two-column {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 42px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.rank-number {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-weight: 900;
}

.ranking-row img {
  width: 68px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  background: #fed7aa;
}

.ranking-main {
  min-width: 0;
}

.ranking-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.ranking-main em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--color-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-size: 13px;
}

.ranking-meta {
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.full-ranking .ranking-row {
  grid-template-columns: 48px 74px minmax(0, 1fr) auto;
}

.category-panel {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-card);
}

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

.category-panel p {
  margin: 0 0 18px;
  color: var(--color-muted);
}

.category-tile-grid {
  display: grid;
  gap: 12px;
}

.category-tile,
.category-card {
  display: block;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #fee2e2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.15);
}

.category-tile span {
  display: block;
  color: var(--color-primary-dark);
  font-weight: 900;
}

.category-tile strong {
  display: block;
  color: #7c2d12;
  font-size: 13px;
}

.page-hero {
  padding: 82px 0;
  color: #fff;
  background: linear-gradient(120deg, #f97316, #ef4444 55%, #ec4899);
}

.page-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.soft-hero {
  background: linear-gradient(120deg, #2563eb, #06b6d4);
}

.warm-hero,
.category-hero {
  background: linear-gradient(120deg, #d97706, #f97316, #ef4444);
}

.search-hero {
  background: linear-gradient(120deg, #7c3aed, #2563eb, #06b6d4);
}

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

.category-card span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: var(--color-primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--color-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.search-field {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.search-field input,
.filter-selects select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0 14px;
  background: #f9fafb;
  color: #111827;
  outline: none;
}

.search-field input:focus,
.filter-selects select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-selects {
  display: flex;
  gap: 10px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(24px);
  transform: scale(1.1);
  opacity: 0.32;
}

.detail-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.7));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 46px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  background: linear-gradient(135deg, #fed7aa, #fecaca);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-copy p {
  max-width: 820px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 750;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.player-section {
  background: #0f172a;
  padding-top: 52px;
  padding-bottom: 52px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.82));
  cursor: pointer;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 18px 45px rgba(239, 68, 68, 0.32);
  font-size: 28px;
  padding-left: 4px;
}

.player-overlay strong {
  font-size: 18px;
}

.detail-content-section {
  background: #fff;
}

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

.detail-article,
.detail-side,
.content-page {
  padding: 30px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article p,
.content-page p {
  color: #374151;
  font-size: 16px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.detail-side dt {
  color: #6b7280;
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
  color: #111827;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
  padding: 52px 0;
}

.site-footer .site-logo {
  color: #fff;
}

.site-footer p {
  color: #9ca3af;
  font-size: 14px;
}

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

.site-footer a:not(.site-logo) {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

.is-hidden-card {
  display: none !important;
}

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-card);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
    border-radius: 12px;
  }

  .nav-links a:hover {
    background: #fff7ed;
  }

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

  .hero-slide,
  .detail-layout,
  .two-column,
  .detail-content-grid,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    position: relative;
    top: auto;
    gap: 28px;
  }

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
  }

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

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

  .filter-selects {
    flex-direction: column;
  }

  .ranking-row,
  .full-ranking .ranking-row {
    grid-template-columns: 38px 58px minmax(0, 1fr);
  }

  .ranking-meta {
    grid-column: 3;
  }
}

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

  .featured-grid,
  .movie-grid,
  .all-grid,
  .search-results,
  .category-card-grid,
  .dense-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .featured-grid .movie-card:first-child {
    grid-column: span 2;
  }

  .page-hero {
    padding: 58px 0;
  }

  .detail-hero-inner {
    padding: 30px 0 42px;
  }

  .detail-poster {
    width: 220px;
    margin: 0 auto;
  }

  .player-card {
    border-radius: 18px;
  }

  .play-icon {
    width: 64px;
    height: 64px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .tag-list {
    display: none;
  }
}
