:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --accent-3: #8b5cf6;
  --radius-lg: 30px;
  --radius-md: 22px;
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.24), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(6, 182, 212, 0.16), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(20px);
}

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

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

.site-logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 15px 34px rgba(37, 99, 235, 0.42);
}

.site-logo-text {
  font-size: 20px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: currentColor;
}

.home-hero {
  position: relative;
  height: min(86vh, 850px);
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #020617);
  transform: scale(1.03);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.25)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 45%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 48px;
  padding-top: 120px;
  padding-bottom: 86px;
}

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

.hero-eyebrow {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-eyebrow span,
.panel-kicker,
.section-heading span:first-child {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.2);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.hero p,
.page-hero p,
.section-heading p,
.panel-card p,
.content-card p,
.footer-grid p,
.movie-card p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  font-size: 12px;
}

.hero-tags {
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.movie-card:hover,
.category-tile:hover,
.mini-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.36);
}

.button.ghost {
  color: #ffffff;
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.56);
}

.hero-poster {
  align-self: end;
  display: block;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.65);
}

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

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

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

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

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

.hero-dots button {
  width: 26px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 48px;
  background: #ffffff;
}

.section {
  padding: 54px 0;
}

.float-search {
  position: relative;
  z-index: 6;
  margin-top: -54px;
  padding-top: 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-page h1,
.content-card h2,
.panel-card h2 {
  margin: 10px 0 0;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading p {
  max-width: 660px;
  margin: 8px 0 0;
}

.section-link {
  color: #93c5fd;
  font-weight: 800;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.3);
}

.search-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.66);
  outline: none;
  padding: 0 14px;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.large-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 41, 59, 0.82);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #1e293b, #020617);
}

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.82);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.38;
}

.movie-card-title a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card p {
  display: -webkit-box;
  min-height: 58px;
  margin: 8px 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile.wide {
  min-height: 164px;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.14));
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  margin: 86px 18px 5px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.category-tile strong {
  margin: 0 18px;
  color: #93c5fd;
  font-size: 13px;
}

.split-section,
.ranking-layout,
.detail-grid,
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.panel-card,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.22);
}

.panel-card {
  padding: 26px;
}

.panel-card h2 {
  font-size: 30px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.quick-links a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.6);
  font-size: 13px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.big-rank-list .rank-item {
  grid-template-columns: 56px 72px minmax(0, 1fr);
  padding: 12px;
}

.rank-no {
  color: #60a5fa;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text strong {
  margin-bottom: 4px;
}

.rank-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 180px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.mini-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  scroll-snap-align: start;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
  background: #0f172a;
}

.mini-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.page-shell {
  padding-top: 92px;
}

.page-hero {
  padding: 72px 0 28px;
}

.compact-page-hero {
  max-width: 900px;
}

.page-hero span {
  color: #60a5fa;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-hero h1 {
  font-size: clamp(44px, 7vw, 78px);
}

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

.empty-state {
  display: none;
  margin: 26px 0 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.62);
}

.empty-state.is-visible {
  display: block;
}

.detail-page {
  background: #020617;
}

.detail-hero {
  position: relative;
  min-height: 760px;
  padding: 112px 0 70px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  object-fit: cover;
  opacity: 0.28;
  filter: blur(24px) saturate(1.2);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.9)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 48%, rgba(2, 6, 23, 0.84) 100%);
}

.detail-grid {
  position: relative;
  z-index: 1;
  align-items: start;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-page h1 {
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
}

.detail-line {
  max-width: 840px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.75;
}

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

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.video-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.3));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.48);
  font-size: 34px;
  text-indent: 5px;
}

.player-overlay strong {
  font-size: 16px;
}

.video-player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

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

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
  background: #0f172a;
}

.detail-side dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.detail-side dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
  text-align: right;
}

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

.content-card {
  padding: 30px;
}

.content-card h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

.content-card p {
  margin: 0 0 16px;
  font-size: 16px;
}

.sticky-panel {
  position: sticky;
  top: 96px;
  height: max-content;
}

.site-footer {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 38px 0;
}

.footer-logo {
  margin-bottom: 10px;
  font-size: 20px;
}

.footer-grid p {
  margin: 0;
  max-width: 620px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #bfdbfe;
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-nav {
    position: fixed;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .nav-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-bottom: 70px;
  }

  .hero-poster {
    display: none;
  }

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

  .search-input-wrap {
    grid-column: 1 / -1;
  }

  .split-section,
  .ranking-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-side,
  .sticky-panel {
    position: static;
  }

  .detail-side {
    max-width: 380px;
  }
}

@media (max-width: 640px) {
  .container,
  .site-header-inner {
    width: min(100% - 24px, 1240px);
  }

  .home-hero {
    min-height: 620px;
    height: 84vh;
  }

  .hero-content {
    padding-top: 104px;
    padding-bottom: 78px;
  }

  .hero-control {
    display: none;
  }

  .section {
    padding: 38px 0;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 14px;
  }

  .search-panel {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

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

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

  .movie-card p {
    display: none;
  }

  .tag-row {
    gap: 6px;
  }

  .detail-hero {
    min-height: auto;
    padding-top: 100px;
  }

  .player-overlay strong {
    display: none;
  }

  .play-icon {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }

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

  .footer-links {
    flex-wrap: wrap;
  }
}
