:root {
  --color-night-darker: #0a0e1a;
  --color-night-dark: #0f1420;
  --color-night-medium: #1a1f2e;
  --color-night-light: #252b3d;
  --color-accent-blue: #3b82f6;
  --color-accent-cyan: #06b6d4;
  --color-accent-teal: #14b8a6;
  --color-text-primary: #e5e7eb;
  --color-text-secondary: #9ca3af;
  --color-text-muted: #6b7280;
  --shadow-soft: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  --shadow-cyan: 0 25px 50px -12px rgba(6, 182, 212, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(6, 182, 212, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(59, 130, 246, 0.14), transparent 30rem),
    var(--color-night-darker);
  color: var(--color-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

.gradient-text {
  background-image: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-blue));
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-cyan);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-blue));
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.28);
}

.brand-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link,
.dropdown-trigger {
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.dropdown-trigger:hover {
  color: var(--color-accent-cyan);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 190px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  background: rgba(15, 20, 32, 0.96);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.mobile-category-list a,
.footer-links a {
  display: block;
  color: var(--color-text-secondary);
  padding: 8px 10px;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.dropdown-menu a:hover,
.mobile-category-list a:hover,
.footer-links a:hover {
  color: var(--color-accent-cyan);
  background: rgba(255, 255, 255, 0.06);
}

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

.top-search input,
.mobile-search input,
.intro-search input,
.search-large input {
  min-width: 220px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
  padding: 0 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.intro-search input:focus,
.search-large input:focus {
  border-color: rgba(6, 182, 212, 0.72);
  background: rgba(255, 255, 255, 0.08);
}

.top-search button,
.mobile-search button,
.intro-search button,
.search-large button,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button,
.intro-search button,
.search-large button,
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-blue));
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.22);
}

.btn-secondary {
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
}

.btn-primary:hover,
.btn-secondary:hover,
.top-search button:hover,
.mobile-search button:hover,
.intro-search button:hover,
.search-large button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--color-text-primary);
  background: transparent;
  font-size: 26px;
}

.mobile-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-link {
  display: block;
  padding: 10px 0;
  color: var(--color-text-secondary);
}

.mobile-link.is-active {
  color: var(--color-accent-cyan);
}

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

.hero-carousel {
  position: relative;
  margin: 28px auto 42px;
}

.hero-stage {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-radius: 34px;
  background: var(--color-night-medium);
  box-shadow: var(--shadow-soft);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
  transform: scale(1.03);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.96) 0%, rgba(10, 14, 26, 0.72) 48%, rgba(10, 14, 26, 0.36) 100%),
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.20), transparent 32rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  gap: 46px;
  align-items: center;
  padding: clamp(28px, 5vw, 72px);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--color-accent-cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: white;
  font-size: clamp(34px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 20px 0 8px;
  color: white;
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1.12;
}

.hero-copy p,
.page-hero p,
.intro-strip p,
.section-heading p,
.detail-content p,
.side-card p,
.site-footer p {
  color: var(--color-text-secondary);
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 22px;
  font-size: 18px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.small-actions {
  margin-top: 18px;
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
}

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

.hero-poster span {
  display: block;
  padding: 14px 18px;
  color: white;
  font-weight: 800;
  text-align: center;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: 34px;
  bottom: 30px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--color-accent-cyan);
}

.hero-category-bar {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: calc(100% - 48px);
  margin: -28px auto 0;
  padding: 16px;
  border-radius: 22px;
}

.hero-category-bar a,
.page-index a,
.pagination a,
.pagination span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.hero-category-bar a {
  min-height: 38px;
  padding: 0 16px;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-category-bar a:hover {
  color: white;
  background: rgba(6, 182, 212, 0.18);
}

.intro-strip,
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 42px;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 28px;
}

.intro-strip h2,
.page-hero h1 {
  margin: 0 0 10px;
  color: white;
}

.intro-strip h2 {
  font-size: clamp(26px, 3.5vw, 44px);
}

.content-section {
  margin: 54px 0;
}

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

