:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --pink: #ec4899;
  --gold: #f59e0b;
  --radius: 1.25rem;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(236, 72, 153, 0.12), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a,
.mobile-nav a,
.footer-links a {
  color: #cbd5e1;
  font-size: 0.94rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--cyan);
}

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

.top-search input,
.search-panel input,
.filter-search {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  outline: none;
  padding: 12px 16px;
}

.top-search button,
.primary-btn,
.ghost-btn,
.play-cover,
.hero-arrow,
.menu-toggle {
  border: 0;
  color: var(--text);
}

.top-search button,
.primary-btn {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.22);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.7);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.92);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.page-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 42%);
  gap: 36px;
  align-items: center;
  padding: clamp(28px, 6vw, 72px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2)),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 28% 44%, rgba(34, 211, 238, 0.18), transparent 24rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  font-weight: 800;
}

.hero h1,
.hero h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin-top: 8px;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.85;
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.category-tabs a,
.rank-badge,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
  padding: 7px 12px;
  font-size: 0.86rem;
}

.hero-poster {
  justify-self: end;
  width: min(100%, 420px);
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  transform: perspective(900px) rotateY(-8deg);
}

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

.hero-controls {
  position: absolute;
  left: clamp(24px, 5vw, 64px);
  right: clamp(24px, 5vw, 64px);
  bottom: 26px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.active {
  width: 32px;
  background: var(--cyan);
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.quick-entry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0 60px;
}

.quick-card,
.category-card,
.info-panel,
.detail-panel,
.movie-card,
.rank-row,
.search-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.2);
}

.quick-card,
.category-card,
.info-panel,
.detail-panel,
.search-panel {
  padding: 22px;
}

.quick-card:hover,
.category-card:hover,
.movie-card:hover,
.rank-row:hover {
  border-color: rgba(34, 211, 238, 0.42);
  transform: translateY(-3px);
}

.quick-card,
.category-card,
.movie-card,
.rank-row {
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card strong,
.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.quick-card p,
.category-card p,
.info-panel p,
.detail-panel p,
.card-desc,
.card-meta,
.rank-row p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.72;
}

.section {
  margin-top: 62px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.section-heading h2 span {
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.4);
}

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

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

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

.movie-card {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #0f172a;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.poster-year {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #00111a;
  background: var(--cyan);
  font-weight: 900;
  font-size: 0.82rem;
}

.card-body {
  padding: 17px;
}

.card-title {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
}

.card-title:hover {
  color: var(--cyan);
}

.card-meta {
  margin: 7px 0 0;
  font-size: 0.86rem;
}

.card-desc {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.92rem;
}

.tag-row,
.detail-tags,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row {
  margin-top: 14px;
}

.page-title {
  display: grid;
  gap: 16px;
  margin: 18px 0 28px;
}

.page-title h1,
.detail-title h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.06;
}

.page-title p {
  max-width: 860px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.85;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 30px;
}

.category-tabs a {
  padding: 10px 15px;
}

.category-tabs a.active,
.category-tabs a:hover {
  border-color: rgba(34, 211, 238, 0.52);
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.14);
}

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

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

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

.rank-badge {
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #00111a;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  font-weight: 900;
}

.rank-row img {
  width: 88px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.rank-row p {
  margin: 0;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-title {
  display: grid;
  gap: 18px;
  margin-bottom: 26px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.72));
}

.play-cover .play-icon {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #00111a;
  background: var(--cyan);
  box-shadow: 0 0 46px rgba(34, 211, 238, 0.42);
  font-size: 2.2rem;
  padding-left: 5px;
}

.detail-panel {
  margin-top: 24px;
}

.detail-panel h2,
.info-panel h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.detail-panel p {
  margin: 12px 0 0;
}

.side-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

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

.side-poster-body {
  padding: 20px;
}

.side-poster-body h2 {
  margin: 0 0 12px;
}

.search-panel {
  margin-bottom: 28px;
}

.search-panel input {
  border-radius: 18px;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--panel);
}

.is-hidden {
  display: none !important;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: flex-end;
}

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

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

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

  .side-poster {
    max-width: 420px;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .hero-poster {
    justify-self: start;
    width: 220px;
    transform: none;
  }

  .quick-entry,
  .category-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-main {
    width: min(100% - 22px, 1280px);
  }

  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 22px, 1280px);
  }

  .hero {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-desc,
  .tag-row {
    display: none;
  }

  .rank-row {
    grid-template-columns: auto 68px minmax(0, 1fr);
  }

  .rank-row .primary-btn {
    grid-column: 2 / -1;
    text-align: center;
  }

  .rank-row img {
    width: 68px;
  }
}
