:root {
  --dark-950: #1a1f2e;
  --dark-900: #2d374c;
  --mirror-900: #172033;
  --mirror-800: #243b53;
  --realm-300: #f3c06e;
  --realm-400: #e8a84d;
  --realm-500: #d4941f;
  --realm-600: #b87d15;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --line-soft: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --shadow-gold: 0 8px 30px rgba(212, 148, 31, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(232, 168, 77, 0.15), transparent 32rem),
    linear-gradient(180deg, var(--dark-950), #111827 62%, var(--dark-950));
  color: var(--text-main);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container-custom {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.section-padding {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.text-gradient {
  background-image: linear-gradient(90deg, var(--realm-300), var(--realm-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: blur(14px);
}

.nav-bar {
  height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 0.75rem;
  color: #111827;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-600));
  box-shadow: var(--shadow-gold);
}

.brand-text {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: #d1d5db;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--realm-400);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.8rem;
  background: var(--glass);
  color: #fff;
}

.menu-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  margin: 0.26rem auto;
  background: currentColor;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  height: 80vh;
  min-height: 34rem;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--mirror-800), var(--dark-950));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(26, 31, 46, 0.92), rgba(26, 31, 46, 0.32), rgba(26, 31, 46, 0.84)),
    linear-gradient(0deg, var(--dark-950), rgba(26, 31, 46, 0.08) 55%, rgba(26, 31, 46, 0.5));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 6.5rem;
}

.hero-copy {
  width: min(48rem, 100%);
  animation: fadeIn 0.5s ease-in-out;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--realm-400);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0.8rem 0 1rem;
  font-size: clamp(2.45rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p {
  max-width: 46rem;
  color: #d1d5db;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  color: #d1d5db;
  font-size: 0.92rem;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.hero-meta span:first-child,
.detail-meta span:first-child {
  color: var(--realm-400);
  font-weight: 800;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn-primary,
.btn-secondary,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border-radius: 0.75rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  padding: 0.75rem 1.25rem;
  color: white;
  background: linear-gradient(135deg, var(--realm-400), var(--realm-600));
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  padding: 0.75rem 1.25rem;
  color: #f9fafb;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.text-link {
  min-height: auto;
  color: var(--realm-400);
}

.btn-primary:hover,
.btn-secondary:hover,
.text-link:hover {
  transform: translateY(-1px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 4;
}

.hero-prev,
.hero-next {
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: #fff;
  background: var(--glass);
  backdrop-filter: blur(14px);
  font-size: 1.6rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 0.45rem;
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 2.2rem;
  background: var(--realm-400);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
}

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

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

.movie-card {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.card-hover {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.card-hover:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-gold);
  border-color: rgba(232, 168, 77, 0.28);
  background: var(--glass-strong);
}

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

.poster-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mirror-800), var(--dark-900));
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 46%);
}

.rating-pill {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 800;
}

.play-mask {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(0.86);
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-info {
  padding: 1rem;
}

.movie-info h3,
.horizontal-card h3 {
  margin: 0 0 0.45rem;
  color: #f9fafb;
  font-size: 1.02rem;
  line-height: 1.35;
}

.movie-info p,
.horizontal-card p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.line-clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-row span {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  color: #f7dba8;
  background: rgba(212, 148, 31, 0.18);
  font-size: 0.75rem;
}

.hot-rank-entry {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.rank-list {
  display: grid;
  gap: 1rem;
}

.horizontal-card {
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  background: var(--glass);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.horizontal-card:hover {
  transform: translateY(-2px);
  background: var(--glass-strong);
  border-color: rgba(232, 168, 77, 0.25);
}

.horizontal-card a {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
}

.horizontal-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.8rem;
  background: var(--mirror-800);
}

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

.rank-num {
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.65rem;
  color: #111827;
  background: var(--realm-400);
  font-weight: 900;
}

.category-preview {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.page-main {
  padding-top: 4.75rem;
}

.page-hero {
  position: relative;
  padding-top: 5.5rem;
  padding-bottom: 3rem;
}

.slim-hero {
  border-bottom: 1px solid var(--line-soft);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.category-card {
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  background: var(--glass);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  background: var(--glass-strong);
  border-color: rgba(232, 168, 77, 0.28);
}

.category-card a {
  display: block;
  padding: 1.35rem;
}

.category-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.category-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.category-card-head span {
  color: var(--realm-400);
  font-weight: 800;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.category-samples span,
.category-samples a {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  color: #f7dba8;
  border-radius: 999px;
  background: rgba(212, 148, 31, 0.16);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(16rem, 1.8fr) repeat(3, minmax(8rem, 1fr)) auto;
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.filter-panel label {
  display: grid;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 2.75rem;
  color: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 0.7rem;
  background: rgba(17, 24, 39, 0.78);
  padding: 0 0.8rem;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(232, 168, 77, 0.62);
}

.filter-result {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.9rem;
  border-radius: 0.7rem;
  color: #f9fafb;
  background: rgba(212, 148, 31, 0.18);
  white-space: nowrap;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 2rem;
  padding-top: 3rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--realm-400);
}

.player-panel,
.detail-info,
.side-card {
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  color: #fff;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start span {
  width: 4.8rem;
  height: 4.8rem;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--realm-300), var(--realm-600));
  box-shadow: var(--shadow-gold);
  font-size: 1.65rem;
}

.player-start strong {
  font-size: 1.1rem;
}

.detail-info {
  margin-top: 1.5rem;
  padding: 1.4rem;
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.detail-info h2 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.35rem;
}

.detail-info p {
  color: #d1d5db;
  margin: 0;
}

.detail-info .one-line {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  color: #f7dba8;
}

.detail-tags {
  margin-top: 1rem;
}

.detail-sidebar {
  position: sticky;
  top: 6rem;
  align-self: start;
  display: grid;
  gap: 1rem;
}

.side-card {
  padding: 1rem;
}

.side-card img {
  width: 100%;
  border-radius: 0.85rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--mirror-800), var(--dark-900));
}

.full-button {
  width: 100%;
  margin-top: 0.85rem;
}

.text-side-card h2 {
  margin: 0 0 0.4rem;
}

.text-side-card p {
  margin: 0;
  color: var(--realm-400);
  font-size: 2rem;
  font-weight: 900;
}

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

.sitemap-section h2 {
  margin-top: 2rem;
}

.sitemap-list {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  list-style: none;
}

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

.sitemap-list.video-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sitemap-list a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 0.55rem;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.035);
}

