:root {
  --page-bg: #030712;
  --panel-bg: rgba(17, 24, 39, 0.78);
  --panel-solid: #111827;
  --soft-panel: rgba(31, 41, 55, 0.72);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(245, 158, 11, 0.35);
  --text: #f9fafb;
  --muted: #9ca3af;
  --muted-strong: #d1d5db;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #ea580c;
  --red: #dc2626;
  --green: #10b981;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.18), transparent 30%),
    radial-gradient(circle at 78% 0%, rgba(234, 88, 12, 0.16), transparent 34%),
    linear-gradient(180deg, #030712 0%, #0b1120 48%, #030712 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.28);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted-strong);
  font-weight: 700;
}

.main-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--amber-light);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--text);
  background: var(--soft-panel);
}

.mobile-nav {
  display: none;
  padding: 0 0 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--muted-strong);
  border-top: 1px solid var(--line);
}

.hero {
  position: relative;
  padding: 48px 0 58px;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 36px;
  background: rgba(17, 24, 39, 0.55);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: 36px;
  align-items: center;
  min-height: 620px;
  padding: 58px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
  opacity: 0.26;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.78) 50%, rgba(3, 7, 18, 0.52)),
    radial-gradient(circle at 25% 20%, rgba(245, 158, 11, 0.32), transparent 34%),
    radial-gradient(circle at 82% 15%, rgba(234, 88, 12, 0.24), transparent 28%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.10);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero h1 span,
.gradient-title {
  background: linear-gradient(90deg, #fff 0%, var(--amber-light) 42%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.25);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary:hover {
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.35);
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 700;
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
}

.poster-frame {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: #111827;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poster-frame:hover img {
  transform: scale(1.04);
}

.hero-card-note {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted-strong);
  background: rgba(17, 24, 39, 0.76);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 58px;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot,
.hero-arrow {
  border: 0;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dot.is-active {
  width: 32px;
  opacity: 1;
  background: linear-gradient(90deg, var(--amber-light), var(--orange));
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto auto;
  gap: 12px;
  margin: -28px auto 54px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.input,
.select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(3, 7, 18, 0.68);
  outline: none;
}

.input {
  padding: 0 16px;
}

.select {
  padding: 0 42px 0 14px;
}

.input:focus,
.select:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.10);
}

.section {
  padding: 34px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(31, 41, 55, 0.86);
}

.card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card-poster {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.card-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-badges {
  position: absolute;
  inset: 12px 12px auto 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  font-size: 12px;
  font-weight: 900;
}

.badge-dark {
  color: var(--text);
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(10px);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.58;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted-strong);
  font-size: 13px;
}

.rank-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--amber));
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.25);
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 70% 0%, rgba(245, 158, 11, 0.18), transparent 34%),
    rgba(17, 24, 39, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
}

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

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  padding: 58px 0 34px;
}

.page-hero-panel {
  position: relative;
  overflow: hidden;
  padding: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.22), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(234, 88, 12, 0.18), transparent 32%),
    rgba(17, 24, 39, 0.72);
  box-shadow: var(--shadow);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
}

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

.breadcrumbs a {
  color: var(--amber-light);
}

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

.detail-main,
.detail-side,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(17, 24, 39, 0.78);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.22);
}

.detail-main {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #000;
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  cursor: pointer;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 22px 48px rgba(245, 158, 11, 0.32);
}

.play-button span {
  display: block;
  margin-left: 6px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 24px solid currentColor;
}

.detail-body {
  padding: 26px;
}

.detail-title h1 {
  font-size: clamp(32px, 4.5vw, 58px);
}

.detail-text {
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.9;
}

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

.info-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.info-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.info-value {
  display: block;
  margin-top: 5px;
  font-weight: 850;
}

.detail-side {
  padding: 20px;
}

.side-poster {
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
}

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

.side-block {
  margin-top: 20px;
}

.side-block h2,
.content-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.side-link {
  display: block;
  padding: 12px 0;
  color: var(--muted-strong);
  border-top: 1px solid var(--line);
}

.side-link:hover {
  color: var(--amber-light);
}

.content-panel {
  margin-top: 24px;
  padding: 24px;
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
  background: rgba(17, 24, 39, 0.74);
}

.site-footer {
  margin-top: 58px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(3, 7, 18, 0.68);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
}

.footer-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 18px;
}

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

.footer-list a:hover {
  color: var(--amber-light);
}

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

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

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

  .hero-poster {
    justify-self: start;
    width: min(280px, 58vw);
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
  }

  .logo {
    font-size: 20px;
  }

  .main-nav {
    display: none;
  }

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

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

  .hero {
    padding-top: 24px;
  }

  .hero-stage,
  .hero-slide {
    min-height: 760px;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero-controls {
    left: 28px;
    bottom: 24px;
  }

  .quick-search,
  .toolbar {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }

  .page-hero-panel {
    padding: 28px;
  }

  .info-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero-stage,
  .hero-slide {
    min-height: 820px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    letter-spacing: -0.04em;
  }
}
