:root {
  --page-bg: #f7fafc;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --brand-red: #ef4444;
  --brand-orange: #f97316;
  --brand-pink: #db2777;
  --brand-green: #10b981;
  --brand-emerald: #059669;
  --line-soft: #e5e7eb;
  --card-bg: #ffffff;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 22px 50px rgba(15, 23, 42, 0.15);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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: 60;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  font-size: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.25);
  transition: transform 0.28s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.08) rotate(-3deg);
}

.logo-title {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #dc2626, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-subtitle {
  display: block;
  margin-top: -4px;
  color: var(--text-muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 700;
}

.main-nav a {
  color: #374151;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #059669;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.local-search input,
.search-panel input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 12px 18px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 250px;
  padding: 10px 16px;
}

.header-search input:focus,
.local-search input:focus,
.search-panel input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.header-search button,
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 20px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(90deg, #ef4444, #f97316);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 10px 16px;
}

.btn:hover,
.header-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(239, 68, 68, 0.3);
}

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

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

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.38;
  animation: pulseGlow 5s ease-in-out infinite alternate;
}

.hero::before {
  width: 360px;
  height: 360px;
  left: 7%;
  top: 12%;
  background: rgba(253, 224, 71, 0.42);
}

.hero::after {
  width: 430px;
  height: 430px;
  right: 6%;
  bottom: 10%;
  background: rgba(244, 114, 182, 0.34);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.15), transparent 28%), rgba(0, 0, 0, 0.24);
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  gap: 40px;
  align-items: center;
  min-height: 630px;
  padding: 54px 0;
}

.hero-badge,
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

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

.hero-desc {
  max-width: 670px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.91);
  font-size: 20px;
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags a,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-panel {
  position: relative;
  min-height: 440px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.38);
  background: rgba(255, 255, 255, 0.15);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.hero-card-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.34), transparent);
}

.hero-card-copy h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero-card-copy p {
  display: -webkit-box;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.86);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 34px;
  bottom: 22px;
  display: flex;
  gap: 8px;
}

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

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

.section {
  padding: 64px 0;
}

.section.tint-orange {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
}

.section.tint-green {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.section.tint-purple {
  background: linear-gradient(135deg, #fdf2f8, #f5f3ff);
}

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

.section-title {
  margin: 0;
  font-size: clamp(27px, 4vw, 36px);
  line-height: 1.15;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.view-more {
  color: #ef4444;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card-bg);
  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-hover);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.4s ease;
}

.movie-card:hover .poster img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 58%);
}

.play-mark {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #ef4444;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.duration,
.year-badge {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.64);
}

.year-badge {
  left: 12px;
  right: auto;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

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

.card-meta,
.detail-meta,
.related-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

.card-meta span,
.detail-meta span,
.related-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.category-chip {
  color: #047857;
  border-radius: 999px;
  padding: 3px 9px;
  background: #d1fae5;
  font-weight: 800;
}

.minimal-card {
  min-height: 230px;
}

.minimal-card .poster {
  aspect-ratio: 4 / 3;
}

.large-card {
  display: grid;
  grid-template-columns: 44% 1fr;
}

.large-card .poster {
  height: 100%;
  min-height: 252px;
  aspect-ratio: auto;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 16px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.22);
}

.rank-item:nth-child(n+4) .rank-number {
  color: #6b7280;
  background: #e5e7eb;
  box-shadow: none;
}

.category-card {
  padding: 24px;
  border-radius: 22px;
  color: #fff;
  min-height: 190px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #10b981, #059669);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #8b5cf6, #db2777);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316 48%, #db2777);
}

.page-hero .container {
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

.page-hero h1 {
  margin: 18px 0 14px;
  max-width: 840px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.page-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: #ef4444;
  font-weight: 800;
}

.local-search,
.search-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-row a,
.filter-row button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #047857;
  font-weight: 800;
  background: #d1fae5;
  cursor: pointer;
}

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

.player-card,
.detail-card,
.sidebar-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050505;
}

.player-box video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
  pointer-events: auto;
}

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

.player-start {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #ef4444;
  font-size: 34px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  transition: transform 0.2s ease;
}

.player-start:hover {
  transform: scale(1.08);
}

.player-title-row {
  padding: 22px 24px;
}

.player-title-row h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

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

.detail-card h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-card p {
  margin: 0 0 18px;
  color: #4b5563;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.tag-list span {
  border-radius: 999px;
  padding: 6px 12px;
  color: #047857;
  background: #d1fae5;
  font-weight: 800;
  font-size: 13px;
}

.sidebar-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-card .thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  background: #e5e7eb;
}

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card h3 {
  display: -webkit-box;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 28px;
  padding: 50px 0;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p,
.footer-grid li {
  color: #9ca3af;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.empty-state {
  display: none;
  padding: 34px;
  color: #6b7280;
  text-align: center;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

@keyframes pulseGlow {
  from {
    transform: scale(0.95);
  }
  to {
    transform: scale(1.08);
  }
}

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

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

  .sidebar-card {
    position: static;
  }

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

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

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

  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0 14px;
  }

  .header-search,
  .header-search input {
    width: 100%;
  }

  .header-search button {
    flex: 0 0 auto;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 44px 0;
  }

  .hero-panel {
    min-height: 390px;
  }

  .hero-slide img {
    min-height: 390px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.cards,
  .grid.minimal,
  .grid.categories {
    grid-template-columns: 1fr;
  }

  .large-card {
    grid-template-columns: 1fr;
  }

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

  .rank-number {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .related-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }
}
