:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-2: #d97706;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
  font-size: 15px;
  font-weight: 900;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  flex: 1;
  font-size: 15px;
  color: #cbd5e1;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.text-link {
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--amber);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 18px;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mobile-nav a {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
}

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

.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 48%, rgba(2, 6, 23, 0.64) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 20px));
  bottom: 88px;
  width: min(740px, calc(100vw - 48px));
  z-index: 2;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero h1,
.sub-hero h1 {
  margin-top: 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p,
.sub-hero p {
  max-width: 760px;
  margin-top: 18px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.detail-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  color: #cbd5e1;
  font-size: 14px;
}

.hero-meta span,
.detail-meta-line span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.full-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #111827;
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.28);
}

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

.ghost-btn,
.section-more {
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover,
.section-more:hover {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--amber);
}

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

.hero-dot {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 56px;
  background: #fbbf24;
}

.content-section {
  padding: 78px 20px;
}

.dark-section {
  background: #0f172a;
}

.deep-section {
  background: #020617;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .card-cover img,
.category-tile:hover img,
.overview-image:hover img,
.poster-panel:hover img {
  transform: scale(1.08);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.card-badge,
.card-year {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: #fbbf24;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.3);
  backdrop-filter: blur(10px);
}

.card-badge {
  left: 12px;
}

.card-year {
  right: 12px;
  color: #e2e8f0;
  border-color: var(--line);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  gap: 8px;
  color: #fbbf24;
  font-size: 12px;
  margin-bottom: 10px;
}

.card-meta span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body h3 {
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.card-body h3 a:hover {
  color: #fbbf24;
}

.card-body p {
  margin-top: 10px;
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 330px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
}

.movie-card-compact {
  scroll-snap-align: start;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: minmax(160px, 42%) 1fr;
}

.movie-card-wide .card-cover {
  aspect-ratio: auto;
  min-height: 100%;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111827;
  border: 1px solid var(--line);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.category-tile span,
.category-tile small {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
}

.category-tile span {
  bottom: 60px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  bottom: 24px;
  color: #cbd5e1;
  line-height: 1.5;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 36px;
}

.rank-list,
.poster-stack,
.related-list {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 54px 96px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.9);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.44);
}

.rank-num {
  color: #fbbf24;
  font-size: 22px;
  font-weight: 900;
}

.rank-item img {
  width: 96px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
}

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

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

.rank-text strong {
  font-size: 16px;
  font-weight: 800;
}

.rank-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.sub-hero {
  padding: 96px 20px 72px;
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.20), transparent 28%),
    linear-gradient(135deg, #020617 0%, #0f172a 100%);
  border-bottom: 1px solid var(--line);
}

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

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

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--line);
}

.overview-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.overview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.overview-body {
  padding: 22px;
}

.overview-body h2 {
  font-size: 22px;
  font-weight: 900;
}

.overview-body p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.overview-links a {
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: #fbbf24;
  font-weight: 800;
}

.filter-bar {
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.88);
}

.sticky-filter {
  position: sticky;
  top: 78px;
  z-index: 4;
  backdrop-filter: blur(14px);
}

.filter-bar input {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid var(--line);
}

.filter-bar input:focus {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

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

.filter-buttons button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.09);
}

.filter-buttons button:hover,
.filter-buttons button.is-active {
  color: #111827;
  background: #fbbf24;
  border-color: #fbbf24;
}

.no-result {
  display: none;
  margin-top: 26px;
  padding: 28px;
  text-align: center;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--line);
}

.no-result.is-visible {
  display: block;
}

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

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 20px 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
}

.detail-breadcrumb {
  margin-bottom: 20px;
}

.player-card,
.text-panel,
.detail-info,
.poster-panel,
.related-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.24);
}

.player-card {
  overflow: hidden;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.48));
  cursor: pointer;
}

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

.center-play {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-size: 30px;
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.28);
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.08));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-frame:hover .player-controls,
.player-controls.is-active {
  opacity: 1;
}

.player-controls button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

.player-controls button:hover {
  color: #111827;
  background: #fbbf24;
}

.control-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e2e8f0;
  font-weight: 700;
}

.player-message {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #fecaca;
  text-align: center;
  background: rgba(2, 6, 23, 0.88);
}

.player-message.is-visible {
  display: flex;
}

.detail-info,
.text-panel {
  margin-top: 22px;
  padding: 26px;
}

.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 900;
}

.lead {
  margin-top: 16px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.text-panel h2,
.related-panel h2 {
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
}

.text-panel p {
  color: #cbd5e1;
  line-height: 1.95;
  white-space: pre-line;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.poster-panel {
  padding: 18px;
  position: sticky;
  top: 92px;
}

.poster-panel img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.full-btn {
  width: 100%;
  margin-top: 16px;
}

.related-panel {
  padding: 18px;
}

.related-panel .movie-card {
  box-shadow: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #020617;
  padding: 42px 20px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.footer-brand {
  font-size: 18px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 18px;
  color: #cbd5e1;
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

  .poster-panel {
    position: static;
  }

  .detail-side {
    grid-template-columns: 320px 1fr;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: 620px;
  }

  .movie-grid-three,
  .movie-grid-four,
  .category-grid,
  .highlight-grid,
  .category-overview-grid,
  .ranking-page-list,
  .split-layout,
  .detail-side,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .header-inner {
    padding: 12px 16px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

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

  .hero {
    height: 680px;
  }

  .hero-content {
    left: 18px;
    bottom: 72px;
    width: calc(100vw - 36px);
  }

  .hero h1,
  .sub-hero h1 {
    font-size: 40px;
  }

  .hero-actions,
  .section-heading,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
  }

  .content-section {
    padding: 54px 16px;
  }

  .movie-grid-three,
  .movie-grid-four,
  .category-grid,
  .highlight-grid,
  .category-overview-grid,
  .ranking-page-list,
  .split-layout,
  .detail-side,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    padding: 24px 16px 56px;
  }

  .player-controls {
    opacity: 1;
  }

  .control-title {
    display: none;
  }

  .sub-hero {
    padding: 72px 16px 50px;
  }
}