.section-heading.compact {
  align-items: start;
}

.section-title {
  margin: 0 0 6px;
  color: white;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--color-night-medium);
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(0.78);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-blue));
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.25);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

.card-content {
  padding: 16px;
}

.movie-meta {
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 18px;
  line-height: 1.32;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  min-height: 26px;
  padding: 0 10px;
  color: #bff6ff;
  font-size: 12px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.18);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: start;
}

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

.category-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  padding: 18px;
  border-radius: 20px;
}

.category-tile span {
  color: white;
  font-weight: 800;
}

.category-tile strong {
  color: var(--color-accent-cyan);
}

.rank-panel {
  padding: 22px;
  border-radius: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(6, 182, 212, 0.12);
  transform: translateX(4px);
}

.rank-row img {
  width: 46px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-no {
  color: var(--color-accent-cyan);
  font-weight: 900;
  text-align: center;
}

.rank-title {
  overflow: hidden;
  color: white;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-type {
  color: var(--color-text-muted);
  font-size: 12px;
}

.page-index {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 48px 0;
  padding: 18px;
  border-radius: 20px;
}

.page-index span {
  color: white;
  font-weight: 800;
}

.page-index div,
.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-index a,
.pagination a,
.pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.06);
}

.page-index a:hover,
.pagination a:hover,
.pagination a.is-active {
  color: white;
  background: rgba(6, 182, 212, 0.28);
}

.page-main,
.detail-main {
  padding-top: 34px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 38px;
}

.rank-grid .rank-card:nth-child(-n + 3) {
  border-color: rgba(6, 182, 212, 0.38);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 18px;
  color: var(--color-text-muted);
}

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

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

.detail-primary {
  display: grid;
  gap: 24px;
}

.player-card,
.detail-content,
.side-card {
  border-radius: 26px;
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
}

.player-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.52);
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: white;
  font-size: 28px;
  background: linear-gradient(135deg, var(--color-accent-cyan), var(--color-accent-blue));
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.32);
  transform: translate(-50%, -50%);
}

.movie-player.is-playing .player-overlay {
  display: none;
}

.detail-content {
  padding: clamp(22px, 4vw, 34px);
}

.detail-content h1 {
  margin-bottom: 16px;
  font-size: clamp(32px, 4.5vw, 54px);
}

.detail-one-line {
  font-size: 18px;
}

.detail-tags {
  margin: 18px 0 22px;
}

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

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.detail-meta span {
  display: block;
  color: var(--color-text-muted);
  font-size: 12px;
}

.detail-meta strong {
  display: block;
  margin-top: 4px;
  color: white;
  font-size: 15px;
}

.detail-content h2 {
  margin: 28px 0 10px;
  color: white;
  font-size: 22px;
}

.detail-side {
  position: sticky;
  top: 96px;
}

.side-card {
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
}

.side-card h2 {
  margin: 16px 0 6px;
  color: white;
}

.full {
  width: 100%;
  margin-top: 16px;
}

.related-grid .movie-card.small .card-content {
  padding: 14px;
}

.search-large {
  margin-top: 20px;
}

.search-large input {
  width: min(560px, 100%);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 20, 32, 0.86);
}

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

.footer-brand {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 4px;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--color-text-muted);
  font-size: 14px;
}

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

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .detail-layout,
  .two-column,
  .intro-strip,
  .page-hero {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
  }

  main,
  .footer-grid,
  .footer-bottom,
  .mobile-panel {
    width: min(100% - 24px, 1280px);
  }

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

  .hero-stage,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero-poster {
    max-width: 220px;
  }

  .hero-category-bar {
    width: 100%;
    margin-top: 16px;
  }

  .hero-dots {
    right: 24px;
    bottom: 22px;
  }

  .movie-grid,
  .category-grid,
  .detail-meta,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-heading,
  .page-index,
  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .category-grid,
  .detail-meta,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .mobile-search,
  .intro-search,
  .search-large {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-search input,
  .intro-search input,
  .search-large input {
    width: 100%;
    min-width: 0;
  }
}
