:root {
  --dark-950: #1a1f2e;
  --dark-900: #222b3d;
  --dark-850: #28354c;
  --mirror-800: #26384e;
  --realm-500: #d4941f;
  --realm-400: #e8a84d;
  --realm-300: #eec078;
  --text: #f5f7fb;
  --muted: #a7b0c2;
  --border: rgba(255, 255, 255, 0.10);
  --glass: rgba(255, 255, 255, 0.06);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(212, 148, 31, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 10%, rgba(70, 105, 160, 0.22), transparent 24rem),
    linear-gradient(180deg, #101522 0%, var(--dark-950) 42%, #101522 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(17, 22, 34, 0.76);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 76px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #1b2130;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  border-radius: 13px;
  box-shadow: 0 12px 30px rgba(212, 148, 31, 0.28);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--realm-300), var(--realm-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  color: #d7dce7;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--realm-300);
  background: rgba(255, 255, 255, 0.07);
}

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

.header-search {
  width: min(320px, 28vw);
}

.header-search input,
.mobile-search input,
.hero-search input,
.search-page-form input,
.listing-tools input {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  padding: 12px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.search-page-form input:focus,
.listing-tools input:focus {
  border-color: rgba(232, 168, 77, 0.72);
  box-shadow: 0 0 0 4px rgba(232, 168, 77, 0.12);
  background: rgba(255, 255, 255, 0.11);
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  color: #131722;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--border);
}

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

.mobile-nav,
.mobile-categories {
  display: grid;
  gap: 8px;
  margin: 12px auto;
  max-width: 680px;
}

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

.mobile-categories a,
.mobile-nav a {
  padding: 11px 13px;
  color: #d7dce7;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 760px;
  padding-top: 76px;
}

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

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

.hero-bg,
.detail-bg,
.category-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 21, 34, 0.95) 0%, rgba(16, 21, 34, 0.62) 44%, rgba(16, 21, 34, 0.88) 100%),
    linear-gradient(180deg, rgba(16, 21, 34, 0.08) 0%, #101522 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 684px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  padding: 70px 0 150px;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--realm-300);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #d3dae8;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.card-tags,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  color: #f4d59c;
  background: rgba(232, 168, 77, 0.12);
  border: 1px solid rgba(232, 168, 77, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

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

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

.btn-primary {
  color: #131722;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  box-shadow: 0 16px 40px rgba(212, 148, 31, 0.28);
}

.btn-primary:hover,
.btn-ghost:hover,
.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-3px);
}

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

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 118px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  background: var(--realm-400);
  border-color: var(--realm-400);
}

.hero-search-card {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hero-category-links a {
  color: #dbe1ee;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 9px 12px;
}

.section-block {
  padding: 72px 0 0;
}

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

.section-heading h2,
.rank-panel h2,
.content-card h2,
.search-result-head h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.search-result-head p,
.content-card p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

.section-link,
.text-link {
  color: var(--realm-300);
  font-weight: 800;
}

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

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

.movie-card,
.category-card,
.rank-panel,
.content-card,
.category-overview-card,
.rank-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  border-color: rgba(232, 168, 77, 0.45);
  box-shadow: 0 20px 70px rgba(212, 148, 31, 0.18);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.76) 100%);
}

.score-pill,
.rank-badge,
.play-pill {
  position: absolute;
  border-radius: 999px;
  font-weight: 900;
}

.score-pill {
  top: 12px;
  right: 12px;
  padding: 7px 10px;
  color: #141924;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid var(--border);
}

.play-pill {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #141924;
  background: rgba(238, 192, 120, 0.92);
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-pill {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #b6bfce;
  font-size: 13px;
}

.movie-meta-line span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.35);
}

.movie-card h3,
.rank-card h2,
.category-overview-card h2 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.movie-card.compact .movie-card-body {
  padding: 14px;
}

.movie-card.compact h3 {
  font-size: 16px;
}

.movie-card.compact p {
  display: none;
}

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

.category-card {
  position: relative;
  min-height: 200px;
  padding: 22px;
  isolation: isolate;
}

