:root {
  --night-950: #0a1929;
  --night-900: #102a43;
  --night-800: #243b53;
  --night-700: #334e68;
  --night-600: #486581;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --text: #f8fafc;
  --muted: #bcccdc;
  --line: rgba(255, 255, 255, 0.10);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.18), transparent 34%),
    radial-gradient(circle at 85% 2%, rgba(72, 101, 129, 0.34), transparent 30%),
    linear-gradient(180deg, var(--night-950), var(--night-900) 48%, #07111f);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
}

body.locked {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 42, 67, 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, 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-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

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

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slider {
  position: relative;
  min-height: calc(100vh - 72px);
}

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

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

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 25, 41, 0.98) 0%, rgba(10, 25, 41, 0.80) 42%, rgba(10, 25, 41, 0.22) 100%),
    linear-gradient(0deg, rgba(10, 25, 41, 0.92) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 42px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.14);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-title-small {
  display: block;
  margin-bottom: 10px;
  color: #fde68a;
  font-size: clamp(18px, 2.5vw, 28px);
  letter-spacing: 0;
}

.hero-desc {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 20px);
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(51, 78, 104, 0.92);
  border-color: rgba(255, 255, 255, 0.10);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.hero-panel {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(16, 42, 67, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
}

.hero-panel h2 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
}

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

.hero-dot {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--amber-500);
}

.section {
  padding: 74px 0;
}

.section.compact {
  padding-top: 34px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: 0 0 auto;
  color: #fde68a;
  font-weight: 800;
}

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

.video-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  background: rgba(36, 59, 83, 0.88);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.20);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.video-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.video-card:hover .video-card-image {
  transform: scale(1.05);
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  right: 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  left: 12px;
  color: #1f2937;
  background: #fde68a;
}

.card-body {
  padding: 18px;
}

.card-meta {
  margin: 0 0 6px;
  color: #fcd34d;
  font-size: 13px;
  font-weight: 800;
}

.card-body h3 {
  min-height: 58px;
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.card-desc {
  min-height: 58px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(72, 101, 129, 0.18)),
    rgba(36, 59, 83, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.46);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
}

.category-card span {
  color: var(--muted);
}

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

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.search-panel {
  margin: 28px 0 30px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(36, 59, 83, 0.68);
}

.search-title {
  margin-bottom: 14px;
  color: #fde68a;
  font-weight: 900;
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #ffffff;
  background: rgba(10, 25, 41, 0.70);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(245, 158, 11, 0.70);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  color: #1f2937;
  background: #fde68a;
}

.no-results {
  display: none;
  margin-top: 24px;
  padding: 22px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.no-results.show {
  display: block;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: start;
}

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

.mini-card {
  display: grid;
  grid-template-columns: auto 84px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(36, 59, 83, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mini-card:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.mini-card img {
  width: 84px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.mini-rank {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #1f2937;
  background: #fde68a;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--detail-bg) center / cover no-repeat;
  opacity: 0.22;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 25, 41, 0.96), rgba(10, 25, 41, 0.72));
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 0.45fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-copy p {
  color: var(--muted);
}

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

.meta-line span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.player-section {
  padding: 54px 0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.42));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #1f2937;
  background: #fde68a;
  font-size: 30px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.30);
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 13px;
}

.story-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.story-card {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  background: rgba(36, 59, 83, 0.66);
}

.story-card h2 {
  margin: 0 0 12px;
}

.story-card p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(10, 25, 41, 0.74);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  color: var(--muted);
}

.footer-inner p {
  margin: 10px 0 0;
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-inner,
  .ranking-layout,
  .story-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    flex-direction: column;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(16, 42, 67, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
  }

  .hero,
  .hero-slider,
  .hero-slide {
    min-height: 720px;
  }

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

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

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

  .card-body {
    padding: 14px;
  }

  .card-body h3 {
    min-height: auto;
    font-size: 16px;
  }

  .card-desc {
    display: none;
  }

  .mini-card {
    grid-template-columns: auto 74px minmax(0, 1fr);
  }

  .mini-card img {
    width: 74px;
  }
}

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

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }
}
