:root {
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --secondary: #2563eb;
  --accent: #06b6d4;
  --bg: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 58%, #f9fafb 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(14px);
}

.nav-bar {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.25);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links a {
  padding: 9px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 650;
  font-size: 14px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-dark);
  background: #ecfeff;
}

.top-search {
  width: 260px;
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.top-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: none;
  padding: 10px 14px;
  background: transparent;
}

.top-search button,
.mobile-search button {
  border: 0;
  padding: 10px 14px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #374151;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #374151;
  font-weight: 700;
}

.mobile-panel a:hover {
  background: #ecfeff;
  color: var(--primary-dark);
}

.mobile-search {
  display: flex;
  margin-bottom: 6px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  overflow: hidden;
}

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

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(6, 182, 212, 0.35), transparent 35%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42) 52%, rgba(0, 0, 0, 0.15));
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: clamp(48px, 8vh, 88px);
  color: #fff;
}

.hero-copy {
  width: min(690px, 92%);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 14px 0 18px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tag,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(8, 145, 178, 0.86);
  backdrop-filter: blur(8px);
  font-weight: 750;
  font-size: 14px;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.32);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  color: var(--primary-dark);
  background: #ecfeff;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

main {
  display: block;
}

.section {
  padding: 72px 0;
}

.section.soft {
  margin: 18px auto;
  padding: 58px 0;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  border-radius: 32px;
}

.section.dark {
  color: #fff;
  background: #111827;
}

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

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

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

.dark .section-head p {
  color: #d1d5db;
}

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

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

.movie-card {
  min-width: 0;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.94);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: 0.25s ease;
}

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

.corner-tag,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.corner-tag {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: rgba(8, 145, 178, 0.86);
}

.movie-info {
  padding: 13px 2px 0;
}

.movie-info h3 {
  margin: 7px 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.movie-info h3 a:hover {
  color: var(--primary-dark);
}

.movie-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-meta,
.tag-row,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.movie-meta span,
.tag-row span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 750;
}

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

.compact .movie-info h3 {
  font-size: 16px;
}

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

.category-card {
  min-height: 164px;
  padding: 24px;
  border: 1px solid rgba(165, 243, 252, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 0 0 28px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 0 14px;
  color: #111827;
  background: #fff;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

.no-results {
  display: none;
  padding: 30px;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: #f3f4f6;
}

.no-results.show {
  display: block;
}

.page-hero,
.detail-hero {
  padding: 66px 0 50px;
  background:
    radial-gradient(circle at 18% 0%, rgba(6, 182, 212, 0.18), transparent 34%),
    linear-gradient(135deg, #ecfeff, #ffffff 42%, #eff6ff);
}

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

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.breadcrumbs a {
  color: var(--primary-dark);
  font-weight: 750;
}

.detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  background: #e5e7eb;
}

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

.detail-copy h1 {
  margin-top: 0;
}

.detail-intro {
  margin: 18px 0 24px;
  color: #374151;
  font-size: 18px;
}

.player-section {
  padding: 58px 0 30px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(8, 145, 178, 0.38), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  z-index: 3;
}

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

.player-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.95);
  font-size: 34px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
}

.detail-text {
  padding: 34px 0 26px;
}

.text-panel {
  display: grid;
  gap: 26px;
  max-width: 930px;
}

.text-panel article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}

.text-panel p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.related-section {
  padding: 34px 0 76px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 180px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.ranking-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.ranking-poster {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  background: #e5e7eb;
}

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

.ranking-main h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-main p {
  margin: 0;
  color: var(--muted);
}

.ranking-score {
  display: grid;
  gap: 2px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

.ranking-score strong {
  color: #f59e0b;
  font-size: 24px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  max-width: 560px;
  margin: 12px 0 0;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

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

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

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

  .ranking-item {
    grid-template-columns: 54px 150px 1fr;
  }

  .ranking-score {
    grid-column: 3;
    text-align: left;
  }
}

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

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

  .hero-control {
    display: none;
  }

  .section-head {
    display: block;
  }

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

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

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

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

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

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

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-content {
    padding-bottom: 64px;
  }

  .hero-actions,
  .detail-actions {
    display: grid;
  }

  .movie-grid,
  .movie-grid.large,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .section,
  .section.soft {
    padding: 48px 0;
  }

  .page-hero,
  .detail-hero {
    padding: 44px 0 36px;
  }

  .ranking-item {
    grid-template-columns: 42px 1fr;
  }

  .ranking-poster {
    grid-column: 1 / -1;
  }

  .ranking-score {
    grid-column: 2;
  }
}
