:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #dc2626;
  --brand-2: #f97316;
  --brand-3: #facc15;
  --deep: #7f1d1d;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 44%, #f1f5f9 100%);
  color: var(--ink);
}

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

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
  transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

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

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-links a {
  font-weight: 700;
  color: #475569;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input {
  width: 260px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 11px 96px 11px 18px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.nav-search button {
  position: absolute;
  right: 4px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #475569;
  background: #f1f5f9;
  cursor: pointer;
}

.main-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(110deg, #7f1d1d, #9a3412 55%, #7f1d1d);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(250, 204, 21, 0.28), transparent 32%), radial-gradient(circle at 84% 28%, rgba(255, 255, 255, 0.16), transparent 26%);
  pointer-events: none;
}

.hero-shell {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 650px;
  padding: 68px 0 58px;
  display: grid;
  align-items: center;
}

.hero-slide {
  display: none;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 44px;
  align-items: center;
  animation: fadeUp 0.62s ease both;
}

.hero-slide.is-active {
  display: grid;
}

.hero-copy {
  max-width: 660px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7.2vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h1 span {
  background: linear-gradient(90deg, #fde68a, #ffffff, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  max-width: 650px;
  color: #fee2e2;
  font-size: 19px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

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

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

.btn-primary {
  color: #7f1d1d;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.18);
}

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

.hero-poster {
  position: relative;
  min-height: 420px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster img {
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

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

.hero-poster-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-poster-info strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

.hero-poster-info span {
  color: #cbd5e1;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 20px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.hero-stat {
  min-height: 110px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-stat strong {
  display: block;
  color: #fde68a;
  font-size: 24px;
  margin-bottom: 8px;
}

.section {
  padding: 64px 0 10px;
}

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

.kicker {
  display: inline-flex;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

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

.section-link {
  color: var(--brand);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 38, 38, 0.26);
  box-shadow: 0 28px 68px rgba(15, 23, 42, 0.15);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(220, 38, 38, 0.9);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 18px;
}

.card-meta {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 9px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.28;
}

.card-body p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #991b1b, #ea580c);
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -50px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-card strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 24px;
  margin-bottom: 10px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fee2e2;
  line-height: 1.7;
}

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

.page-title {
  padding: 40px;
  border-radius: 32px;
  color: #ffffff;
  background: linear-gradient(120deg, #7f1d1d, #c2410c 58%, #9a3412);
  box-shadow: var(--shadow);
}

.tool-row {
  display: flex;
  gap: 12px;
  margin: 28px 0 10px;
}

.tool-row input,
.tool-row select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 13px 16px;
  background: #ffffff;
  outline: none;
}

.tool-row input:focus,
.tool-row select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 118px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.rank-no {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.rank-link {
  color: var(--brand);
  font-weight: 900;
  white-space: nowrap;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: start;
  padding: 54px 0 18px;
}

.player-card {
  overflow: hidden;
  border-radius: 30px;
  background: #0f172a;
  box-shadow: 0 36px 88px rgba(15, 23, 42, 0.32);
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.48));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #7f1d1d;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.play-button span {
  margin-left: 5px;
  font-size: 34px;
  line-height: 1;
}

.player-text {
  padding: 22px 24px;
  color: #cbd5e1;
}

.player-text strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 8px;
}

.detail-info {
  padding: 34px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

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

.breadcrumb a {
  color: var(--brand);
  font-weight: 800;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

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

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

.text-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.footer {
  margin-top: 74px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-brand {
  display: inline-flex;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 10px;
}

.footer p {
  margin: 0;
  max-width: 560px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px;
}

.footer-links a {
  color: #fee2e2;
  font-weight: 800;
}

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

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid #fed7aa;
  border-radius: 22px;
  color: #9a3412;
  background: #fff7ed;
}

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

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

@media (max-width: 1020px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .nav-links {
    display: none;
    width: 100%;
    order: 4;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .nav-search {
    width: 100%;
    order: 5;
  }

  .nav-search input {
    width: 100%;
  }

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

  .hero-shell {
    min-height: 0;
  }

  .hero-dots {
    position: static;
    margin-top: 24px;
  }

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

  .rank-item {
    grid-template-columns: 48px 90px 1fr;
  }

  .rank-link {
    grid-column: 3;
  }
}

@media (max-width: 640px) {
  .brand-text small {
    display: none;
  }

  .hero-shell {
    padding: 44px 0 38px;
  }

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

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

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

  .section-head,
  .footer-inner,
  .tool-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title,
  .detail-info {
    padding: 26px;
  }

  .rank-item {
    grid-template-columns: 42px 1fr;
  }

  .rank-cover {
    display: none;
  }

  .rank-link {
    grid-column: 2;
  }
}