.category-card .category-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--category-image);
  background-size: cover;
  background-position: center;
  opacity: 0.44;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(16, 21, 34, 0.35), rgba(16, 21, 34, 0.92));
}

.category-name {
  display: block;
  margin-top: 72px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.category-desc {
  display: block;
  margin-top: 8px;
  color: #cbd3df;
  line-height: 1.6;
}

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

.rank-panel {
  position: sticky;
  top: 98px;
  align-self: start;
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: #dce4f1;
}

.rank-row img {
  width: 52px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-num,
.rank-score {
  color: var(--realm-300);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero,
.detail-hero {
  position: relative;
  padding-top: 146px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  padding: 70px 0 42px;
}

.compact-hero .page-hero-inner {
  padding-bottom: 28px;
}

.listing-tools {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  max-width: 920px;
}

.single-tool {
  max-width: 620px;
}

.filter-chip {
  color: #dce4f1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 13px;
}

.filter-chip.is-active {
  color: #141924;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  border-color: transparent;
  font-weight: 800;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  min-height: 170px;
}

.category-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

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

.movie-card.is-hidden,
.rank-card.is-hidden {
  display: none;
}

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

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

.rank-card-poster {
  position: relative;
  display: block;
  min-height: 190px;
}

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

.rank-card-poster span {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #141924;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  border-radius: 999px;
  font-weight: 900;
}

.rank-card-body {
  padding: 18px;
}

.rank-card-body p {
  color: var(--muted);
  line-height: 1.7;
}

.rank-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rank-card-foot strong {
  color: var(--realm-300);
  font-size: 28px;
}

.detail-hero {
  min-height: 680px;
  isolation: isolate;
}

.detail-bg {
  z-index: -2;
  background-image: var(--detail-image);
  filter: blur(6px);
  opacity: 0.42;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(16, 21, 34, 0.95), rgba(16, 21, 34, 0.74)),
    linear-gradient(180deg, rgba(16, 21, 34, 0.2), #101522 100%);
}

.detail-hero-inner {
  padding-bottom: 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 26px;
  color: #c8d0dc;
}

.breadcrumb a {
  color: var(--realm-300);
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  max-width: 860px;
}

.detail-meta {
  margin: 18px 0;
  font-size: 15px;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #05070c;
  border: 1px solid rgba(232, 168, 77, 0.2);
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  color: #141924;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-500));
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(212, 148, 31, 0.34);
}

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

.content-card {
  padding: 26px;
}

.info-table-card {
  grid-column: 1 / -1;
}

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

.info-table div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.info-table dt {
  color: var(--realm-300);
  font-weight: 800;
}

.info-table dd {
  margin: 0;
  color: #dbe2ef;
}

.search-page-form {
  max-width: 780px;
  margin-top: 24px;
}

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

.site-footer {
  margin-top: 88px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 28px;
  padding: 48px 0;
}

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 10px;
  color: #c9d1df;
}

.footer-bottom {
  padding: 18px 16px;
  color: #99a4b6;
  text-align: center;
  border-top: 1px solid var(--border);
}

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

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

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

  .rank-panel {
    position: static;
  }
}

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

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

  .hero-carousel {
    min-height: 820px;
  }

  .hero-copy {
    padding-bottom: 210px;
  }

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

  .hero-category-links {
    justify-content: flex-start;
  }

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

  .detail-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }

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

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

  .header-inner {
    height: 66px;
  }

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

  .hero-carousel {
    min-height: 780px;
    padding-top: 66px;
  }

  .hero-content {
    min-height: 650px;
  }

  .hero-copy {
    padding: 48px 0 230px;
  }

  .hero-controls {
    bottom: 168px;
  }

  .hero-search-card {
    bottom: 14px;
    width: calc(100% - 24px);
  }

  .hero-search,
  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }

  .section-heading,
  .search-result-head {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .listing-grid,
  .small-grid,
  .rank-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .rank-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .category-collage {
    min-height: 140px;
  }

  .detail-poster {
    max-width: 220px;
  }

  .page-hero,
  .detail-hero {
    padding-top: 110px;
  }

  .info-table {
    grid-template-columns: 1fr;
  }

  .info-table div {
    grid-template-columns: 70px minmax(0, 1fr);
  }
}
