:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #fff7ed;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --orange: #f97316;
  --red: #ef4444;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --purple: #7c3aed;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 28rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #ffffff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(20px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.28);
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.22);
}

.header-search {
  width: min(330px, 32vw);
  display: flex;
  padding: 5px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 8px 12px;
  color: var(--text);
  background: transparent;
}

.header-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 15px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 10px;
  background: #0f172a;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  margin-bottom: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 14%, rgba(249, 115, 22, 0.58), transparent 32rem),
    radial-gradient(circle at 88% 0%, rgba(37, 99, 235, 0.55), transparent 34rem),
    linear-gradient(135deg, #0f172a 0%, #111827 54%, #1e1b4b 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.4) 58%, rgba(15, 23, 42, 0.82)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.9));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: -40px;
  opacity: 0.18;
  background-position: center;
  background-size: cover;
  filter: blur(12px) saturate(1.3);
  transform: scale(1.08);
  transition: opacity 0.3s ease;
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  align-items: center;
  padding: 74px 0 60px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 54px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeRise 0.55s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 24px 0 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-title {
  margin: 20px 0 0;
  font-size: clamp(30px, 4.5vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 710px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.9;
}

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

.btn-primary,
.btn-ghost,
.section-more,
.category-card-body span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: all 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.3);
}

.btn-primary:hover,
.section-more:hover,
.category-card:hover .category-card-body span {
  transform: translateY(-2px);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  background: #ffedd5;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.16);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.42), rgba(37, 99, 235, 0.42)),
    #111827;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.42);
}

.hero-poster img,
.poster-link img,
.category-thumbs img {
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.hero-meta-panel {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.hero-meta-panel strong {
  display: block;
  margin-bottom: 4px;
}

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

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

.hero-dot.is-active {
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.content-section,
.page-hero,
.detail-layout,
.player-card,
.related-block,
.filter-panel,
.search-panel {
  margin: 34px auto;
}

.page-hero {
  padding: 46px;
  border-radius: var(--radius);
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.38), transparent 28rem),
    linear-gradient(135deg, #111827, #1e1b4b 58%, #7c2d12);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-more {
  min-height: 40px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(37, 99, 235, 0.3)),
    #e2e8f0;
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: auto;
  right: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.play-dot {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.35);
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.2s ease;
}

.movie-card:hover .play-dot {
  transform: translateY(0);
  opacity: 1;
}

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

.movie-card-title {
  display: block;
  min-height: 44px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card-title:hover {
  color: var(--orange);
}

.movie-card-meta {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 13px;
}

.movie-card-desc {
  min-height: 48px;
  margin: 10px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}

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

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

.category-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(37, 99, 235, 0.25));
}

.category-thumbs img {
  min-width: 0;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0;
  font-size: 24px;
}

.category-card-body p {
  min-height: 54px;
  margin: 10px 0 18px;
  color: #64748b;
  line-height: 1.75;
}

.category-card-body span {
  min-height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.filter-panel,
.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 15px;
  outline: 0;
  padding: 0 14px;
  color: #0f172a;
  background: #ffffff;
}

.rank-board {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 26px;
  align-items: start;
}

.rank-list-card {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-list-card h2 {
  margin: 0 0 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.rank-item:last-child {
  border-bottom: 0;
}

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

.rank-title {
  min-width: 0;
  font-weight: 850;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: #64748b;
  font-size: 13px;
}

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

.detail-poster {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(37, 99, 235, 0.28)),
    #e2e8f0;
  box-shadow: var(--shadow);
}

.detail-poster img {
  object-fit: cover;
}

.detail-main {
  min-width: 0;
}

.detail-main h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #475569;
  font-weight: 800;
  background: #f1f5f9;
}

.detail-summary,
.detail-review {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.07);
}

.detail-summary h2,
.detail-review h2,
.related-block h2,
.player-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-summary p,
.detail-review p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 2;
}

.player-card {
  padding: 22px;
  border-radius: 30px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.player-card h2 {
  color: #ffffff;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #030712;
}

.main-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(249, 115, 22, 0.38), transparent 16rem),
    rgba(2, 6, 23, 0.46);
}

.play-overlay.is-hidden {
  display: none;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 25px 55px rgba(239, 68, 68, 0.4);
}

.related-block {
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
}

.search-results-empty {
  display: none;
  margin: 24px 0;
  padding: 28px;
  border-radius: 22px;
  color: #64748b;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.site-footer {
  margin-top: 56px;
  padding: 38px 0;
  color: #cbd5e1;
  background: #0f172a;
}

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #e2e8f0;
}

.image-missing {
  opacity: 0;
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .header-search {
    display: none;
  }

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

  .main-nav {
    position: fixed;
    left: 18px;
    right: 18px;
    top: 82px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    text-align: center;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 420px;
    margin: 0 auto;
  }

  .rank-board,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-list-card,
  .detail-poster {
    position: relative;
    top: auto;
  }

  .filter-panel,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }
}

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

  .hero {
    min-height: 620px;
  }

  .hero-inner {
    min-height: 620px;
    padding: 46px 0;
  }

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

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .page-hero {
    padding: 28px;
  }

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

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

  .movie-card-desc {
    display: none;
  }

  .tag-row span:nth-child(n+3) {
    display: none;
  }

  .category-thumbs {
    height: 120px;
  }

  .detail-summary,
  .detail-review,
  .related-block,
  .player-card {
    padding: 18px;
  }

  .play-overlay span {
    width: 74px;
    height: 74px;
  }
}
