:root {
  --bg: #050507;
  --bg-2: #0c0c10;
  --bg-3: #14141a;
  --bg-card: #1a1a22;
  --red: #E50914;
  --red-hover: #ff1a24;
  --gold: #FFD700;
  --green: #46d369;
  --text: #ffffff;
  --text-2: #b3b3c4;
  --text-3: #6b6b80;
  --border: rgba(255,255,255,0.06);
  --nav-h: 72px;
  --font: 'Outfit', system-ui, sans-serif;
  --ease: 0.25s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: linear-gradient(180deg, rgba(5,5,7,0.97) 0%, rgba(5,5,7,0.75) 80%, transparent 100%);
  transition: background var(--ease);
  padding: 0 4%;
}
.nav.scrolled {
  background: rgba(5,5,7,0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%; max-width: 1600px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.25rem;
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px; border-radius: 8px; background: var(--red);
  display: grid; place-items: center; font-size: 0.9rem;
  box-shadow: 0 0 18px rgba(229,9,20,0.45);
}
.logo .accent { color: var(--red); }
.nav-links { display: flex; gap: 0.2rem; }
.nav-links a {
  padding: 0.4rem 0.85rem; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500; color: var(--text-2);
  transition: all var(--ease);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); background: rgba(255,255,255,0.07);
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.search-box {
  display: flex; align-items: center; gap: 0.45rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.4rem 0.95rem; width: 200px;
  transition: width var(--ease), border-color var(--ease);
}
.search-box:focus-within { width: 280px; border-color: rgba(255,255,255,0.2); }
.search-box input {
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: 0.88rem; width: 100%; font-family: inherit;
}
.search-box input::placeholder { color: var(--text-3); }
.search-box i { color: var(--text-3); font-size: 0.85rem; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-2); position: relative;
}
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.menu-toggle {
  display: none; width: 38px; height: 38px; border-radius: 8px;
  background: rgba(255,255,255,0.06); align-items: center; justify-content: center;
}

.platforms {
  padding: calc(var(--nav-h) + 1rem) 4% 0;
  max-width: 1600px; margin: 0 auto;
}
.platforms-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3);
  margin-bottom: 0.65rem; display: flex; align-items: center; gap: 0.35rem;
}
.platforms-label i { color: var(--gold); }
.platform-row {
  display: flex; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.4rem;
  scrollbar-width: none;
}
.platform-row::-webkit-scrollbar { display: none; }
.plat-chip {
  flex-shrink: 0; padding: 0.4rem 1rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
  background: var(--bg-3); border: 1.5px solid transparent;
  color: var(--text-2); white-space: nowrap; transition: all var(--ease);
}
.plat-chip:hover { color: var(--text); border-color: rgba(255,255,255,0.12); }
.plat-chip.active {
  border-color: var(--red); color: #fff;
  box-shadow: 0 0 0 1px var(--red);
}

.hero {
  position: relative; margin: 1.1rem 4% 0;
  max-width: 1600px; margin-left: auto; margin-right: auto;
  height: min(70vh, 540px); border-radius: 18px; overflow: hidden;
  background: var(--bg-2);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.7s ease; pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5,5,7,0.95) 0%, rgba(5,5,7,0.5) 42%, transparent 72%),
    linear-gradient(0deg, rgba(5,5,7,0.92) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2.25rem 2.75rem 2.75rem; max-width: 560px;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.7rem; }
