:root {
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --ink: #111827;
  --muted: #6b7280;
  --subtle: #e5e7eb;
  --brand: #f59e0b;
  --brand-deep: #ea580c;
  --brand-soft: #fef3c7;
  --blue: #2563eb;
  --green: #16a34a;
  --purple: #7c3aed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
}

.logo-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.logo-mark::before {
  content: "";
  position: absolute;
  inset: 11px 12px;
  border-left: 15px solid #ffffff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

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

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

.main-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: relative;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 4px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.28), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(234, 88, 12, 0.22), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #111827 46%, #1f2937 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.12) 25%, transparent 25%);
  background-size: 60px 60px;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  padding: 84px 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: 48px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.32);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 24px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(90deg, #fde68a, #fb923c, #fef3c7);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lede {
  max-width: 620px;
  margin: 0 0 22px;
  color: #d1d5db;
  font-size: 19px;
}

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

.hero-meta span,
.meta-chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.1);
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 14px 32px rgba(234, 88, 12, 0.34);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-light {
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.hero-stage {
  position: relative;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 410px;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
  transform: translateZ(0);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 410px;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.3s ease;
}

.hero-card:hover img {
  transform: scale(1.04);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, rgba(0, 0, 0, 0.74) 100%);
}

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

.hero-card-content h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

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

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  background: rgba(245, 158, 11, 0.28);
  transform: translateY(-2px);
}

.hero-thumb img {
  width: 64px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-thumb span {
  display: block;
  color: #d1d5db;
  font-size: 12px;
}

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

.section-wide {
  padding: 64px 0;
  background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
}

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

.section-title {
  margin: 10px 0 4px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.05em;
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  padding: 16px;
  margin: 24px 0 32px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 15px;
  border: 1px solid var(--subtle);
  outline: none;
  background: #f9fafb;
  color: var(--ink);
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.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: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.movie-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.rank-badge {
  right: 12px;
  left: auto;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-body {
  padding: 18px;
}

.movie-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.list-block {
  display: grid;
  gap: 20px;
}

.list-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.list-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.list-card-body {
  padding: 26px;
}

.list-card-body h3 {
  margin: 0 0 12px;
  font-size: 23px;
}

.list-card-body p {
  margin: 0 0 18px;
  color: var(--muted);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 26px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.category-card:nth-child(4n) {
  background: linear-gradient(135deg, #14532d, #16a34a);
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 25px;
}

.category-card p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.34), transparent 30%),
    linear-gradient(135deg, #0f172a, #1f2937);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #fde68a;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

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

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

.detail-intro {
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: 18px;
}

.player-section {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0 22px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.38);
}

.play-icon::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 24px 0 0 31px;
  border-left: 23px solid #ffffff;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
}

.player-overlay strong {
  max-width: min(80%, 720px);
  overflow: hidden;
  text-align: center;
  font-size: 22px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.article-content {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.content-panel {
  padding: 34px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

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

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 28px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #9ca3af;
  font-size: 14px;
}

.footer-links a:hover {
  color: #fde68a;
}

.hidden {
  display: none !important;
}

.line-clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

@media (max-width: 1080px) {
  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .main-nav {
    position: absolute;
    top: 74px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

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

  .hero-inner {
    padding: 56px 0;
  }

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

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

  .section-head {
    display: block;
  }

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

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

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

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

@media (max-width: 560px) {
  .nav-wrap,
  .section,
  .hero-inner,
  .page-hero-inner,
  .footer-inner,
  .player-section,
  .article-content {
    width: min(100% - 24px, 1180px);
  }

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

  .hero h1 {
    font-size: 38px;
  }

  .hero-lede,
  .detail-intro {
    font-size: 16px;
  }

  .hero-card-content {
    padding: 22px;
  }

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

  .hero-thumb img {
    width: 100%;
    height: 56px;
  }

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

  .content-panel {
    padding: 24px;
  }

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

  .play-icon::before {
    margin: 18px 0 0 25px;
    border-left-width: 18px;
    border-top-width: 12px;
    border-bottom-width: 12px;
  }
}
