:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --paper-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red: #ef4444;
  --orange: #f97316;
  --pink: #db2777;
  --green: #16a34a;
  --blue: #2563eb;
  --purple: #7c3aed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark,
.footer-brand span {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #dc2626, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a {
  color: #374151;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--green);
  transform: translateY(-1px);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
}

.top-search button,
.mobile-search button,
.btn,
.filter-bar button {
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.24);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.btn:hover,
.filter-bar button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.3);
}

.btn.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.46);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 20px;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mobile-panel nav a {
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: #374151;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 48%, #db2777 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.54), rgba(15, 23, 42, 0.18)), radial-gradient(circle at 18% 22%, rgba(253, 224, 71, 0.22), transparent 30%), radial-gradient(circle at 80% 70%, rgba(251, 113, 133, 0.24), transparent 32%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: 8%;
  top: 16%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(45px);
  animation: glowPulse 5s ease-in-out infinite alternate;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 640px;
  margin: 0 auto;
  padding: 68px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.82fr);
  gap: 40px;
  align-items: center;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-title {
  margin: 0;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.hero-title span,
.gradient-text {
  background: linear-gradient(90deg, #fef3c7, #fed7aa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 28px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

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

.hero-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-mini-links a {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  backdrop-filter: blur(10px);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(22px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

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

.hero-card {
  position: relative;
  height: 470px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.34);
  background: #111827;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 86px 26px 26px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.94));
}

.hero-card-content h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.16;
}

.hero-card-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.84);
}

.hero-card-content span {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
}

.hero-dot.active {
  width: 32px;
  background: #fff;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section.full {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.section.full > .section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 700px;
}

.more-link {
  display: inline-flex;
  align-items: center;
  color: var(--red);
  font-weight: 900;
}

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

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

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

.movie-card {
  display: block;
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  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);
}

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

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

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

.score-pill,
.play-mini {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.score-pill {
  top: 12px;
  left: 12px;
  min-width: 48px;
  height: 30px;
}

.play-mini {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.card-body {
  display: block;
  padding: 16px;
}

.movie-title {
  display: block;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.movie-meta,
.movie-desc {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.movie-desc {
  min-height: 44px;
}

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

.tag-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #166534;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 800;
}

.movie-card.horizontal,
.rank-row,
.compact-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.movie-card.horizontal .poster-wrap {
  width: 150px;
  min-width: 150px;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
}

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

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

.compact-card,
.category-card {
  border-radius: 22px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.compact-card img {
  width: 86px;
  height: 108px;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  color: #111827;
  font-size: 17px;
}

.compact-card em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.category-card {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 24px;
  color: #111827;
}

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

.category-card span {
  color: var(--red);
  font-weight: 900;
}

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

.rank-row {
  min-height: 104px;
  border-radius: 22px;
  padding: 12px 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-row img {
  width: 74px;
  height: 82px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-no {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 999px;
  font-weight: 950;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  font-size: 18px;
  color: #111827;
}

.rank-info em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
}

.rank-score {
  color: var(--red);
  font-size: 24px;
  font-weight: 950;
}

.page-hero {
  background: linear-gradient(135deg, #fef2f2, #fff7ed 55%, #fdf2f8);
  border-bottom: 1px solid #fee2e2;
}

.page-hero .section {
  padding-top: 64px;
  padding-bottom: 54px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(130px, 0.5fr);
  gap: 12px;
  margin: 22px 0 32px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border-radius: 18px;
}

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

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

.detail-main {
  background: linear-gradient(135deg, #f9fafb, #f0fdf4);
}

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--green);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  background: #111827;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: blur(1px) saturate(1.1);
}

.play-button {
  position: relative;
  z-index: 4;
  width: 94px;
  height: 94px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 24px 58px rgba(239, 68, 68, 0.44);
  cursor: pointer;
}

.detail-card,
.side-card,
.text-card {
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 12px;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 22px;
}

.text-card {
  margin-top: 20px;
  padding: 24px;
}

.text-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  color: #111827;
}

.text-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.side-card {
  overflow: hidden;
}

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

.side-content {
  padding: 20px;
}

.side-content h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.side-content p {
  margin: 0 0 16px;
  color: var(--muted);
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.prev-next a {
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 36px;
}

.footer-brand strong {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  max-width: 460px;
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
}

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

.footer-links a {
  color: #9ca3af;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 32px;
  color: #9ca3af;
  border-top: 1px solid rgba(156, 163, 175, 0.18);
}

@keyframes glowPulse {
  from {
    transform: scale(0.92);
    opacity: 0.68;
  }
  to {
    transform: scale(1.08);
    opacity: 1;
  }
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .top-search {
    margin-left: auto;
  }

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

  .hero-slider {
    min-height: 420px;
  }

  .hero-card {
    height: 420px;
  }

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

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

@media (max-width: 820px) {
  .nav-shell {
    height: auto;
    min-height: 70px;
    padding: 12px 16px;
  }

  .brand-text small {
    display: none;
  }

  .top-search {
    display: none;
  }

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

  .mobile-search input {
    flex: 1;
  }

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

  .hero-inner {
    padding: 54px 18px 78px;
  }

  .hero-title {
    font-size: 46px;
  }

  .hero-desc {
    font-size: 17px;
  }

  .section,
  .page-hero .section {
    padding: 48px 18px;
  }

  .section.full > .section-inner {
    padding: 0 18px;
  }

  .section-heading {
    display: block;
  }

  .section-heading .more-link {
    margin-top: 14px;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-shell {
    padding: 24px 18px 54px;
  }

  .detail-card,
  .text-card {
    padding: 20px;
  }

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

@media (max-width: 560px) {
  .brand-mark,
  .footer-brand span {
    width: 40px;
    height: 40px;
  }

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

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

  .hero-card-content h2 {
    font-size: 22px;
  }

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

  .movie-card.horizontal,
  .rank-row,
  .compact-card {
    align-items: flex-start;
  }

  .movie-card.horizontal .poster-wrap {
    width: 110px;
    min-width: 110px;
  }

  .rank-row img {
    display: none;
  }

  .rank-score {
    font-size: 18px;
  }
}
