:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(59, 130, 246, 0.24);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.18);
  --radius: 18px;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #000000 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #050505;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}

.brand-text strong {
  display: block;
  letter-spacing: 0.04em;
  font-size: 20px;
}

.brand-text small {
  display: block;
  margin-top: 1px;
  color: #93c5fd;
  font-size: 11px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  color: #dbeafe;
  font-size: 14px;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--accent);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.header-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.primary-btn {
  background: var(--accent);
  color: #050505;
  font-weight: 700;
  padding: 10px 18px;
}

.primary-btn:hover,
.header-search button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px) scale(1.02);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, 0.3);
  background: rgba(15, 23, 42, 0.42);
}

.ghost-btn:hover {
  color: var(--accent);
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.block {
  display: block;
  text-align: center;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav-inner {
  display: grid;
  gap: 10px;
  padding: 14px 0 18px;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.52) 46%, rgba(2, 6, 23, 0.72) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 36%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: relative;
  height: 72vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 118px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  max-width: 720px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.detail-meta a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: var(--blue-soft);
  border: 1px solid rgba(59, 130, 246, 0.22);
  font-size: 13px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 36px;
  background: var(--accent);
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 12px;
  width: min(520px, 52vw);
}

.hero-thumbs a {
  position: relative;
  min-height: 74px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
}

.hero-thumbs span {
  position: absolute;
  inset: auto 8px 8px 8px;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

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

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

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
}

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

.section-more {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

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

.feature-card,
.movie-card,
.category-card,
.info-card,
.ranking-box,
.related-panel,
.poster-panel,
.detail-title-card,
.player-card {
  border: 1px solid var(--line-soft);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.62);
  box-shadow: 0 28px 90px rgba(30, 64, 175, 0.25);
}

.feature-card figure,
.movie-card figure {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.feature-card figure {
  aspect-ratio: 16 / 9;
}

.movie-card figure {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

.feature-card img,
.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.feature-card:hover img,
.movie-card:hover img,
.rank-card:hover img {
  transform: scale(1.08);
}

.feature-card figure::after,
.movie-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.05));
}

.play-float,
.poster-play {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.96);
  color: #050505;
}

.play-float {
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.feature-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.corner-badge,
.poster-badge,
.poster-region {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.corner-badge,
.poster-region {
  left: 10px;
  top: 10px;
  color: #050505;
  background: rgba(245, 158, 11, 0.94);
}

.poster-badge {
  right: 10px;
  top: 10px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.feature-card-body {
  padding: 18px;
}

.feature-card h3,
.movie-card h3,
.rank-card h3 {
  margin: 0;
  color: #ffffff;
  transition: color 0.2s ease;
}

.feature-card:hover h3,
.movie-card:hover h3,
.rank-card:hover h3 {
  color: var(--accent);
}

.feature-card p,
.movie-card p,
.rank-card p {
  color: var(--muted);
  line-height: 1.65;
}

.feature-card p,
.movie-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-card p {
  -webkit-line-clamp: 2;
}

.movie-card p {
  margin: 8px 0 10px;
  -webkit-line-clamp: 2;
  font-size: 13px;
}

.meta-row,
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.category-band,
.category-strip:nth-of-type(even) {
  background: rgba(15, 23, 42, 0.32);
}

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

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

.category-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.86));
}

.category-card span {
  font-size: 34px;
  margin-bottom: 12px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
}

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

.category-card b {
  margin-top: 16px;
  color: var(--accent);
}

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

.poster-grid.compact {
  gap: 16px;
}

.movie-card {
  display: block;
  padding: 10px;
  border-radius: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card h3 {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.ranking-box,
.related-panel,
.poster-panel {
  border-radius: var(--radius);
  padding: 20px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: auto 82px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(245, 158, 11, 0.45);
}

.rank-card img {
  width: 82px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.35s ease;
}

.rank-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #050505;
  font-weight: 900;
  font-size: 13px;
}

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

.page-hero {
  position: relative;
  padding: 72px 0 54px;
  background:
    radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.52));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 860px;
}

.detail-page {
  padding: 36px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-title-card,
.info-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.2), rgba(2, 6, 23, 0.56));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.96);
  color: #020617;
  font-size: 34px;
  box-shadow: 0 0 0 14px rgba(245, 158, 11, 0.16);
}

.detail-title-card,
.info-card {
  padding: 24px;
}

.detail-title-card h1,
.info-card h2,
.related-panel h2 {
  margin: 0 0 16px;
}

.detail-title-card p,
.info-card p {
  color: var(--soft);
  line-height: 1.9;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.info-card dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
}

.info-card dt {
  color: #64748b;
}

.info-card dd {
  margin: 0;
  color: var(--soft);
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 16px;
}

.search-layout {
  display: grid;
  gap: 26px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #000);
  color: var(--muted);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  margin-bottom: 12px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

.site-footer p,
.site-footer li {
  line-height: 1.75;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a:hover {
  color: var(--accent);
}

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

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

  .menu-toggle {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

  .detail-side {
    position: static;
  }
}

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

  .header-inner {
    min-height: 62px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .header-search {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 78vh;
    height: 78vh;
  }

  .hero-content {
    padding-bottom: 128px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-panel {
    display: grid;
    gap: 14px;
  }

  .hero-thumbs {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .section-heading {
    display: grid;
  }

  .poster-grid,
  .poster-grid.compact,
  .feature-grid,
  .category-grid,
  .category-grid.large,
  .ranking-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid,
  .ranking-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    padding: 52px 0 42px;
  }

  .detail-title-card,
  .info-card {
    padding: 18px;
  }
}

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

  .hero-actions {
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
    justify-content: center;
  }
}
