:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-line: rgba(148, 163, 184, 0.18);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #22c55e;
  --orange: #fb923c;
  --yellow: #facc15;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(8, 145, 178, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-wrap,
.footer-wrap,
.page-wrap,
.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.3);
}

.brand-text,
.footer-brand span:last-child {
  font-size: 20px;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
  padding: 9px 12px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.8);
}

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

.top-search input,
.mobile-search input,
.filter-input,
.search-box input {
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.78);
  border-radius: 12px;
  outline: none;
  padding: 10px 12px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 190px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.top-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.hero-dot,
.search-box button {
  border: 0;
  cursor: pointer;
}

.top-search button,
.mobile-search button,
.primary-btn,
.search-box button {
  color: white;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.22);
}

.secondary-btn {
  color: #cbd5e1;
  font-weight: 750;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.74);
}

.menu-toggle {
  display: none;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
  padding: 8px 12px;
}

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

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-search {
  align-items: stretch;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
}

.hero-slider {
  position: relative;
  min-height: 580px;
  height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop,
.hero-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-backdrop img {
  object-fit: cover;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.35) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.15));
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  height: 100%;
  padding: 64px 0;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.info-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-meta {
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span,
.info-line span,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  font-weight: 750;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

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

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

.hero-dot {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  padding: 0;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.page-wrap {
  padding: 58px 0 78px;
}

.content-section {
  margin-bottom: 74px;
}

.section-head,
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head h2,
.list-head h1,
.detail-main h1,
.page-title h1 {
  margin: 0;
  color: #f8fafc;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-head h2 {
  font-size: clamp(24px, 3.5vw, 36px);
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, border 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  height: 232px;
  margin: 0;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.small .poster {
  height: 168px;
}

.movie-card.large .poster {
  height: 420px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.04));
}

.card-category,
.card-score,
.play-float {
  position: absolute;
  z-index: 2;
}

.card-category {
  top: 12px;
  left: 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.84);
}

.card-score {
  right: 12px;
  bottom: 12px;
  color: #fef3c7;
  font-size: 12px;
  font-weight: 850;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.84);
}

.play-float {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: white;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #e2e8f0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card:hover .card-body h3 {
  color: var(--cyan);
}

.card-body p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span {
  color: var(--muted);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.8);
}

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

.category-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62));
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.48);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 110px;
}

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

.category-card div:last-child {
  padding: 16px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.category-card p,
.page-title p,
.list-head p {
  margin: 0;
  color: var(--muted);
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 62px 78px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-num {
  color: var(--cyan);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.rank-item img {
  width: 78px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  color: #fef3c7;
  font-weight: 900;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
}

.page-title,
.list-head {
  margin-bottom: 30px;
}

.page-title h1,
.list-head h1,
.detail-main h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.filter-bar,
.search-box {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-input,
.search-box input {
  flex: 1;
  min-width: 0;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.player-box {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

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

.video-frame video,
.play-cover,
.play-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-frame video {
  z-index: 1;
  object-fit: contain;
}

.play-cover {
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover img {
  object-fit: cover;
  filter: brightness(0.58);
}

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

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: white;
  font-size: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.35);
  transform: translate(-50%, -50%);
}

.detail-main,
.side-panel,
.text-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-main {
  padding: 24px;
  margin-top: 22px;
}

.detail-main h1 {
  margin-bottom: 16px;
}

.detail-main .lead {
  color: #cbd5e1;
  font-size: 18px;
  margin: 18px 0;
}

.text-panel {
  padding: 22px;
  margin-top: 20px;
}

.text-panel h2 {
  margin: 0 0 12px;
  color: #f8fafc;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
}

.side-panel {
  padding: 18px;
}

.side-panel h2 {
  margin: 0 0 14px;
}

.side-poster {
  overflow: hidden;
  margin: 0 0 16px;
  border-radius: 18px;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.search-result-note {
  color: var(--muted);
  margin: -8px 0 22px;
}

.empty-state {
  color: var(--muted);
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

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

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

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

@media (max-width: 760px) {
  .hero-slider {
    min-height: 560px;
    height: 78vh;
  }

  .hero-actions,
  .filter-bar,
  .search-box {
    align-items: stretch;
    flex-direction: column;
  }

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

  .poster {
    height: 190px;
  }

  .movie-card.small .poster,
  .movie-card.large .poster {
    height: 190px;
  }

  .rank-item {
    grid-template-columns: 44px 64px 1fr;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

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

@media (max-width: 520px) {
  .nav-wrap,
  .footer-wrap,
  .page-wrap,
  .hero-inner,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

  .grid-normal,
  .grid-small,
  .grid-wide,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0 28px;
}

.footer-main p,
.footer-col a,
.footer-bottom {
  color: var(--muted);
}

.footer-main p {
  max-width: 520px;
}

.footer-col h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.footer-col a:hover {
  color: var(--cyan);
}

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