* {
  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;
  background: #102a43;
  color: #f3f4f6;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(36, 59, 83, 0.95);
  border-bottom: 1px solid rgba(72, 101, 129, 0.7);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: #f8fafc;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f59e0b;
  color: #111827;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  color: #d1d5db;
  flex: 1;
}

.nav-links a:hover,
.brand:hover {
  color: #fbbf24;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.local-search {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(16, 42, 67, 0.8);
  color: #f8fafc;
  outline: none;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 240px;
}

.nav-search input:focus,
.local-search:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.nav-search button,
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-search button,
.btn-primary {
  background: #f59e0b;
  color: #111827;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
}

.btn-secondary {
  background: rgba(72, 101, 129, 0.88);
  color: #f8fafc;
  font-weight: 700;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 700;
}

.nav-search button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
}

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

.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.04);
  filter: saturate(1.1) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(16, 42, 67, 0.95), rgba(36, 59, 83, 0.78)), linear-gradient(to right, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  padding-top: 30px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  max-width: 760px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.98;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.hero-content h2 {
  font-size: clamp(30px, 4vw, 56px);
}

.hero-text {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(36, 59, 83, 0.78);
  color: #e5e7eb;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.compact-actions {
  margin-top: 20px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(229, 231, 235, 0.7);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.search-panel {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-radius: 22px;
  background: rgba(36, 59, 83, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.search-panel h2,
.section-title h2,
.page-hero h1,
.detail-card h1,
.detail-card h2 {
  margin: 0;
  color: #f8fafc;
}

.section-block {
  padding: 56px 0 0;
}

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

.section-title h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-title a,
.text-link {
  color: #fbbf24;
  font-weight: 800;
}

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

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

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

.movie-card {
  background: rgba(36, 59, 83, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.28);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0b1f33;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent 55%);
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) scale(0.85);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.9);
  color: #111827;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f59e0b;
  color: #111827;
  font-weight: 900;
  z-index: 2;
}

.movie-card-body {
  padding: 14px;
}

.movie-title {
  display: block;
  margin-bottom: 8px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.movie-title:hover {
  color: #fbbf24;
}

.movie-card-body p {
  min-height: 58px;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #94a3b8;
  font-size: 12px;
}

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

.category-chip,
.category-overview-card,
.detail-card,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(135deg, rgba(36, 59, 83, 0.95), rgba(16, 42, 67, 0.86));
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.category-chip {
  padding: 18px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-chip strong {
  color: #f8fafc;
  font-size: 20px;
}

.category-chip span,
.page-hero p,
.category-overview-card p,
.detail-card p,
.site-footer p {
  color: #cbd5e1;
  line-height: 1.75;
}

.category-chip:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-3px);
}

.page-hero {
  padding: 66px 0 24px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin-bottom: 16px;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  font-size: 18px;
}

.category-overview {
  display: grid;
  gap: 22px;
  padding: 28px 0 56px;
}

.category-overview-card {
  padding: 22px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

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

.mini-grid .movie-card-body p,
.mini-grid .tag-row {
  display: none;
}

.detail-shell {
  padding-top: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  color: #ffffff;
  cursor: pointer;
}

.player-cover span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f59e0b;
  color: #111827;
  font-size: 32px;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.35);
}

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

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 14px;
}

.one-line {
  color: #fbbf24 !important;
  font-size: 18px;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(72, 101, 129, 0.78);
  color: #e5e7eb;
}

.large-tags {
  margin-bottom: 24px;
}

.detail-card h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 24px;
}

.side-panel {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 86px;
}

.detail-poster {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-card {
  padding: 18px;
}

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

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

.site-footer {
  margin-top: 64px;
  padding: 42px 0;
  background: #0b1f33;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
  color: #f8fafc;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fbbf24;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1120px) {
  .movie-grid,
  .movie-grid.wide,
  .rank-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

  .nav-links.is-open,
  .nav-search.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .search-panel,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .local-search {
    width: 100%;
  }

  .movie-grid,
  .movie-grid.wide,
  .rank-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid.wide,
  .rank-strip,
  .category-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 38px;
  }
}
