:root {
  --bg: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --white: #ffffff;
  --amber: #b45309;
  --amber-dark: #92400e;
  --amber-soft: #fef3c7;
  --rose: #e11d48;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #fffbeb, #ffffff, #fff7ed);
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
}

.header-inner {
  max-width: 1240px;
  height: 82px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  box-shadow: 0 12px 26px rgba(180, 83, 9, 0.35);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--amber-dark), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--amber);
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: var(--amber-dark);
}

.nav-link:hover::after {
  width: 100%;
}

.search-box {
  position: relative;
  width: 230px;
  flex-shrink: 0;
}

.search-box input,
.local-filter input {
  width: 100%;
  border: 1px solid #f3d9a4;
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.search-box input:focus,
.local-filter input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-height: 430px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #f3d9a4;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
}

.search-results.active {
  display: block;
}

.search-results a {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  align-items: center;
}

.search-results a:hover {
  background: #fff7ed;
}

.search-results img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.search-results strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.search-results small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-soft);
  color: var(--amber-dark);
  font-size: 24px;
}

.mobile-menu {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid #f3e5c4;
  background: #ffffff;
}

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

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.38), transparent 25%), radial-gradient(circle at 80% 10%, rgba(244, 63, 94, 0.18), transparent 30%), linear-gradient(135deg, #fef3c7, #fff7ed 45%, #fff1f2);
}

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

.hero-inner,
.section-inner,
.footer-inner,
.page-hero-inner,
.detail-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.hero-inner {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  gap: 50px;
  align-items: center;
}

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

.hero-slide {
  display: none;
}

.hero-slide.active {
  display: block;
  animation: fadeUp 0.5s ease both;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--amber-dark);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 25px rgba(180, 83, 9, 0.12);
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--amber), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 28px;
  color: #4b5563;
  font-size: 20px;
  line-height: 1.8;
}

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

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--amber-dark));
  box-shadow: 0 14px 30px rgba(180, 83, 9, 0.3);
}

.btn-secondary {
  color: var(--amber-dark);
  background: #ffffff;
  border: 2px solid #fde68a;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.btn-light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.16);
}

.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hero-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transform: translateZ(0);
}

.hero-card:nth-child(2),
.hero-card:nth-child(3) {
  transform: translateY(28px);
}

.hero-card img,
.movie-card img,
.category-tile img,
.rank-item img,
.detail-poster img,
.related-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-card::after,
.poster-link::after,
.category-tile .category-mask {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
}

.hero-card-info {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #ffffff;
  z-index: 2;
}

.hero-card-info strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.hero-card-info small {
  display: block;
  margin-top: 4px;
  color: #fde68a;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.hero-dots button {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(146, 64, 14, 0.25);
}

.hero-dots button.active {
  background: var(--amber);
}

.section {
  padding: 78px 0;
}

.section.white {
  background: #ffffff;
}

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

.section.dark {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

.section-head.center {
  display: block;
  text-align: center;
}

.section h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.dark .section-head p,
.dark p {
  color: #d1d5db;
}

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

.feature-card {
  text-align: center;
  padding: 28px 20px;
  background: #ffffff;
  border: 1px solid #f8e4bd;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: var(--amber-dark);
  font-size: 28px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

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

.movie-card,
.related-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  display: block;
  position: relative;
  height: 320px;
  overflow: hidden;
}

.poster-link img {
  height: 100%;
}

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 44px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge,
.related-card:hover .play-badge {
  opacity: 1;
  transform: scale(1);
}

.year-badge,
.hot-badge {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.hot-badge {
  left: 14px;
  right: auto;
  background: var(--rose);
}

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

.movie-card h3,
.related-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.related-card h3 a:hover {
  color: var(--amber-dark);
}

.movie-card p,
.related-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 48px;
  overflow: hidden;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--amber-dark);
  font-size: 14px;
  font-weight: 800;
}

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

.tag-row span,
.meta-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--amber-dark);
  font-size: 12px;
  font-weight: 700;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 132px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--rose);
  font-weight: 900;
}

.rank-item img {
  width: 92px;
  height: 104px;
  border-radius: 14px;
}

.rank-info strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.rank-info small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.rank-item em {
  color: var(--amber-dark);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.category-text {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
  color: #ffffff;
  text-align: center;
}

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

.category-text small {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.page-hero {
  position: relative;
  padding: 76px 0;
  color: #ffffff;
  background: linear-gradient(100deg, var(--amber), var(--rose));
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero p {
  max-width: 740px;
  color: #fffbeb;
}

.toolbar {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

.local-filter {
  width: min(100%, 420px);
}

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

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

.detail-page {
  background: linear-gradient(180deg, #fff7ed, #f9fafb 420px);
}

.detail-inner {
  padding-top: 44px;
  padding-bottom: 80px;
}

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

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

.detail-poster img {
  height: 500px;
}

.detail-title h1 {
  margin-bottom: 18px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.detail-summary {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.detail-summary h2,
.player-section h2,
.related-section h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-summary p {
  margin: 0 0 18px;
  color: #374151;
  line-height: 1.9;
  font-size: 17px;
}

.player-section,
.related-section {
  margin-top: 42px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.35);
  cursor: pointer;
}

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

.player-cover button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
}

.player-message {
  display: none;
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 5;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  font-weight: 700;
}

.player-message.active {
  display: inline-flex;
}

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

.related-card .poster-link {
  height: 230px;
}

.related-card div:last-child {
  padding: 16px;
}

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

.footer-inner {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  font-size: 22px;
  color: #fbbf24;
}

.footer-inner p {
  margin: 8px 0 0;
  color: #d1d5db;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.footer-links a {
  color: #e5e7eb;
  font-weight: 700;
}

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

.no-match {
  display: none;
  padding: 44px;
  text-align: center;
  color: var(--muted);
  border-radius: 24px;
  background: #ffffff;
}

.no-match.active {
  display: block;
}

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

@media (max-width: 1180px) {
  .nav-menu {
    display: none;
  }
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .search-box {
    margin-left: auto;
  }
}

@media (max-width: 980px) {
  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .hero-inner {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .hero-visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .movie-grid,
  .feature-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rank-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: auto;
    min-height: 74px;
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand-text strong {
    font-size: 20px;
  }
  .search-box {
    order: 3;
    width: 100%;
  }
  .search-results {
    width: 100%;
    left: 0;
    right: 0;
  }
  .hero h1 {
    font-size: 42px;
  }
  .hero p {
    font-size: 17px;
  }
  .hero-visual,
  .movie-grid,
  .feature-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
  .hero-card:nth-child(2),
  .hero-card:nth-child(3) {
    transform: none;
  }
  .section-head,
  .toolbar,
  .footer-inner {
    display: block;
  }
  .section-actions,
  .footer-links {
    margin-top: 18px;
  }
  .rank-item {
    grid-template-columns: 38px 74px 1fr;
  }
  .rank-item em {
    grid-column: 3;
  }
  .rank-item img {
    width: 74px;
    height: 92px;
  }
  .detail-poster img {
    height: auto;
  }
  .poster-link {
    height: 280px;
  }
}
