:root {
  --bg: #090d16;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-solid: #111827;
  --muted: #94a3b8;
  --text: #f8fafc;
  --line: rgba(148, 163, 184, 0.22);
  --amber: #f59e0b;
  --amber-dark: #b45309;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.18), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(14, 165, 233, 0.16), transparent 34%),
    linear-gradient(180deg, #070a12 0%, #0f172a 46%, #111827 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 78%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  min-height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f59e0b 48%, #fb923c);
  border-radius: 15px;
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.34);
}

.brand-name {
  font-size: 1.22rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 8px;
}

.nav-links a,
.mobile-menu a,
.nav-search,
.section-link,
.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a,
.nav-search {
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.is-active,
.nav-search:hover,
.mobile-menu a:hover,
.mobile-menu a.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 24px 20px;
}

.mobile-menu a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 48px;
  padding: 118px max(24px, calc((100vw - 1400px) / 2 + 24px)) 110px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: scale(1.02);
}

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

.hero-slide::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  content: "";
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.18);
  transform: scale(1.08);
  opacity: 0.38;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 12, 22, 0.95) 0%, rgba(8, 12, 22, 0.72) 48%, rgba(8, 12, 22, 0.58) 100%),
    radial-gradient(circle at 70% 24%, rgba(245, 158, 11, 0.24), transparent 34%);
}

.hero-content {
  max-width: 820px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 14px;
  color: #fbbf24;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-one-line,
.section-heading p,
.movie-card-body p,
.detail-copy p,
.site-footer p {
  color: #cbd5e1;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 22px;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.9;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.82rem;
}

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

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

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.25);
}

.ghost-btn {
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

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

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-poster::after,
.poster-link::after,
.detail-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.7));
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1400px) / 2 + 24px));
  bottom: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 3;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.is-active {
  width: 32px;
  border-radius: 999px;
  background: var(--amber);
}

.hero-search {
  position: absolute;
  left: max(24px, calc((100vw - 1400px) / 2 + 24px));
  right: max(24px, calc((100vw - 1400px) / 2 + 24px));
  bottom: 26px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 720px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  outline: 0;
  background: rgba(15, 23, 42, 0.82);
}

.hero-search input {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  background: transparent;
}

.hero-search button {
  min-height: 46px;
  padding: 0 22px;
  color: #111827;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  font-weight: 900;
}

.content-section,
.page-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 70px 24px 0;
}

.page-main {
  padding-top: 36px;
}

.page-hero {
  overflow: hidden;
  padding: 64px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 86% 18%, rgba(245, 158, 11, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.7));
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 780px;
  margin-top: 18px;
  font-size: 1.08rem;
  line-height: 1.85;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 740px;
  margin: 10px 0 0;
}

.section-link {
  white-space: nowrap;
  color: #fbbf24;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 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 {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  transform: translateY(-6px);
}

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

.poster-link img {
  transition: transform 0.45s ease, opacity 0.3s ease;
}

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

.play-hover,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.play-hover {
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  color: #111827;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.95);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 54px;
  min-height: 28px;
  padding: 0 10px;
  color: #111827;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  font-size: 0.78rem;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.movie-card-body h2 {
  margin: 0 0 9px;
  font-size: 1.04rem;
  line-height: 1.35;
}

.movie-card-body p {
  min-height: 3.4em;
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.7;
}

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

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

.category-tile {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.category-tile::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background-image: var(--tile-image);
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58));
}

.category-tile:hover::before {
  opacity: 0.34;
  transform: scale(1.08);
}

.category-tile span {
  display: block;
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 1.38rem;
  font-weight: 900;
}

.category-tile strong {
  color: #e2e8f0;
  line-height: 1.75;
}

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

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

.movie-card-compact {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 178px;
}

.movie-card-compact .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-compact .movie-card-body h2 {
  font-size: 1rem;
}

.movie-card-compact .movie-card-body p {
  min-height: 0;
  font-size: 0.84rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 180px)) auto;
  gap: 12px;
  margin-bottom: 26px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
}

.filter-panel button {
  color: #111827;
  border: 0;
  background: linear-gradient(135deg, #facc15, #f59e0b);
}

.empty-result {
  margin: 24px 0;
  color: #fbbf24;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: #94a3b8;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 20%, rgba(245, 158, 11, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.72);
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.detail-one-line {
  margin: 22px 0 20px;
  font-size: 1.08rem;
  line-height: 1.9;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.detail-meta-grid div {
  padding: 15px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.detail-meta-grid span {
  display: block;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.detail-meta-grid strong {
  color: #fff;
}

.player-section {
  padding-top: 34px;
}

.player-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.84));
  text-align: center;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.play-symbol {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: #111827;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.32);
  font-size: 2rem;
}

.player-overlay strong {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
}

.player-overlay em {
  max-width: 680px;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.8;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 4;
  margin: 0;
  color: #fbbf24;
  font-size: 0.9rem;
}

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

.copy-grid article {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.copy-grid h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
}

.copy-grid p {
  margin: 0 0 14px;
  line-height: 1.95;
}

.site-footer {
  max-width: 1400px;
  margin: 80px auto 0;
  padding: 42px 24px 32px;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.25rem;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1rem;
}

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

.footer-links a {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

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

.footer-bottom {
  padding: 22px 4px 0;
  color: #64748b;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

  .ranking-list,
  .ranking-list-wide,
  .category-grid,
  .category-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-menu.is-open {
    display: grid;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 96px;
  }

  .hero-poster {
    width: min(280px, 62vw);
    margin: 0 auto;
  }

  .hero-controls {
    left: 24px;
    right: auto;
    bottom: 112px;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 26px;
  }

  .page-hero {
    padding: 34px;
  }

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

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

  .ranking-list,
  .ranking-list-wide,
  .category-grid,
  .category-grid-large,
  .copy-grid,
  .footer-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .detail-info {
    padding: 30px;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    min-height: 66px;
    padding: 0 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: 1rem;
  }

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

  .hero-slide {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-search {
    left: 16px;
    right: 16px;
  }

  .movie-grid {
    gap: 14px;
  }

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

  .movie-card-body p,
  .movie-card-body .tag-row {
    display: none;
  }

  .movie-card-compact {
    grid-template-columns: 100px minmax(0, 1fr);
  }

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

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

  .play-symbol {
    width: 64px;
    height: 64px;
  }
}