.badge {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 0.25rem 0.55rem; border-radius: 5px;
}
.badge-hot { background: var(--red); }
.badge-type { background: rgba(255,255,255,0.12); }
.badge-hdr { background: linear-gradient(90deg, #FFD700, #FFA500); color: #111; }
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 0.5rem;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center;
  font-size: 0.88rem; color: var(--text-2); margin-bottom: 0.7rem;
}
.stars { color: var(--gold); }
.hero-desc {
  font-size: 0.92rem; color: var(--text-2); margin-bottom: 1.2rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.3rem; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem; transition: all var(--ease);
}
.btn-play { background: #fff; color: #111; }
.btn-play:hover { background: #e6e6e6; transform: scale(1.03); }
.btn-info {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
}
.btn-info:hover { background: rgba(255,255,255,0.2); }
.btn-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  display: grid; place-items: center;
}
.btn-icon:hover { background: rgba(255,255,255,0.2); }
.btn-icon.in-list { background: var(--red); border-color: var(--red); }
.hero-dots {
  position: absolute; bottom: 1.1rem; right: 1.75rem; z-index: 3;
  display: flex; gap: 0.35rem;
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3);
}
.hero-dots button.active { background: var(--red); width: 20px; border-radius: 4px; }

.stats {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2.25rem;
  padding: 1.5rem 4%; max-width: 1600px; margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.stat strong { display: block; font-size: 1.25rem; font-weight: 800; }
.stat span { font-size: 0.8rem; color: var(--text-3); }
.stat:nth-child(2) strong { color: var(--red); }
.stat:nth-child(3) strong { color: var(--gold); }
.stat:nth-child(4) strong { color: var(--green); }

.notice {
  margin: 1.25rem 4% 0; max-width: 1600px; margin-left: auto; margin-right: auto;
  background: rgba(229,9,20,0.08); border: 1px solid rgba(229,9,20,0.22);
  border-radius: 10px; padding: 0.8rem 1rem; font-size: 0.82rem; color: var(--text-2);
}
.notice strong { color: var(--red); }

.section { padding: 1.5rem 0 0.4rem; max-width: 1600px; margin: 0 auto; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 4%; margin-bottom: 0.85rem;
}
.section-head h2 { font-size: 1.2rem; font-weight: 700; }
.section-head button, .section-head a {
  font-size: 0.84rem; font-weight: 600; color: var(--text-3);
}
.section-head button:hover, .section-head a:hover { color: var(--red); }

.row-wrap { position: relative; }
.row-scroll {
  display: flex; gap: 0.8rem; overflow-x: auto;
  padding: 0.2rem 4% 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-3) transparent;
}
.row-scroll::-webkit-scrollbar { height: 5px; }
.row-scroll::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

.card {
  flex: 0 0 auto; width: 155px; scroll-snap-align: start;
  cursor: pointer; transition: transform var(--ease);
}
.card:hover { transform: translateY(-5px); }
.card:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.card-poster {
  position: relative; aspect-ratio: 2/3; border-radius: 10px;
  overflow: hidden; background: var(--bg-card);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.card-poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.card:hover .card-poster img { transform: scale(1.05); }
.card-poster .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 2.5rem; font-weight: 800; opacity: 0.3;
  background: linear-gradient(160deg, #1a1a28, #050507);
}
.play-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.4);
  display: grid; place-items: center; opacity: 0; transition: opacity var(--ease);
}
.card:hover .play-overlay { opacity: 1; }
.play-overlay span {
  width: 44px; height: 44px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; box-shadow: 0 4px 16px rgba(229,9,20,0.5);
}
.card-rating {
  position: absolute; top: 7px; left: 7px;
  background: rgba(0,0,0,0.75); font-size: 0.7rem; font-weight: 700;
  padding: 0.18rem 0.4rem; border-radius: 5px;
  display: flex; align-items: center; gap: 0.2rem;
}
.card-rating i { color: var(--gold); font-size: 0.6rem; }
.card-info { padding: 0.5rem 0.1rem 0; }
.card-title {
  font-size: 0.85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-sub { font-size: 0.72rem; color: var(--text-3); margin-top: 0.12rem; }

.loading-row {
  padding: 2rem 4%; color: var(--text-3); font-size: 0.9rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border);
  border-top-color: var(--red); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 16px; max-width: 640px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  animation: modalIn 0.28s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: none; }
}
.modal-hero {
  height: 240px; background-size: cover; background-position: center;
  position: relative; border-radius: 16px 16px 0 0;
}
.modal-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg-2) 0%, transparent 55%);
}
.modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.65); display: grid; place-items: center;
}
.modal-body { padding: 0 1.35rem 1.35rem; margin-top: -2.5rem; position: relative; }
.modal-body h2 { font-size: 1.45rem; font-weight: 800; margin-bottom: 0.4rem; }
.modal-meta { color: var(--text-2); font-size: 0.86rem; margin-bottom: 0.75rem; }
.modal-body p { color: var(--text-2); font-size: 0.9rem; margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.trailer-wrap {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: 10px; overflow: hidden; background: #000; margin-top: 0.5rem;
  display: none;
}
.trailer-wrap.show { display: block; }
.trailer-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.modal-note { font-size: 0.78rem; color: var(--text-3); margin-top: 0.75rem; }

footer {
  margin-top: 2.5rem; padding: 2.25rem 4% 1.25rem;
  border-top: 1px solid var(--border); background: var(--bg-2);
}
.footer-inner {
  max-width: 1600px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 1.75rem;
}
.footer-brand p { color: var(--text-3); font-size: 0.86rem; max-width: 280px; margin-top: 0.6rem; }
.footer-col h4 { font-size: 0.84rem; font-weight: 700; margin-bottom: 0.65rem; }
.footer-col a {
  display: block; color: var(--text-3); font-size: 0.86rem; margin-bottom: 0.35rem;
}
.footer-col a:hover { color: var(--red); }
.footer-bottom {
  max-width: 1600px; margin: 1.75rem auto 0; padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-3);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
}
.tmdb-attr { margin-top: 0.5rem; font-size: 0.75rem; color: var(--text-3); }
.tmdb-attr a { color: var(--text-2); text-decoration: underline; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(5,5,7,0.98); padding: 0.85rem; gap: 0.2rem;
    border-bottom: 1px solid var(--border);
  }
  .search-box { width: 130px; }
  .search-box:focus-within { width: 170px; }
  .hero { height: min(58vh, 400px); }
  .hero-content { padding: 1.35rem; max-width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .card { width: 130px; }
}
@media (max-width: 600px) {
  .platforms, .stats, .section-head, .row-scroll, footer, .notice {
    padding-left: 1rem; padding-right: 1rem;
  }
  .row-scroll { padding-left: 1rem; padding-right: 1rem; }
  .hero { margin: 0.65rem 0.65rem 0; border-radius: 12px; height: 360px; }
  .search-box { display: none; }
  .card { width: 115px; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide, .card, .card-poster img { transition: none !important; }
}
