:root {
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --line: rgba(15, 23, 42, 0.12);
  --paper: #ffffff;
  --cloud: #f8fafc;
  --deep: #0f172a;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #eff6ff 42%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(239, 246, 255, 0.94), rgba(255, 251, 235, 0.94));
  border-bottom: 1px solid rgba(217, 119, 6, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.header-shell {
  width: min(1240px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark,
.footer-brand span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--blue));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.25);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 21px;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

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

.nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-panel input {
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 16px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.filter-reset {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 800;
}

.header-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--blue));
  box-shadow: 0 15px 36px rgba(37, 99, 235, 0.22);
}

.ghost-btn,
.filter-reset {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.16);
  color: var(--ink);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(217, 119, 6, 0.18);
  background: rgba(255, 255, 255, 0.96);
  padding: 16px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 14px;
  color: #374151;
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
  background: #fef3c7;
  color: var(--amber);
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  margin: 28px 0 66px;
}

.hero-slider {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #111827, #1e3a8a);
}

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

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

.hero-media,
.hero-media img,
.hero-layer {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.38), rgba(37, 99, 235, 0.44));
}

img.image-miss {
  opacity: 0;
}

.poster-wrap,
.category-backdrop,
.hero-media,
.player-poster {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.28), transparent 20%),
    linear-gradient(135deg, rgba(217, 119, 6, 0.72), rgba(37, 99, 235, 0.74));
}

.hero-layer {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 52%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 68px);
  right: clamp(24px, 5vw, 68px);
  bottom: clamp(34px, 7vw, 82px);
  color: #ffffff;
  max-width: 760px;
}

.eyebrow,
.card-meta,
.detail-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.eyebrow span,
.card-meta span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 800;
}

.eyebrow span {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
}

.hero h1,
.hero h2.hero-title {
  margin: 16px 0 12px;
  line-height: 1.05;
  font-size: clamp(38px, 6vw, 70px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h2:not(.hero-title) {
  margin: 16px 0 12px;
  line-height: 1.05;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h2.hero-title {
  font-size: clamp(28px, 4vw, 46px);
}

.hero p {
  max-width: 760px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 21px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, opacity 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.hero-rail {
  display: grid;
  gap: 18px;
}

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

.section-kicker {
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.section-head h1,
.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-head a {
  flex: none;
  color: var(--blue);
  font-weight: 800;
}

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

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

.poster-card,
.wide-card,
.rank-row,
.category-card,
.info-panel,
.filter-panel,
.search-panel,
.player-box {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(14px);
}

.poster-card,
.wide-card,
.rank-row {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-card:hover,
.wide-card:hover,
.rank-row:hover,
.category-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.poster-card .poster-wrap {
  aspect-ratio: 3 / 4.15;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.poster-card:hover img,
.wide-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.poster-gradient {
  position: absolute;
  inset: 38% 0 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.corner-badge,
.play-chip {
  position: absolute;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.corner-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.62);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--blue));
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.26);
}

.poster-body,
.wide-body {
  padding: 16px;
}

.card-meta span {
  color: var(--blue);
  background: rgba(219, 234, 254, 0.8);
}

.poster-body h3,
.wide-body h3,
.rank-body h3 {
  margin: 10px 0 7px;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 900;
}

.poster-body p,
.wide-body p,
.rank-body p {
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-stats {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.wide-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

.wide-poster {
  min-height: 160px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
}

.category-backdrop,
.category-backdrop img,
.category-overlay {
  position: absolute;
  inset: 0;
}

.category-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overlay {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(37, 99, 235, 0.42)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent);
}

.category-card strong,
.category-card em {
  position: relative;
  display: block;
}

.category-card strong {
  font-size: 24px;
  font-weight: 900;
}

.category-card em {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin-bottom: 58px;
}

.rank-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 18px;
  padding: 12px;
}

.rank-poster {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
}

.rank-score {
  display: grid;
  justify-items: end;
  color: var(--muted);
  font-weight: 800;
}

.rank-score strong {
  color: var(--amber);
  font-size: 28px;
  line-height: 1;
}

.page-hero {
  margin: 28px 0 34px;
  padding: 36px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.22), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.20), transparent 32%),
    rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.filter-panel,
.search-panel {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 24px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px auto;
  gap: 12px;
}

.search-panel {
  display: grid;
  gap: 12px;
}

.search-panel input {
  width: 100%;
  font-size: 18px;
  padding: 14px 20px;
}

.result-text {
  color: var(--muted);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 390px;
  gap: 26px;
  margin-top: 30px;
}

.player-box {
  overflow: hidden;
  border-radius: 30px;
}

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

.player-frame video,
.player-poster,
.player-shade {
  position: absolute;
  inset: 0;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

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

.player-shade {
  z-index: 2;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  gap: 10px;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.player-button span:first-child {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--blue));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
  font-size: 34px;
}

.player-button span:last-child {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 900;
}

.player-frame.playing .player-poster,
.player-frame.playing .player-shade,
.player-frame.playing .player-button {
  display: none;
}

.player-message {
  min-height: 24px;
  padding: 12px 18px;
  color: #475569;
  background: #f8fafc;
  font-weight: 700;
}

.detail-title {
  margin: 22px 0;
}

.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
  color: var(--blue);
  background: rgba(219, 234, 254, 0.75);
}

.breadcrumbs {
  margin-bottom: 16px;
}

.info-panel {
  border-radius: 26px;
  padding: 22px;
  margin-bottom: 24px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.info-panel p {
  margin: 0;
  color: #374151;
}

.detail-side {
  position: sticky;
  top: 96px;
  align-self: start;
}

.meta-table {
  display: grid;
  gap: 10px;
}

.meta-table div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding-bottom: 10px;
}

.meta-table span {
  color: var(--muted);
}

.meta-table strong {
  text-align: right;
}

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

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

.next-links a {
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
  color: var(--blue);
  font-weight: 800;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #0f172a 55%, #020617);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 52px 0;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 16px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.site-footer a {
  display: block;
  color: #cbd5e1;
  margin: 8px 0;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 18px 0 28px;
  color: #94a3b8;
}

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

@media (max-width: 1180px) {
  .hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

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

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 680px) {
  .header-shell,
  .page-shell,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1240px);
  }

  .brand-text small {
    display: none;
  }

  .hero-slider {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
  }

  .hero-rail,
  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .related-grid,
  .filter-bar,
  .footer-grid,
  .next-links {
    grid-template-columns: 1fr;
  }

  .wide-card,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-score {
    justify-items: start;
  }

  .page-hero {
    padding: 24px;
  }
}
