* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: #263449;
  --line: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --gold: #f59e0b;
  --gold-soft: #fbbf24;
  --black: #020617;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 28%), var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.nav-row {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-copy strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.brand-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
}

.desktop-nav a,
.mobile-panel nav a,
.site-footer a {
  transition: color 0.22s ease, background 0.22s ease;
}

.desktop-nav a:hover,
.mobile-panel nav a:hover,
.site-footer a:hover {
  color: var(--gold);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-search input,
.search-main input,
.filter-bar input {
  width: 260px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #111c31;
  color: var(--text);
  padding: 11px 44px 11px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-main input:focus,
.filter-bar input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
  background: #0b1324;
}

.header-search button {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.header-search button:hover {
  color: var(--gold);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
  padding: 16px;
}

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-search input {
  width: 100%;
  padding-right: 14px;
}

.mobile-search button,
.search-main button {
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #111827;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-panel nav {
  display: grid;
  gap: 6px;
}

.mobile-panel nav a {
  padding: 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.55);
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--black);
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  background: linear-gradient(to top, var(--bg) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 96px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--gold);
  color: #101827;
  font-size: 13px;
  font-weight: 850;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-actions,
.detail-meta,
.meta-row,
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 850;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  background: var(--gold);
  color: #111827;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.26);
}

.btn-primary:hover,
.mobile-search button:hover,
.search-main button:hover {
  background: var(--gold-soft);
}

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

.btn-ghost {
  border: 1px solid rgba(203, 213, 225, 0.34);
  background: rgba(15, 23, 42, 0.48);
  color: #fff;
  backdrop-filter: blur(12px);
}

.hero-tags {
  margin-top: 18px;
}

.hero-tags a,
.hero-tags span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.68);
  color: #dbe4ef;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.76);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--gold);
}

.hero-quick-links {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: -78px;
  padding-bottom: 28px;
}

.hero-quick-links a {
  padding: 10px 14px;
  border: 1px solid rgba(203, 213, 225, 0.18);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.74);
  color: #e2e8f0;
  backdrop-filter: blur(16px);
}

.hero-quick-links a:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: var(--gold);
}

.page-stack {
  padding: 54px 0 72px;
}

.content-section {
  margin-top: 64px;
}

.content-section:first-child {
  margin-top: 0;
}

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

.section-head h2,
.related-column h2,
.info-card h2,
.site-footer h2 {
  margin: 0;
  color: #fff;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.section-head p,
.site-footer p,
.search-count {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-head a {
  min-width: max-content;
  color: var(--gold);
  font-weight: 800;
}

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

.movie-card,
.list-card,
.category-card,
.rank-row {
  background: var(--panel);
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.movie-card {
  display: block;
}

.movie-card:hover,
.list-card:hover,
.category-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.12), var(--shadow);
}

.poster-frame,
.list-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-frame {
  aspect-ratio: 16 / 10;
}

.card-large .poster-frame {
  aspect-ratio: 16 / 11;
}

.poster-frame img,
.list-poster img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-frame img,
.list-card:hover .list-poster img {
  transform: scale(1.08);
}

.poster-frame em,
.list-poster em {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.74);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.card-body,
.list-info {
  display: block;
  padding: 16px;
}

.card-body strong,
.list-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.card-large .card-body strong {
  font-size: 22px;
}

.movie-card:hover strong,
.list-card:hover strong {
  color: var(--gold);
}

.card-body small,
.list-info small {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-large .card-body small {
  min-height: 68px;
  -webkit-line-clamp: 3;
}

.meta-row b,
.meta-row span,
.detail-meta span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.92);
  color: #dbe4ef;
  font-size: 12px;
  font-weight: 650;
}

.meta-row b,
.gold-pill {
  color: #111827 !important;
  background: var(--gold) !important;
  font-weight: 850 !important;
}

.featured-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 24px;
}

.side-list {
  display: grid;
  gap: 16px;
}

.list-card {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 0;
}

.list-poster {
  min-height: 118px;
}

.list-info {
  padding: 13px 14px;
}

.list-info small {
  min-height: auto;
  margin: 8px 0 10px;
}

.rail-wrap {
  position: relative;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 286px;
}

.rail-button {
  position: absolute;
  top: 45%;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.92);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rail-wrap:hover .rail-button {
  opacity: 1;
}

.rail-left {
  left: -16px;
}

.rail-right {
  right: -16px;
}

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

.category-card {
  display: block;
  padding: 22px;
  min-height: 154px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
}

.category-card span {
  display: block;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.inner-page {
  padding: 34px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #cbd5e1;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb span::before {
  content: "/";
  margin-right: 10px;
  color: var(--muted-2);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.76);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(28px, 5vw, 54px);
  margin-bottom: 30px;
}

.compact-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
  filter: blur(8px);
}

.compact-hero h1 {
  position: relative;
  z-index: 1;
  margin: 18px 0 10px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.compact-hero p {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.filter-bar,
.search-panel {
  margin-bottom: 24px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.62);
  padding: 16px;
}

.filter-bar input {
  width: min(100%, 520px);
  padding-right: 14px;
}

.search-main {
  display: flex;
  gap: 12px;
}

.search-main input {
  width: min(100%, 600px);
  padding-right: 14px;
}

.search-main button {
  min-height: 46px;
}

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

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

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--gold);
  font-weight: 950;
}

.rank-row img {
  height: 78px;
  border-radius: 12px;
}

.rank-info strong,
.rank-info small,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: #fff;
  font-size: 18px;
  margin-bottom: 6px;
}

.rank-info small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-info em {
  margin-top: 8px;
  color: var(--gold);
  font-style: normal;
  font-size: 13px;
}

.detail-grid {
  align-items: start;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #111827;
  font-size: 32px;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.36);
  transition: transform 0.22s ease, background 0.22s ease;
}

.play-overlay:hover span {
  transform: scale(1.06);
  background: var(--gold-soft);
}

.player-box.player-started .play-overlay {
  display: none;
}

.player-error {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-weight: 800;
}

.detail-copy {
  padding-top: 28px;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.detail-meta {
  margin-bottom: 20px;
}

.info-card {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.78);
}

.info-card h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  white-space: pre-line;
}

.info-card p + p {
  margin-top: 12px;
}

.info-card .lead-text {
  color: #dbe4ef;
  font-weight: 700;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.related-column {
  position: sticky;
  top: 100px;
  min-width: 0;
}

.related-column h2 {
  margin-bottom: 16px;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.78);
  background: #0b1120;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

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

.site-footer a {
  color: var(--muted);
}

.footer-bottom {
  border-top: 1px solid rgba(51, 65, 85, 0.54);
  color: var(--muted-2);
  text-align: center;
  font-size: 14px;
  padding: 18px;
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .related-column {
    position: static;
  }
}

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

  .nav-row {
    height: 66px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy em {
    display: none;
  }

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

  .hero-inner {
    padding-bottom: 110px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-quick-links {
    margin-top: -96px;
  }

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

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

  .list-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .rank-row {
    grid-template-columns: 44px 88px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-row img {
    height: 66px;
  }

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

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

  .hero h1,
  .hero h2 {
    font-size: 34px;
  }

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

  .search-main,
  .mobile-search {
    flex-direction: column;
  }

  .search-main button,
  .mobile-search button {
    min-height: 44px;
  }
}