:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.74);
  --panel-line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #38bdf8;
  --accent-deep: #0284c7;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(14px);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #082f49;
  background: linear-gradient(135deg, #7dd3fc, #0ea5e9);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.45);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  color: var(--muted-strong);
  font-size: 14px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-mini,
.search-wide {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-mini input,
.search-wide input,
.filter-input,
.filter-select {
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.88);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-mini input {
  width: 210px;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
}

.search-mini input:focus,
.search-wide input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(56, 189, 248, 0.82);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.13);
}

.search-button,
.menu-button,
.hero-arrow,
.play-overlay,
.button,
.filter-button {
  border: 0;
  cursor: pointer;
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.main {
  min-height: 72vh;
}

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

.hero-stage {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.32) 70%, rgba(2, 6, 23, 0.84) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 45%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 560px;
  display: flex;
  align-items: center;
  padding: 72px 0 92px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.eyebrow {
  padding: 8px 12px;
  margin-bottom: 18px;
  font-size: 13px;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(36px, 7vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-actions,
.section-head,
.card-meta,
.breadcrumbs,
.tag-list,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.38);
}

.button.ghost {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(14, 165, 233, 0.7);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.section {
  padding: 54px 0;
}

.section.compact {
  padding: 34px 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.section-kicker {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.movie-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 20px 48px rgba(14, 165, 233, 0.18);
}

.card-link {
  display: block;
  height: 100%;
}

.cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #075985);
}

.cover-wrap.wide {
  aspect-ratio: 16 / 9;
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.movie-card:hover .cover-wrap img {
  transform: scale(1.08);
}

.card-shade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.12));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
  opacity: 1;
}

.play-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.card-label {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #64748b;
  font-size: 12px;
  justify-content: space-between;
}

.badge {
  padding: 5px 9px;
  color: #bae6fd;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 150px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.4);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 52px 92px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.ranking-item:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.36);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(56, 189, 248, 0.18);
  font-weight: 800;
}

.rank-cover {
  width: 92px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

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

.rank-title {
  margin: 0 0 6px;
  font-size: 16px;
}

.rank-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  padding: 58px 0 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0));
}

.page-title {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.03em;
}

.page-desc {
  max-width: 780px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.8;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(140px, 180px));
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
}

.filter-input,
.filter-select {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 14px;
}

.filter-empty {
  display: none;
  padding: 38px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.62);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.2;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.18);
  transform: scale(1.08);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.66), #020617 92%);
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: start;
}

.detail-poster {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.detail-lead {
  max-width: 840px;
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.9;
}

.movie-meta-line {
  margin-bottom: 20px;
  color: var(--muted);
}

.tag-list {
  margin-top: 16px;
}

.player-shell {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  overflow: hidden;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: #ffffff;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.28), rgba(2, 6, 23, 0.72));
  z-index: 3;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #082f49;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(56, 189, 248, 0.34);
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  color: #fecdd3;
  font-size: 14px;
}

.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  padding: 26px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 14px 46px rgba(2, 6, 23, 0.22);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 2;
}

.detail-sections {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.site-footer {
  margin-top: 44px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(2, 6, 23, 0.96));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.footer-text,
.footer-link {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.footer-link {
  display: block;
  margin-bottom: 8px;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

  .detail-layout {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
  }

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

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
  }

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

  .nav-link {
    padding: 12px 0;
  }

  .search-mini {
    display: none;
  }

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

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .movie-grid.medium,
  .category-grid,
  .ranking-list,
  .detail-sections,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .container,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-title {
    font-size: 36px;
  }

  .section {
    padding: 38px 0;
  }

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

  .card-body {
    padding: 12px;
  }

  .ranking-item {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-cover {
    width: 72px;
  }
}
