:root {
  --bg: #090b12;
  --bg-soft: #111827;
  --bg-panel: rgba(17, 24, 39, 0.88);
  --card: rgba(255, 255, 255, 0.07);
  --card-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --brand: #f97316;
  --brand-2: #ef4444;
  --brand-3: #06b6d4;
  --gold: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(239, 68, 68, 0.18), transparent 36rem),
    radial-gradient(circle at 90% 4%, rgba(6, 182, 212, 0.18), transparent 34rem),
    linear-gradient(180deg, #05070c 0%, #0c111d 45%, #090b12 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 76%);
  z-index: -1;
}

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;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 18, 0.78);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--brand-2), var(--brand), var(--brand-3));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

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

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.top-search {
  display: flex;
  align-items: center;
  min-width: 280px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

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

.top-search input::placeholder {
  color: var(--dim);
}

.top-search button,
.primary-btn,
.ghost-btn,
.search-panel button,
.play-overlay {
  border: 0;
  cursor: pointer;
}

.top-search button {
  padding: 8px 16px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: white;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 20px 16px;
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(5, 7, 12, 0.98), rgba(5, 7, 12, 0.68), rgba(5, 7, 12, 0.22)),
    linear-gradient(0deg, rgba(9, 11, 18, 1), transparent 48%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 18%, rgba(249, 115, 22, 0.34), transparent 26rem),
    radial-gradient(circle at 55% 70%, rgba(6, 182, 212, 0.22), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
  gap: 56px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 104px 20px 68px;
}

.hero-copy {
  max-width: 720px;
}

.kicker,
.meta-pill,
.rank-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.13);
  backdrop-filter: blur(12px);
}

.kicker {
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

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

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 16px 38px rgba(249, 115, 22, 0.28);
}

.ghost-btn {
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-panel {
  align-self: stretch;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: 26px;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster div {
  position: absolute;
  inset: auto 18px 18px 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(14px);
}

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

.hero-poster span {
  color: var(--muted);
}

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

.hero-dot {
  flex: 1;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--brand-2), var(--brand), var(--brand-3));
}

.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 38px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 10%, rgba(249, 115, 22, 0.28), transparent 26rem),
    radial-gradient(circle at 86% 20%, rgba(6, 182, 212, 0.22), transparent 20rem),
    rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 860px;
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.section {
  margin-top: 54px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--dim);
}

.section-more {
  display: inline-flex;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.42);
  background: var(--card-strong);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent 48%);
}

.rank-badge,
.play-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  min-height: 32px;
  padding: 0 12px;
  color: white;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: #fed7aa;
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 48px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-row span,
.meta-pill {
  padding: 5px 9px;
  color: #cffafe;
  font-size: 12px;
  background: rgba(6, 182, 212, 0.12);
}

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

.category-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(6, 182, 212, 0.1)),
    rgba(255, 255, 255, 0.07);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.42);
}

.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p,
.category-card li {
  color: var(--muted);
  line-height: 1.7;
}

.category-card ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.category-card li {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 170px 150px;
  gap: 12px;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  color: white;
  background: rgba(0, 0, 0, 0.28);
  padding: 0 14px;
}

.search-panel select option {
  color: #111827;
}

.search-panel button {
  min-height: 46px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
}

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.46));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 18px 46px rgba(249, 115, 22, 0.35);
  font-size: 28px;
  transform: translateX(3px);
}

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

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

.breadcrumb a:hover {
  color: white;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-card p {
  color: #dbe4ef;
  font-size: 17px;
  line-height: 1.9;
}

.side-card {
  padding: 18px;
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.08);
}

.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.related-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.related-item img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  margin-bottom: 4px;
}

.related-item span {
  color: var(--dim);
  font-size: 13px;
}

.link-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.link-row a {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.72);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 20px;
  color: var(--dim);
}

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

.footer-links a:hover {
  color: white;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

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

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

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

  .side-card {
    order: -1;
  }
}

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

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

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 86px;
  }

  .hero-panel {
    max-width: 520px;
  }

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

@media (max-width: 700px) {
  .hero {
    min-height: 760px;
  }

  .hero-content,
  .page-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero {
    padding: 26px;
    border-radius: 26px;
  }

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

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

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

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

  .movie-card p {
    min-height: auto;
  }

  .detail-card {
    padding: 22px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 360px;
  }
}
