:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #ea580c;
  --amber: #fbbf24;
  --slate: #111827;
  --slate-soft: #1f2937;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --bg: #f9fafb;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 36%, #fff7ed 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
  box-shadow: 0 6px 24px rgba(17, 24, 39, 0.06);
}

.navbar {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 66px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #ea580c);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.05);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #374151;
  font-weight: 700;
}

.nav-links a {
  transition: color 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
}

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 22px 16px;
  border-top: 1px solid #f3f4f6;
}

.mobile-panel a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-panel a:hover {
  color: var(--red);
  background: #fef2f2;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.7s ease, transform 1s ease;
  pointer-events: none;
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.66) 42%, rgba(17, 24, 39, 0.24) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.75), rgba(17, 24, 39, 0.06));
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.36;
  background-image: radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.42), transparent 26%), radial-gradient(circle at 72% 16%, rgba(220, 38, 38, 0.32), transparent 26%);
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 1240px;
  height: 560px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 740px;
  color: #fff;
}

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

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 950;
}

.hero h1 span {
  color: #fde047;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

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

.hero-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.26);
}

.btn-primary:hover,
.btn-light:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.btn-light {
  color: var(--red);
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px;
}

.section {
  padding: 54px 0;
}

.section-tight {
  padding: 34px 0;
}

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

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: -0.035em;
}

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

.search-card {
  margin-top: -44px;
  position: relative;
  z-index: 8;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-row {
  display: flex;
  gap: 14px;
}

.search-row input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  color: #111827;
  background: #fff;
  outline: none;
}

.search-row input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
  border-color: var(--red);
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.category-card {
  min-height: 166px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  border: 1px solid rgba(254, 215, 170, 0.9);
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.16);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 950;
}

.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.86);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(17, 24, 39, 0.14);
  border-color: rgba(249, 115, 22, 0.52);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.poster-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.movie-body {
  padding: 14px;
}

.movie-title {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 950;
  color: #111827;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.movie-desc {
  margin: 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  padding: 62px 0 50px;
  color: #fff;
  background:
    radial-gradient(circle at 22% 14%, rgba(251, 191, 36, 0.34), transparent 26%),
    linear-gradient(135deg, #111827 0%, #1f2937 46%, #b91c1c 100%);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 950;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 15px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

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

.ranking-row h2,
.ranking-row h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 950;
}

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

.rank-heat {
  color: var(--red);
  font-weight: 950;
  white-space: nowrap;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
  box-shadow: var(--shadow);
}

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

.detail-panel {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 27px;
  font-weight: 950;
}

.detail-panel p {
  color: #374151;
}

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

.meta-item {
  padding: 12px;
  border-radius: 15px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta-value {
  display: block;
  margin-top: 3px;
  color: #111827;
  font-weight: 950;
}

.player-card {
  margin-top: 32px;
  overflow: hidden;
  border-radius: 24px;
  background: #050505;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.1));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-symbol {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.42);
}

.text-card {
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.text-card h2,
.text-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.text-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

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

.site-footer {
  margin-top: 54px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 28px;
  padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
}

.site-footer p,
.site-footer li {
  color: #9ca3af;
  font-size: 14px;
}

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

.site-footer a:hover {
  color: #f87171;
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(75, 85, 99, 0.9);
  color: #9ca3af;
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

.empty-state.is-visible {
  display: block;
}

@media (max-width: 1180px) {
  .movie-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .hero,
  .hero-inner {
    min-height: 520px;
    height: 520px;
  }

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

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

  .detail-layout,
  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 360px;
  }

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

@media (max-width: 640px) {
  .navbar {
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

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

  .hero-control {
    display: none;
  }

  .container {
    padding: 0 16px;
  }

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

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

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

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

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

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