:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #f97316;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: -0.02em;
}

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

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 auto;
}

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

.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.24);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  color: #374151;
  background: #f3f4f6;
  border-radius: 12px;
  font-size: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  background: radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.18), transparent 28%), linear-gradient(135deg, #7f1d1d 0%, #c2410c 50%, #b45309 100%);
}

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

.hero-slider {
  position: relative;
  min-height: 610px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  align-items: center;
  gap: 54px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-copy {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding: 80px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 12px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: #fde68a;
}

.hero p {
  max-width: 710px;
  margin: 0 0 32px;
  color: #fff7ed;
  font-size: 19px;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  color: var(--white);
  background: var(--red);
  border-radius: 13px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(127, 29, 29, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: #b91c1c;
  box-shadow: 0 22px 38px rgba(127, 29, 29, 0.34);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
  border: 2px solid rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.btn-light {
  color: var(--red-dark);
  background: var(--white);
}

.hero-media {
  position: relative;
  z-index: 2;
  padding: 40px 0;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 30px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(0,0,0,.76), transparent 55%);
}

.hero-poster strong {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  color: var(--white);
  font-size: 26px;
  line-height: 1.2;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 10px;
}

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

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

.quick-search {
  position: relative;
  z-index: 6;
  margin-top: -38px;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.quick-search input,
.search-box input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  color: var(--ink);
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 16px;
  outline: none;
}

.quick-search input:focus,
.search-box input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220,38,38,.10);
}

.section {
  padding: 66px 0;
}

.section-white {
  background: var(--white);
}

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

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

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #111827;
}

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

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

.movie-cover::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  content: "";
  background: linear-gradient(to top, rgba(0,0,0,.70), transparent);
}

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--white);
  background: rgba(220, 38, 38, 0.92);
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(0,0,0,.24);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 38px;
  padding: 7px 9px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 12px;
  text-align: center;
  font-size: 15px;
}

.movie-info {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-meta-line a {
  color: var(--red);
}

.movie-info h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.movie-info h3 a:hover {
  color: var(--red);
}

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

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

.tag-row span,
.badge {
  display: inline-flex;
  padding: 5px 9px;
  color: #374151;
  background: #f3f4f6;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 236px;
  padding: 26px;
  color: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.category-card p {
  max-width: 520px;
  margin: 0 0 20px;
  color: rgba(255,255,255,.88);
}

.category-card .btn {
  color: var(--red-dark);
  background: var(--white);
}

.grad-red { background: linear-gradient(135deg, #991b1b, #ea580c); }
.grad-teal { background: linear-gradient(135deg, #0f766e, #0891b2); }
.grad-orange { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.grad-blue { background: linear-gradient(135deg, #1d4ed8, #0f766e); }
.grad-amber { background: linear-gradient(135deg, #b45309, #d97706); }
.grad-indigo { background: linear-gradient(135deg, #4338ca, #2563eb); }
.grad-pink { background: linear-gradient(135deg, #be123c, #db2777); }
.grad-rose { background: linear-gradient(135deg, #e11d48, #f97316); }
.grad-purple { background: linear-gradient(135deg, #6d28d9, #dc2626); }

.page-hero {
  padding: 76px 0;
  color: var(--white);
  background: radial-gradient(circle at 78% 10%, rgba(255,255,255,.18), transparent 24%), linear-gradient(135deg, #7f1d1d, #c2410c 52%, #b45309);
}

.page-title {
  max-width: 850px;
}

.page-title p {
  color: #fff7ed;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: rgba(255,255,255,.86);
  font-size: 14px;
  font-weight: 800;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 82px 120px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
}

.ranking-row strong {
  color: var(--red);
  font-size: 26px;
  text-align: center;
}

.ranking-row img {
  width: 120px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 13px;
}

.ranking-row h2 {
  margin: 0 0 7px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0;
  color: var(--muted);
}

.search-box {
  padding: 22px;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.search-box input {
  min-height: 58px;
  font-size: 18px;
}

.search-status {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.content-card,
.related-card {
  overflow: hidden;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,.12), rgba(0,0,0,.76));
}

.player-button {
  position: relative;
  z-index: 5;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 30px;
  box-shadow: 0 24px 50px rgba(0,0,0,.38);
}

.content-card {
  padding: 28px;
}

.content-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.info-strip span,
.info-strip a {
  display: inline-flex;
  padding: 8px 12px;
  color: #4b5563;
  background: #f9fafb;
  border-radius: 11px;
  font-weight: 800;
}

.info-strip a {
  color: var(--red);
}

.content-block {
  margin: 24px 0;
}

.content-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.related-card {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.related-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: #f9fafb;
}

.mini-card img {
  width: 96px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 11px;
}

.mini-body {
  min-width: 0;
}

.mini-body strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-body em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.mini-rank {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.cta-band {
  padding: 44px 0;
  color: var(--white);
  background: linear-gradient(90deg, #d97706, #ea580c);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-inner h2 {
  margin: 0 0 6px;
  font-size: 30px;
}

.cta-inner p {
  margin: 0;
  color: #fffbeb;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 18px 16px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.08);
}

@media (max-width: 980px) {
  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-media {
    display: none;
  }

  .hero-copy {
    padding: 74px 0 110px;
  }

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

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

  .related-card {
    position: static;
  }
}

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

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

  .hero,
  .hero-slider {
    min-height: 560px;
  }

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

  .section-head,
  .cta-inner {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ranking-row {
    grid-template-columns: 46px 88px 1fr;
  }

  .ranking-row img {
    width: 88px;
  }

  .ranking-row .btn {
    grid-column: 1 / -1;
  }
}
