:root {
  --bg: #f9fafb;
  --paper: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --red: #ef4444;
  --red-dark: #dc2626;
  --orange: #f97316;
  --amber: #f59e0b;
  --dark: #111827;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.18);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.26);
}

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

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

.nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

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

.top-search input,
.mobile-search input,
.filter-input,
.filter-select,
.search-hero-input {
  border: 1px solid #d1d5db;
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 230px;
  padding: 9px 14px;
}

.top-search button,
.mobile-search button,
.search-hero button,
.filter-button,
.hero-button,
.section-more {
  border: 0;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.filter-button:hover,
.hero-button:hover,
.section-more:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
}

.top-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus,
.search-hero-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #111827;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  padding: 10px 4px;
  color: #374151;
  font-weight: 700;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 52%, #fefce8 100%);
  padding: 72px 0 64px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.18;
  animation: pulseGlow 6s ease-in-out infinite;
}

.hero::before {
  left: -120px;
  top: -120px;
  background: var(--red);
}

.hero::after {
  right: -90px;
  bottom: -110px;
  background: var(--orange);
  animation-delay: 1.4s;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.14;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.22;
  }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 48px;
  align-items: center;
}

.eyebrow,
.hero-badge,
.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red-dark);
  background: #fee2e2;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero h1 span,
.page-hero h1 span {
  color: var(--red);
}

.hero-copy p,
.page-hero p,
.detail-title p {
  max-width: 650px;
  color: #4b5563;
  font-size: 18px;
}

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

.hero-button.secondary {
  color: #374151;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.hero-button.secondary:hover {
  color: var(--red);
  background: #fff;
}

.hero-slider {
  position: relative;
  min-height: 430px;
  border-radius: 26px;
  box-shadow: var(--shadow-xl);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.hero-slide.active img {
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.12));
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  padding: 32px;
}

.hero-slide-content strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.hero-slide-content p {
  max-width: 560px;
  margin: 0 0 18px;
  color: #e5e7eb;
}

.hero-tags,
.detail-meta,
.breadcrumbs,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.rank-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.56);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(239, 68, 68, 0.9);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 16px;
}

.hero-next {
  right: 16px;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 32px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}

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

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

.quick-panel {
  padding: 28px 0;
  background: #fff;
}

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

.quick-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: var(--shadow-sm);
}

.quick-card strong {
  display: block;
  font-size: 18px;
}

.quick-card span {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 58px 0;
}

.section-muted {
  background: #fff;
}

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

.section-head h2 {
  margin: 10px 0 6px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  max-width: 660px;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.28);
  box-shadow: var(--shadow-xl);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 62%);
  opacity: 0.82;
}

.card-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta,
.card-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #d1d5db;
}

.movie-card h3 {
  min-height: 52px;
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

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

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.card-bottom {
  justify-content: space-between;
  color: #374151;
}

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

.tag-row span,
.tag-link {
  color: #991b1b;
  background: #fee2e2;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 118px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rank-no {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 14px;
  font-weight: 900;
}

.rank-item img {
  width: 118px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-item p {
  margin: 0 0 8px;
  color: var(--muted);
}

.rank-link {
  color: #fff;
  background: var(--dark);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
}

.rank-link:hover {
  background: var(--red);
}

.category-tile {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 22px;
  color: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.category-tile img,
.category-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-tile img {
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-cover {
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.22));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile div {
  position: relative;
  z-index: 1;
}

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

.category-tile p {
  margin: 0;
  color: #e5e7eb;
  font-size: 14px;
}

.page-hero {
  background: linear-gradient(135deg, #fff 0%, #fff7ed 46%, #fef2f2 100%);
  border-bottom: 1px solid var(--line);
  padding: 58px 0;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px 160px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 24px;
}

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

.breadcrumbs {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumbs a:hover {
  color: var(--red);
}

.detail-hero {
  padding: 42px 0 24px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  border-bottom: 1px solid var(--line);
}

.detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: center;
}

.detail-title h1 {
  font-size: clamp(32px, 4vw, 56px);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow-xl);
}

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

.detail-meta span {
  color: #7f1d1d;
  background: #fee2e2;
}

.player-section {
  padding: 42px 0 18px;
}

.player-card {
  overflow: hidden;
  background: #0f172a;
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
}

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

.movie-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  background: var(--red);
  border-radius: 50%;
  font-size: 26px;
  box-shadow: 0 20px 48px rgba(239, 68, 68, 0.35);
}

.movie-player.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

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

.content-card,
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.content-card + .content-card {
  margin-top: 20px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.side-list {
  display: grid;
  gap: 12px;
}

.side-list a {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-list img {
  width: 82px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
}

.side-list strong {
  display: block;
  line-height: 1.35;
}

.side-list span {
  color: var(--muted);
  font-size: 12px;
}

.search-hero {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 28px;
}

.search-hero-input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
}

.search-results {
  min-height: 240px;
}

.site-footer {
  margin-top: 64px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 32px;
}

.footer-brand p {
  max-width: 620px;
  color: #9ca3af;
}

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

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

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 22px;
  color: #9ca3af;
  border-top: 1px solid #1f2937;
}

@media (max-width: 980px) {
  .nav-links,
  .top-search {
    display: none;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 44px 98px minmax(0, 1fr);
  }

  .rank-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

@media (max-width: 640px) {
  .nav-wrap,
  .container,
  .mobile-panel,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero {
    padding: 44px 0;
  }

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

  .hero-slide-content {
    padding: 24px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 16px;
  }

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

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

  .rank-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-item img {
    display: none;
  }

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

  .search-hero {
    flex-direction: column;
  }
}
