:root {
  --bg: #07111f;
  --bg-soft: #0f1c2f;
  --panel: rgba(15, 28, 47, 0.82);
  --panel-strong: rgba(17, 30, 50, 0.96);
  --primary: #38bdf8;
  --primary-dark: #0369a1;
  --accent: #f59e0b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

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(7, 17, 31, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9, #0369a1 55%, #f59e0b);
  color: white;
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
  background: rgba(56, 189, 248, 0.14);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav a {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border-radius: 12px;
  padding: 10px 12px;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(7, 17, 31, 0.96), rgba(7, 17, 31, 0.58) 45%, rgba(3, 105, 161, 0.18));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 36%, rgba(56, 189, 248, 0.26), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 110px 0 90px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy {
  max-width: 660px;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 22px);
  margin: 22px 0 30px;
}

.hero-actions,
.detail-info .primary-button {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

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

.primary-button,
.search-box button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.28);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

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

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

.hero-dots button {
  width: 38px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-current {
  background: white;
}

.search-panel {
  margin-top: -48px;
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.search-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
}

.search-box {
  display: flex;
  gap: 10px;
  width: min(480px, 100%);
}

.search-box input,
.filter-area input,
.filter-area select {
  width: 100%;
  min-height: 48px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  padding: 0 16px;
}

.filter-area select option {
  color: #0f172a;
}

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

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

.section-title p {
  color: var(--primary);
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
}

.section-more {
  color: var(--primary);
  font-weight: 800;
}

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

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

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

.movie-card {
  background: rgba(15, 28, 47, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 34px 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(56, 189, 248, 0.5);
  box-shadow: var(--shadow);
}

.poster-link,
.poster-shell {
  display: block;
}

.poster-shell {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f2740, #07111f 62%, #3b2f13);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.9);
  color: white;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.34);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  color: var(--muted);
  margin: 8px 0 12px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tags span {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.13);
  border: 1px solid rgba(56, 189, 248, 0.17);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background: linear-gradient(135deg, #0f2740, #07111f);
}

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

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

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  color: #cbd5e1;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-list b {
  color: var(--accent);
}

.rank-list em {
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

.page-hero,
.detail-hero {
  padding: 88px 0 54px;
  background:
    linear-gradient(135deg, rgba(3, 105, 161, 0.3), rgba(7, 17, 31, 0.96)),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 26rem);
  border-bottom: 1px solid var(--line);
}

.slim-hero {
  padding: 64px 0 42px;
}

.page-hero p,
.detail-line {
  max-width: 760px;
  color: #cbd5e1;
  margin: 16px 0 0;
  font-size: 18px;
}

.filter-area {
  display: flex;
  gap: 12px;
  padding-top: 28px;
}

.filter-area select {
  max-width: 180px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 92px 60px 1fr 120px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.ranking-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f2740, #07111f);
}

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

.ranking-number {
  color: var(--accent);
  font-weight: 900;
  font-size: 28px;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.score-box {
  text-align: center;
  color: var(--muted);
}

.score-box b {
  display: block;
  color: var(--primary);
  font-size: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f2740, #07111f);
  box-shadow: var(--shadow);
}

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

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

.detail-tags {
  margin-bottom: 22px;
}

.player-section {
  padding-top: 48px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  z-index: 4;
  color: white;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(7, 17, 31, 0.48), rgba(2, 6, 23, 0.78));
}

.player-cover[hidden] {
  display: none;
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.92);
  box-shadow: 0 20px 48px rgba(14, 165, 233, 0.4);
  font-size: 32px;
}

.player-cover strong {
  font-size: clamp(22px, 3vw, 34px);
}

.player-cover em {
  font-style: normal;
  color: #bfdbfe;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 34px;
}

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

.detail-text h2 {
  margin: 0 0 12px;
}

.detail-text p {
  margin: 0;
  color: #cbd5e1;
}

.site-footer {
  margin-top: 72px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.48);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 520px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

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

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

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

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

  .menu-button {
    display: inline-flex;
  }

  .mobile-nav.is-open {
    display: grid;
  }

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

  .search-panel,
  .footer-grid,
  .section-title,
  .filter-area {
    flex-direction: column;
    align-items: stretch;
  }

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

  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

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

  .ranking-number,
  .score-box {
    display: none;
  }

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

  .detail-poster {
    width: min(260px, 72vw);
  }
}

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

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

  .search-box {
    flex-direction: column;
  }

  .movie-grid,
  .library-grid,
  .related-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }
}
