:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #fbbf24;
  --amber-dark: #d97706;
  --red: #ef4444;
  --green: #10b981;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(251, 191, 36, 0.14), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(239, 68, 68, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.32);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), #f97316);
  box-shadow: 0 12px 32px rgba(251, 191, 36, 0.28);
}

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

.brand-text strong {
  font-size: 19px;
  letter-spacing: 0.02em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber);
  background: rgba(251, 191, 36, 0.1);
  transform: translateY(-1px);
}

.nav-link-soft {
  color: #94a3b8;
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
}

.nav-search {
  width: min(310px, 27vw);
}

.nav-search input,
.mobile-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  color: var(--text);
  background: transparent;
}

.nav-search button,
.mobile-search button {
  border: 0;
  padding: 11px 16px;
  color: #111827;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--amber), #fb923c);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

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

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.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 {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.2) brightness(0.52);
  transform: scale(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.78)),
    radial-gradient(circle at 35% 35%, rgba(251, 191, 36, 0.18), transparent 34rem);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 56px;
  width: min(1240px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  padding: 70px 0 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(251, 191, 36, 0.09);
}

.hero-copy h1 {
  margin: 22px 0 18px;
  max-width: 820px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 780px;
  margin: 0;
  color: #d1d5db;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.card-tags,
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 26px 0 0;
}

.hero-tags span,
.card-tags span,
.meta-tags span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: #dbeafe;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.62);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

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

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  box-shadow: 0 16px 38px rgba(251, 191, 36, 0.25);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.62);
}

.text-btn {
  color: var(--amber);
  padding-inline: 8px;
}

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

.hero-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-cover img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
}

.hero-cover span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), #fb923c);
}

.hero-nav {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(14px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.is-active {
  width: 30px;
  border-radius: 999px;
  background: var(--amber);
}

.section {
  padding: 70px 0 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  transform: translateY(-5px);
}

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

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

.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-shine {
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.poster-year,
.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

.poster-year {
  left: 10px;
  top: 10px;
  color: #111827;
  background: var(--amber);
}

.poster-type {
  right: 10px;
  bottom: 10px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  color: #111827;
  background: linear-gradient(135deg, #fef3c7, var(--amber));
}

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

.movie-card-body h2 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 9px;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-body h2 a:hover {
  color: var(--amber);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0 0 13px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-tags {
  gap: 6px;
}

.card-tags span {
  padding: 4px 8px;
  color: #cbd5e1;
  font-size: 11px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.78));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  border-color: rgba(251, 191, 36, 0.38);
  transform: translateY(-4px);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.category-tile strong {
  display: block;
  font-size: 24px;
}

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

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

.ranking-panel {
  position: sticky;
  top: 96px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.ranking-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.mini-rank-row {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
  padding: 12px 0;
}

.mini-rank-row:last-child {
  border-bottom: 0;
}

.mini-rank-row span {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-rank-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.3fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.filter-panel h2 {
  margin: 10px 0 0;
  font-size: 26px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(130px, 0.7fr));
  gap: 12px;
  align-items: end;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 15px;
  outline: 0;
  padding: 12px 13px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
}

.detail-main {
  padding-top: 42px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 34px;
  padding: 28px;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.13), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.9));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: #111827;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-lead {
  max-width: 850px;
  margin: 0 0 20px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span {
  border-radius: 13px;
  padding: 10px 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.76);
}

.player-section,
.content-panel,
.related-section {
  margin-top: 42px;
}

.player-section h2,
.content-panel h2,
.related-section h2 {
  margin: 0 0 18px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #fff;
  background: #020617;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42) blur(2px);
  transform: scale(1.02);
}

.play-chip {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 15px 22px;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.play-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--amber), #fb923c);
}

.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.74);
}

.content-panel p {
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.95;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 26px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

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

.site-footer p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.13);
  padding: 20px 0 28px;
  font-size: 13px;
}

.empty-result {
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

.empty-result.is-visible {
  display: block;
}

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

  .nav-wrap {
    justify-content: space-between;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-inner,
  .detail-hero,
  .ranking-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .hero-cover {
    max-width: 360px;
    margin: 0 auto;
  }

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    width: min(100% - 24px, 1240px);
    height: 66px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text em {
    display: none;
  }

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

  .hero-inner {
    gap: 26px;
    padding: 46px 0 86px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .section {
    padding-top: 48px;
  }

  .section-head {
    display: block;
  }

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

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

  .movie-card-body h2 {
    font-size: 15px;
  }

  .movie-card-body p {
    font-size: 12px;
  }

  .category-grid,
  .footer-grid,
  .filter-controls {
    grid-template-columns: 1fr;
  }

  .detail-main {
    padding-top: 26px;
  }

  .detail-hero {
    padding: 18px;
    border-radius: 24px;
  }

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

  .content-panel {
    padding: 20px;
  }
}

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

  .hero-actions {
    display: grid;
  }
}
