:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --brand: #f59e0b;
  --brand-2: #f97316;
  --dark: #0f172a;
  --dark-2: #1f2937;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  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 {
  display: block;
  max-width: 100%;
}

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

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 78px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(135deg, #d97706, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

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

.header-search button,
.filter-controls button,
.hero-button,
.section-link,
.player-overlay button,
.quick-filter-row button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  transition: 0.2s ease;
}

.header-search button,
.filter-controls button,
.hero-button.primary,
.player-overlay button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.header-search button {
  padding: 8px 14px;
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: var(--soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.mobile-panel .mobile-link {
  display: block;
  margin-bottom: 8px;
}

.mobile-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mobile-sub-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--soft);
  color: #4b5563;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.34), transparent 26%),
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.24), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #111827 52%, #1f2937 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  min-height: 660px;
  margin: 0 auto;
  padding: 82px 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 44px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d97706;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fbbf24;
}

.hero h1 {
  margin: 16px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
  color: #fbbf24;
}

.hero-summary {
  max-width: 650px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.tag-row span,
.detail-chip,
.stat-card span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-meta span {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.hero-button {
  padding: 13px 18px;
}

.hero-button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-slide {
  display: none;
}

.hero-slide.active {
  display: block;
  animation: fadeUp 0.55s ease both;
}

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

.hero-poster-card {
  position: relative;
  overflow: hidden;
  min-height: 490px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(249, 115, 22, 0.08));
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.36);
}

.hero-poster-card img {
  width: 100%;
  height: 490px;
  object-fit: cover;
  opacity: 0.94;
}

.hero-poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.94) 100%);
}

.hero-card-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-card-content h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero-card-content p {
  margin: 0 0 16px;
  color: #d1d5db;
}

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

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

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

main,
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 54px 20px;
}

.full-width-section {
  padding: 64px 0;
}

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

.section-heading.compact {
  display: block;
}

.section-heading h2,
.page-title h1 {
  margin: 6px 0 6px;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading p,
.page-title p {
  margin: 0;
  color: var(--muted);
}

.section-link {
  flex: 0 0 auto;
  padding: 11px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.3), transparent 28%),
    linear-gradient(135deg, #111827, #374151);
}

.movie-card.horizontal .poster-frame {
  aspect-ratio: 16 / 10;
}

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

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

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(8px);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover .movie-title {
  color: #d97706;
}

.movie-meta {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-chip {
  padding: 5px 9px;
  color: #92400e;
  background: #fef3c7;
}

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

.category-card,
.stat-card,
.filter-panel,
.detail-panel,
.player-shell,
.breadcrumb {
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.07);
}

.category-card {
  padding: 22px;
  transition: 0.2s ease;
}

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

.category-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

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

.category-card span {
  color: #d97706;
  font-weight: 900;
}

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

.filter-controls {
  display: flex;
  gap: 12px;
  margin: 18px 0;
}

.filter-controls input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 16px;
  outline: 0;
}

.filter-controls input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-controls button {
  padding: 0 20px;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-filter-row button {
  padding: 8px 12px;
  color: #374151;
  background: #f3f4f6;
}

.quick-filter-row button.active,
.quick-filter-row button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.filter-count {
  color: var(--muted);
  font-weight: 800;
}

.page-title {
  margin-bottom: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #d97706;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 30px;
  align-items: stretch;
  margin-bottom: 30px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.detail-info {
  padding: 34px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.22), transparent 28%),
    linear-gradient(135deg, #0f172a, #1f2937);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-info p {
  color: #d1d5db;
}

.detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

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

.detail-panel {
  margin-bottom: 24px;
  padding: 26px;
}

.detail-panel p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

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

.player-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #0f172a;
  color: #fff;
}

.player-box {
  position: relative;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.7));
}

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

.player-overlay button {
  padding: 15px 22px;
  font-size: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 126px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.rank-num {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 1000;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.rank-item img {
  width: 126px;
  height: 76px;
  object-fit: cover;
  border-radius: 16px;
  background: #111827;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.rank-action {
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
}

.stat-card span {
  color: var(--muted);
}

.site-footer {
  margin-top: 48px;
  padding: 44px 20px;
  color: #d1d5db;
  background: #0f172a;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.5fr;
  gap: 28px;
}

.footer-grid strong {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p {
  margin: 0;
}

.footer-grid a {
  display: inline-block;
  margin: 0 10px 8px 0;
  color: #fbbf24;
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 900;
}

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

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

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-inner {
    min-height: auto;
    padding-top: 54px;
  }

  .hero-poster-card,
  .hero-poster-card img {
    min-height: 360px;
    height: 360px;
  }

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

  .rank-item {
    grid-template-columns: 44px 96px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 2 / -1;
    text-align: center;
  }

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

@media (max-width: 620px) {
  .nav-wrap {
    min-height: 68px;
    padding: 0 14px;
  }

  .brand-text em {
    display: none;
  }

  .brand-text strong {
    font-size: 17px;
  }

  main,
  .page-main {
    padding: 34px 14px;
  }

  .movie-grid.large,
  .movie-grid,
  .category-grid,
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

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

  .movie-title {
    min-height: 40px;
    font-size: 15px;
  }

  .movie-desc {
    display: none;
  }

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

  .filter-controls button {
    padding: 12px;
  }

  .detail-info {
    padding: 24px;
  }

  .detail-poster img {
    min-height: 420px;
  }
}
