:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-2: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-2: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --emerald: #10b981;
  --cyan: #22d3ee;
  --orange: #fb923c;
  --purple: #c084fc;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

* {
  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;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.13), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #00140d;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.42);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #34d399, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #dbeafe;
  font-size: 14px;
}

.desktop-nav a,
.mobile-panel a,
.site-footer a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
  color: #34d399;
}

.nav-search {
  width: 270px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.nav-search input,
.mobile-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  flex: 1;
  padding: 4px 8px;
}

.nav-search button,
.mobile-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  color: #00140d;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  cursor: pointer;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

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

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(51, 65, 85, 0.86);
}

.mobile-search input {
  flex: 1;
  padding: 8px 10px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 5.2s ease;
  transform: scale(1.04);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.82));
}

.hero-content {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 690px;
  padding-top: 32px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #34d399;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

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

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.76);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

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

.primary-btn,
.ghost-btn,
.row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 14px 28px;
  color: #00140d;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.28);
}

.ghost-btn {
  padding: 13px 22px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #34d399;
}

.main-stack,
.page-section,
.detail-content {
  padding: 56px 0;
}

.main-stack {
  display: grid;
  gap: 70px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: #34d399;
  font-weight: 800;
}

.poster-grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.76));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 24px 60px rgba(16, 185, 129, 0.16);
}

.poster-link {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.poster-wrap img,
.detail-poster img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

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

.play-chip {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #00140d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: scale(1);
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  color: #00140d;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  font-weight: 900;
}

.card-info {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-weight: 800;
  line-height: 1.35;
}

.card-title:hover {
  color: #34d399;
}

.card-meta {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.card-info p {
  display: -webkit-box;
  min-height: 38px;
  margin: 9px 0 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  font-size: 12px;
}

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

.category-tile,
.overview-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile::after,
.overview-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -45px;
  bottom: -45px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.25), transparent 68%);
}

.category-tile:hover,
.overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.45);
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.72), rgba(22, 78, 99, 0.72));
}

.category-tile strong,
.overview-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile span,
.overview-card p {
  color: #cbd5e1;
  line-height: 1.65;
}

.page-main {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.small-hero,
.category-hero {
  padding: 70px 0 54px;
}

.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #34d399;
}

.overview-main {
  display: block;
  position: relative;
  z-index: 2;
}

.overview-links {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  font-size: 14px;
}

.overview-links a {
  color: #a7f3d0;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border-radius: 999px;
  padding: 12px 15px;
  background: rgba(51, 65, 85, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-bar select option {
  background: #0f172a;
}

.empty-state {
  display: none;
  padding: 60px 20px;
  color: #94a3b8;
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) 88px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #00140d;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  font-weight: 900;
}

.rank-poster {
  width: 86px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.rank-info h2 {
  margin: 0;
  font-size: 21px;
}

.rank-info h2:hover {
  color: #34d399;
}

.rank-info p {
  margin: 8px 0 12px;
  color: #cbd5e1;
  line-height: 1.55;
}

.rank-meta {
  color: #94a3b8;
  font-size: 13px;
}

.row-btn {
  padding: 10px 16px;
  color: #00140d;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

.large-search {
  display: flex;
  max-width: 740px;
  gap: 10px;
  margin-top: 28px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.large-search input {
  flex: 1;
  padding: 12px 14px;
}

.large-search button {
  padding: 12px 24px;
}

.detail-hero {
  min-height: 540px;
  background-size: cover;
  background-position: center;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 45%, rgba(2, 6, 23, 0.4) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.85));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 56px 0 54px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

.detail-line {
  max-width: 820px;
  margin: 18px 0 0;
  color: #d1d5db;
  font-size: 19px;
  line-height: 1.75;
}

.detail-meta {
  margin-top: 22px;
}

.large-tags {
  margin-top: 22px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.content-main,
.related-side {
  display: grid;
  gap: 22px;
}

.player-card,
.text-panel,
.related-side {
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

.player-card {
  padding: 14px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.player-start.hidden {
  display: none;
}

.big-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #00140d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 42px rgba(16, 185, 129, 0.42);
  font-size: 34px;
}

.text-panel {
  padding: 26px;
}

.text-panel h2,
.related-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  white-space: pre-line;
}

.related-side {
  position: sticky;
  top: 86px;
  padding: 20px;
}

.related-grid {
  display: grid;
  gap: 14px;
}

.related-grid .movie-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border-radius: 16px;
}

.related-grid .poster-wrap {
  height: 138px;
}

.related-grid .card-info {
  padding: 10px 12px;
}

.related-grid .card-title {
  min-height: auto;
  -webkit-line-clamp: 2;
}

.related-grid .card-info p,
.related-grid .tag-row {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #020617);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 46px 0 32px;
}

.footer-brand {
  margin-bottom: 14px;
  color: white;
  font-size: 18px;
}

.site-footer p,
.site-footer li {
  color: #94a3b8;
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

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

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

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

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 680px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

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

  .row-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

  .detail-poster {
    width: 220px;
  }

  .related-side {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-container {
    width: min(100% - 24px, 1180px);
  }

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

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

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .card-info {
    padding: 12px;
  }

  .rank-row {
    grid-template-columns: 38px 66px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .rank-info p,
  .rank-meta span:nth-child(n+4) {
    display: none;
  }

  .large-search {
    flex-direction: column;
    border-radius: 20px;
  }

  .detail-poster {
    width: 176px;
  }

  .detail-hero-inner {
    padding-top: 34px;
  }

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