.sitemap-list a:hover {
  color: var(--realm-400);
  background: rgba(255, 255, 255, 0.07);
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line-soft);
  background: rgba(17, 24, 39, 0.46);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.footer-brand {
  margin-bottom: 1rem;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--text-muted);
}

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

.site-footer ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer h3 {
  margin: 0 0 1rem;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .detail-sidebar {
    position: static;
    grid-template-columns: 16rem 1fr;
  }
}

@media (max-width: 820px) {
  .nav-bar {
    height: 4.25rem;
  }

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

  .nav-links {
    position: fixed;
    top: 4.25rem;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid var(--line-soft);
    border-radius: 1rem;
    background: rgba(17, 24, 39, 0.94);
    backdrop-filter: blur(14px);
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav-link {
    padding: 0.8rem 0.9rem;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.04);
  }

  .hero-carousel {
    height: 72vh;
    min-height: 31rem;
  }

  .hero-content {
    padding-bottom: 6rem;
  }

  .section-head,
  .footer-grid {
    display: grid;
  }

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

  .horizontal-card a {
    grid-template-columns: 6.5rem 1fr;
  }

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

@media (max-width: 560px) {
  .container-custom {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .section-padding {
    padding-top: 2.8rem;
    padding-bottom: 2.8rem;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .sitemap-list.columns,
  .sitemap-list.video-columns,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .horizontal-card a {
    grid-template-columns: 5.5rem 1fr;
    padding: 0.75rem;
  }

  .hero-actions {
    display: grid;
  }
}
