html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.26), transparent 32rem),
    radial-gradient(circle at 85% 8%, rgba(6, 182, 212, 0.18), transparent 28rem),
    #020617;
  color: #e5e7eb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

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

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

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.brand-text {
  font-size: 1.22rem;
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(320px, 28vw);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}

.header-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: #ffffff;
  background: transparent;
  outline: none;
}

.header-search input {
  padding: 11px 14px;
}

.header-search button,
.big-search button {
  flex: 0 0 auto;
  padding: 11px 18px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.9);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: clamp(560px, 72vh, 760px);
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: clamp(560px, 72vh, 760px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: min(1180px, calc(100% - 32px));
}

.eyebrow,
.section-heading span,
.category-card span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  color: #ffffff;
  font-size: clamp(3rem, 8vw, 6.7rem);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.hero-content p {
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-row,
.hero-actions,
.section-heading,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.62);
}

.hero-tags span,
.detail-meta span {
  padding: 7px 12px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 0.76rem;
}

.tag-row.large span {
  padding: 7px 12px;
  font-size: 0.9rem;
}

.hero-actions {
  margin-top: 28px;
}

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(6, 182, 212, 0.34);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.46);
}

.ghost-btn:hover {
  background: rgba(148, 163, 184, 0.18);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: 0.22s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: #67e8f9;
}

.content-section,
.quick-search-section,
.detail-content,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-section {
  padding: 60px 0 18px;
}

.content-section {
  padding: 70px 0;
}

.dark-panel {
  position: relative;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading.centered {
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
  color: #ffffff;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.section-heading a {
  color: #67e8f9;
  font-weight: 800;
}

.section-heading p {
  max-width: 720px;
  color: #94a3b8;
}

.big-search {
  width: min(760px, 100%);
  margin: 28px auto 0;
  display: flex;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.big-search input {
  padding: 17px 20px;
}

.big-search button {
  padding-left: 26px;
  padding-right: 26px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 232, 249, 0.34);
  background: rgba(30, 41, 59, 0.78);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(2, 6, 23, 0.95));
}

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.card-badge,
.card-score {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 850;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
}

.card-badge {
  left: 10px;
}

.card-score {
  right: 10px;
  color: #fde68a;
}

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

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 880;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
  color: #67e8f9;
}

.movie-meta,
.movie-desc,
.rank-info p,
.detail-content p,
.footer-inner p,
.page-hero p,
.lead {
  color: #94a3b8;
}

.movie-meta {
  margin: 8px 0;
  font-size: 0.82rem;
}

.movie-desc {
  min-height: 4.6em;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.55;
}

.movie-desc.compact {
  min-height: 3.9em;
}

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

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

.category-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.48) 62%, rgba(2, 6, 23, 0.12) 100%);
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-card div {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.category-card h3 {
  margin: 9px 0;
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 950;
}

.category-card p {
  color: #cbd5e1;
  line-height: 1.65;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  transition: 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.32);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: #0f172a;
}

.rank-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.rank-info {
  align-self: center;
}

.rank-info h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-weight: 900;
}

.rank-info p {
  margin: 6px 0;
  line-height: 1.55;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  min-height: 320px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  padding: clamp(30px, 7vw, 68px);
  background:
    linear-gradient(135deg, rgba(30, 64, 175, 0.38), rgba(8, 47, 73, 0.24)),
    rgba(15, 23, 42, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.small-hero {
  min-height: 260px;
}

.page-hero h1 {
  max-width: 880px;
  margin: 13px 0 16px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1;
}

.page-hero p {
  max-width: 780px;
  font-size: 1.08rem;
  line-height: 1.8;
}

.filter-panel {
  margin: 0 0 26px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 190px;
  gap: 14px;
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 0 15px;
  background: rgba(15, 23, 42, 0.72);
}

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

.is-filtered-out {
  display: none !important;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 0 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  padding: clamp(20px, 4vw, 42px);
  background:
    radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.28), transparent 25rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 1.02;
}

.lead {
  max-width: 820px;
  font-size: 1.12rem;
  line-height: 1.85;
}

.detail-info .primary-btn {
  margin-top: 24px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  color: #ffffff;
  font-size: 2rem;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 22px 50px rgba(37, 99, 235, 0.44);
}

.detail-content {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
}

.detail-content article {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  padding: clamp(22px, 4vw, 34px);
  background: rgba(15, 23, 42, 0.72);
}

.detail-content h2 {
  margin: 0 0 16px;
  font-size: 1.7rem;
}

.detail-content p {
  line-height: 1.95;
  font-size: 1.02rem;
}

.search-page {
  min-height: 560px;
}

.search-form-page {
  margin-top: 0;
  margin-bottom: 34px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 650px;
  margin: 12px 0 0;
  line-height: 1.75;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: #64748b;
  font-size: 0.92rem;
}

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

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

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

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

  .mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-content h1 {
    font-size: clamp(2.7rem, 14vw, 4.8rem);
  }

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

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

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

  .detail-cover {
    max-width: 320px;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .nav-wrap {
    min-height: 64px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .mobile-nav.is-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-actions,
  .big-search {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    border-radius: 26px;
  }

  .primary-btn,
  .ghost-btn,
  .big-search button {
    width: 100%;
  }

  .movie-grid,
  .full-list,
  .related-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .movie-desc {
    display: none;
  }

  .category-card {
    min-height: 220px;
  }

  .rank-item {
    grid-template-columns: 78px minmax(0, 1fr);
  }
}
