* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #020617;
  color: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 36px rgba(6, 182, 212, 0.24);
  color: #ffffff;
  font-size: 14px;
}

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

.nav-link {
  border-radius: 999px;
  padding: 9px 16px;
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #e2e8f0;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 28%, rgba(6, 182, 212, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.8) 42%, rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 46%, rgba(2, 6, 23, 0.9) 100%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 112px;
}

.hero-copy {
  max-width: 760px;
  animation: slideUp 0.7s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-line,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  font-size: 14px;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  box-shadow: 0 20px 36px rgba(6, 182, 212, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.68);
  color: #e2e8f0;
}

.text-link {
  min-height: auto;
  padding: 0;
  color: #67e8f9;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42), 0 0 0 8px rgba(6, 182, 212, 0.06);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(2, 6, 23, 0.76);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

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

.hero-dot {
  width: 32px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #22d3ee;
}

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.quick-search {
  padding-top: 34px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading span {
  color: #22d3ee;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  margin: 6px 0 0;
  color: #ffffff;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 14px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(71, 85, 105, 0.92);
  border-radius: 16px;
  outline: 0;
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.86);
  color: #f8fafc;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: 26px;
  background: #0f172a;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.28));
}

.category-name,
.category-intro {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 1;
}

.category-name {
  bottom: 56px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-intro {
  bottom: 20px;
  color: #cbd5e1;
  font-size: 14px;
}

.category-tile:hover img {
  opacity: 0.95;
  transform: scale(1.08);
}

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

.main-column,
.side-column {
  min-width: 0;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.68);
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(6, 182, 212, 0.12);
}

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.card-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-score,
.card-play {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: #ffffff;
  font-weight: 800;
}

.card-score {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #fde68a;
  font-size: 13px;
}

.card-play {
  left: 50%;
  bottom: 14px;
  padding: 8px 13px;
  font-size: 13px;
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: #67e8f9;
}

.card-meta {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 13px;
}

.card-body p {
  display: -webkit-box;
  min-height: 62px;
  margin: 10px 0 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.movie-card-compact {
  min-width: 190px;
}

.movie-rail {
  display: grid;
  grid-auto-columns: minmax(190px, 220px);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}

.ranking-list {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(51, 65, 85, 0.84);
  border-radius: 24px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-item {
  display: grid;
  grid-template-columns: 42px 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
  background: rgba(51, 65, 85, 0.55);
  transform: translateX(3px);
}

.rank-number {
  color: #22d3ee;
  font-size: 18px;
  font-weight: 900;
}

.ranking-item img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy {
  display: grid;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  overflow: hidden;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #fde68a;
  font-size: 14px;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.compact-hero {
  padding: 64px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 0;
  color: #94a3b8;
  font-size: 14px;
}

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

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

.movie-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.movie-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.28));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 44px rgba(6, 182, 212, 0.34);
  font-size: 28px;
}

.player-title {
  max-width: min(86%, 620px);
  color: #ffffff;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 900;
  text-align: center;
}

.detail-content {
  display: grid;
  gap: 26px;
}

.detail-block {
  border: 1px solid rgba(51, 65, 85, 0.84);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-block h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.detail-block p {
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
}

.stack-sections {
  display: grid;
  gap: 32px;
}

.category-preview {
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  padding-bottom: 30px;
}

.ranking-page-layout {
  grid-template-columns: 390px minmax(0, 1fr);
}

.large-ranking {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(51, 65, 85, 0.82);
  background: rgba(2, 6, 23, 0.96);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  color: #94a3b8;
}

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

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

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .hero-content,
  .grid-layout,
  .ranking-page-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .large-ranking {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 20px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.96);
  }

  .site-nav.is-open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    padding: 74px 0 92px;
  }

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

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

  .split-heading {
    align-items: start;
    flex-direction: column;
  }

  .compact-hero {
    padding: 40px 24px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

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

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

  .hero-meta,
  .detail-meta {
    gap: 8px;
  }

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
