:root {
  --bg: #f8fafc;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.25);
  --brand: #f97316;
  --brand-2: #ef4444;
  --brand-3: #ec4899;
  --dark: #0f172a;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(249, 115, 22, 0.16), transparent 26rem),
    radial-gradient(circle at 88% 12%, rgba(236, 72, 153, 0.12), transparent 30rem),
    linear-gradient(180deg, #fff7ed 0%, #f8fafc 34%, #eef2ff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.25);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-panel a {
  padding: 11px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
}

.hero {
  position: relative;
  overflow: hidden;
  width: min(1200px, calc(100% - 32px));
  min-height: 72vh;
  margin: 32px auto 0;
  border-radius: 34px;
  color: #fff;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.12)),
    radial-gradient(circle at 20% 72%, rgba(249, 115, 22, 0.42), transparent 32rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: clamp(40px, 8vw, 88px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 14px;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

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

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 35px rgba(239, 68, 68, 0.28);
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: clamp(40px, 8vw, 88px);
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
  width: 56px;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
}

.hero-side {
  position: absolute;
  z-index: 3;
  right: 38px;
  bottom: 34px;
  width: min(330px, 36vw);
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.hero-side strong {
  display: block;
  margin-bottom: 12px;
  color: #fff;
}

.hero-side a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
}

.page-section {
  width: min(1200px, calc(100% - 32px));
  margin: 42px auto 0;
}

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

.section-kicker {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ea580c;
  background: #ffedd5;
  font-weight: 700;
  font-size: 13px;
}

.section-head h2,
.page-title h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  margin: 24px 0;
  padding: 14px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

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

.filter-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: #0f172a;
  background: #fff;
}

.filter-input:focus {
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), transparent);
}

.rank-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.22);
}

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

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

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.chip-row span,
.detail-tag,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 20px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444, #ec4899);
  box-shadow: var(--shadow);
}

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

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

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

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-card span {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 22px;
}

.rank-panel,
.detail-panel,
.content-panel {
  border-radius: 28px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #fff7ed;
}

.rank-index {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text strong,
.rank-text small {
  display: block;
}

.rank-text small {
  margin-top: 4px;
  color: var(--muted);
}

.page-title {
  width: min(1200px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: clamp(26px, 5vw, 52px);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.detail-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: stretch;
}

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  min-height: 520px;
  background: linear-gradient(135deg, #fed7aa, #fecdd3);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-panel {
  padding: clamp(26px, 5vw, 50px);
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-lead {
  color: #334155;
  font-size: 18px;
  line-height: 1.8;
}

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

.player-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 36px auto 0;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.video-frame video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.74));
  pointer-events: auto;
}

.play-layer.hidden {
  display: none;
}

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 48px rgba(239, 68, 68, 0.35);
}

.player-caption {
  padding: 18px 22px;
  color: #cbd5e1;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.content-panel {
  padding: clamp(24px, 4vw, 42px);
}

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

.content-panel p {
  color: #334155;
  line-height: 1.9;
}

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

.related-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.related-card strong {
  display: block;
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.site-footer {
  margin-top: 64px;
  padding: 34px 0;
  background: rgba(15, 23, 42, 0.96);
  color: #e2e8f0;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.empty-message {
  display: none;
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

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

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    padding: 34px 26px;
  }

  .hero-side {
    left: 24px;
    right: 24px;
    bottom: 76px;
    width: auto;
  }

  .hero-dots {
    left: 26px;
    bottom: 34px;
  }

  .filter-panel,
  .rank-layout,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .detail-cover {
    min-height: auto;
    aspect-ratio: 3 / 4;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .section-head {
    display: block;
  }

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

  .movie-card h3 {
    font-size: 16px;
  }

  .hero h1 {
    letter-spacing: -0.06em;
  }
}
