/* ─────────────────────────────────────────────────────────
   MOONVELIN — Premium vertical clip theme
   Palette: deep navy #0a0e1a + gold #d4af37 + ivory #f5f0e1
   Fonts:   Fraunces (serif) + Manrope (body)
───────────────────────────────────────────────────────── */
:root {
  --mv-bg:        #0a0e1a;
  --mv-bg-2:      #0f1626;
  --mv-surface:   rgba(255,255,255,0.04);
  --mv-line:      rgba(212,175,55,0.14);
  --mv-gold:      #d4af37;
  --mv-gold-2:    #c99c2c;
  --mv-ivory:     #f5f0e1;
  --mv-text:      #e8e6df;
  --mv-muted:     #8b8676;
  --mv-danger:    #e05555;
  --mv-radius:    16px;
  --mv-blur:      20px;
  --mv-shadow-lg: 0 30px 80px rgba(0,0,0,.55), 0 8px 24px rgba(0,0,0,.35);
  --mv-serif:     'Fraunces', 'Cormorant Garamond', ui-serif, Georgia, serif;
  --mv-sans:      'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Global */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--mv-bg); color: var(--mv-text); font-family: var(--mv-sans); -webkit-font-smoothing: antialiased; }
body {
  min-height: 100dvh;
  background-image:
    radial-gradient(1200px 700px at 20% -10%, rgba(212,175,55,0.06), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(212,175,55,0.04), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}
/* Noise overlay */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.83 0 0 0 0 0.83 0 0 0 0 0.83 0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: .6; mix-blend-mode: overlay;
}
a { color: var(--mv-ivory); text-decoration: none; }
::selection { background: var(--mv-gold); color: #0a0e1a; }

.mv-serif { font-family: var(--mv-serif); font-weight: 500; letter-spacing: -0.01em; }

/* Custom cursor (desktop only) */
@media (hover: hover) and (pointer: fine) {
  body { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14'><circle cx='7' cy='7' r='4' fill='%23d4af37'/></svg>") 7 7, auto; }
}

/* ── HEADER ───────────────────────────────────────────── */
.mv-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  backdrop-filter: blur(var(--mv-blur));
  -webkit-backdrop-filter: blur(var(--mv-blur));
  background: linear-gradient(180deg, rgba(10,14,26,0.72), rgba(10,14,26,0.35));
  border-bottom: 1px solid var(--mv-line);
}
.mv-brand { display: inline-flex; align-items: center; gap: 8px; }
.mv-brand__mark { color: var(--mv-gold); font-size: 20px; }
.mv-brand__name { font-size: 20px; color: var(--mv-ivory); }
.mv-icon-btn {
  background: transparent; border: 1px solid var(--mv-line); color: var(--mv-ivory);
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: 999px; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.mv-icon-btn:hover { background: rgba(212,175,55,0.1); color: var(--mv-gold); border-color: var(--mv-gold); }
.mv-header__right { display: flex; gap: 8px; }

/* ── SIDE MENU ────────────────────────────────────────── */
.mv-sidemenu { position: fixed; inset: 0; z-index: 60; pointer-events: none; visibility: hidden; }
.mv-sidemenu.is-open { pointer-events: auto; visibility: visible; }
.mv-sidemenu__scrim { position: absolute; inset: 0; z-index: 1; background: rgba(0,0,0,0.55); opacity: 0; transition: opacity .28s ease; }
.mv-sidemenu.is-open .mv-sidemenu__scrim { opacity: 1; }
.mv-sidemenu__panel {
  position: absolute; top: 0; left: 0; bottom: 0;
  z-index: 2;
  width: min(320px, 84vw);
  background: linear-gradient(180deg, #0d1424, #0a0e1a);
  border-right: 1px solid var(--mv-line);
  padding: 18px; transform: translateX(-100%); transition: transform .3s ease;
  overflow-y: auto;
}
.mv-sidemenu.is-open .mv-sidemenu__panel { transform: translateX(0); }
.mv-sidemenu__head { display: flex; justify-content: space-between; align-items: center; font-size: 20px; margin-bottom: 14px; }
.mv-sidemenu nav { display: flex; flex-direction: column; }
.mv-sidemenu nav a { padding: 10px 8px; border-radius: 10px; color: var(--mv-text); font-size: 14px; }
.mv-sidemenu nav a:hover { background: rgba(212,175,55,0.08); color: var(--mv-gold); }
.mv-sidemenu__label { padding: 12px 8px 6px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; color: var(--mv-muted); }
.mv-sidemenu hr { border: none; border-top: 1px solid var(--mv-line); margin: 10px 0; }

/* ── CHIP BAR ─────────────────────────────────────────── */
.mv-chipbar {
  position: sticky; top: 68px; z-index: 30;
  background: linear-gradient(180deg, rgba(10,14,26,0.78), rgba(10,14,26,0.55));
  backdrop-filter: blur(var(--mv-blur));
  border-bottom: 1px solid var(--mv-line);
}
.mv-chipbar__inner {
  display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; scrollbar-width: none;
}
.mv-chipbar__inner::-webkit-scrollbar { display: none; }
.mv-chip {
  flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--mv-line); border-radius: 999px;
  color: var(--mv-text); font-size: 13px; font-weight: 500; white-space: nowrap;
  background: rgba(255,255,255,0.02); transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.mv-chip:hover { border-color: var(--mv-gold); color: var(--mv-gold); transform: translateY(-1px); }
.mv-chip--active { background: var(--mv-gold); color: #0a0e1a; border-color: var(--mv-gold); font-weight: 600; }

/* ── MAIN ─────────────────────────────────────────────── */
.mv-main {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; gap: 0;
}
@media (min-width: 1024px) {
  .mv-main { grid-template-columns: 1fr 320px; max-width: 1200px; margin: 0 auto; padding: 24px; gap: 32px; }
}

/* ── FEED ─────────────────────────────────────────────── */
.mv-feed {
  scroll-snap-type: y mandatory;
  height: calc(100dvh - 116px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.mv-feed::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
  .mv-feed { height: calc(100dvh - 100px); border-radius: var(--mv-radius); }
}
.mv-feed__loader { padding: 40px; text-align: center; color: var(--mv-muted); font-size: 14px; letter-spacing: 0.1em; }

/* Clip card */
.mv-clip {
  scroll-snap-align: start;
  position: relative;
  height: calc(100dvh - 116px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .mv-clip { height: calc(100dvh - 100px); }
}
.mv-clip__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(40px) brightness(0.5) saturate(1.1);
  transform: scale(1.15);
  z-index: 0;
}
.mv-clip__frame {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  max-width: 100vw;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 1024px) {
  .mv-clip__frame { max-width: 480px; box-shadow: var(--mv-shadow-lg); border-radius: 20px; overflow: hidden; }
}
.mv-clip__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  background: #000;
}
.mv-clip__tap {
  position: absolute; inset: 0; z-index: 2; cursor: pointer;
}
.mv-clip__play-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 72px; height: 72px; border-radius: 999px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(10px);
  display: none; place-items: center; z-index: 3;
  color: var(--mv-ivory); pointer-events: none;
}
.mv-clip.is-paused .mv-clip__play-icon { display: grid; }
.mv-clip__gradient {
  position: absolute; inset: 0; z-index: 4;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}

/* Meta */
.mv-clip__meta {
  position: absolute; left: 16px; right: 88px; bottom: 22px; z-index: 10;
  color: var(--mv-ivory);
}
.mv-clip__title { font-family: var(--mv-serif); font-size: 20px; line-height: 1.2; margin: 0 0 8px; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }
.mv-clip__source {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(10,14,26,0.6); border: 1px solid var(--mv-line);
  font-size: 12px; letter-spacing: 0.05em; color: var(--mv-ivory);
  transition: border-color .25s, box-shadow .25s;
}
.mv-clip__source:hover { border-color: var(--mv-gold); box-shadow: 0 0 24px rgba(212,175,55,0.35); color: var(--mv-gold); }
.mv-clip__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mv-clip__tag { font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--mv-line); color: var(--mv-ivory); background: rgba(10,14,26,0.35); }
.mv-clip__tag:hover { border-color: var(--mv-gold); color: var(--mv-gold); }

/* Action rail */
.mv-clip__actions {
  position: absolute;
  right: 12px;
  bottom: 24px;
  z-index: 10;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
@media (min-width: 1024px) {
  .mv-clip__actions {
    left: 50%;
    right: auto;
    transform: translateX(calc(min(480px, calc(100dvh * 9/16)) / 2 + 16px));
    bottom: 24px;
  }
}
.mv-action {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: transparent; border: none; cursor: pointer; color: var(--mv-ivory);
  font-family: var(--mv-sans); font-size: 12px; padding: 0;
  transition: transform .2s ease;
}
.mv-action__btn {
  width: 46px; height: 46px; border-radius: 999px;
  background: rgba(10,14,26,0.6); border: 1px solid var(--mv-line);
  display: grid; place-items: center;
  color: var(--mv-ivory); transition: background-color .2s, color .2s, border-color .2s, transform .2s;
  backdrop-filter: blur(10px);
}
.mv-action:hover .mv-action__btn { border-color: var(--mv-gold); color: var(--mv-gold); transform: scale(1.08); }
.mv-action.is-active .mv-action__btn { background: var(--mv-gold); color: #0a0e1a; border-color: var(--mv-gold); }
.mv-action__count { min-height: 14px; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }

/* Muted indicator */
.mv-clip__muted {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  padding: 6px 10px; border-radius: 999px; font-size: 11px;
  background: rgba(10,14,26,0.6); border: 1px solid var(--mv-line);
  color: var(--mv-ivory); pointer-events: none;
  transition: opacity .3s;
}
.mv-clip.is-unmuted .mv-clip__muted { opacity: 0; }

/* ── UP NEXT (desktop) ────────────────────────────────── */
.mv-upnext { display: none; }
@media (min-width: 1024px) {
  .mv-upnext {
    display: flex; flex-direction: column; gap: 14px;
    height: calc(100dvh - 100px); overflow-y: auto;
    padding: 4px; scrollbar-width: thin; scrollbar-color: var(--mv-line) transparent;
  }
  .mv-upnext::before {
    content: "Up next"; font-family: var(--mv-serif); font-size: 18px; color: var(--mv-ivory);
    padding: 6px 4px 4px; border-bottom: 1px solid var(--mv-line); margin-bottom: 4px;
  }
}
.mv-upnext__item { display: flex; gap: 10px; padding: 8px; border-radius: 12px; transition: background-color .2s; cursor: pointer; }
.mv-upnext__item:hover { background: rgba(212,175,55,0.06); }
.mv-upnext__thumb { flex: 0 0 72px; height: 100px; border-radius: 8px; background-size: cover; background-position: center; background-color: #111; }
.mv-upnext__info { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.mv-upnext__title { font-size: 13px; line-height: 1.35; margin: 0; color: var(--mv-ivory); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.mv-upnext__meta { font-size: 11px; color: var(--mv-muted); }

/* ── AGE GATE ─────────────────────────────────────────── */
.mv-age-gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5,7,14,0.92); backdrop-filter: blur(14px);
  display: grid; place-items: center; padding: 20px;
}
.mv-age-gate__card {
  max-width: 460px; width: 100%;
  background: linear-gradient(180deg, #101827, #0a0e1a);
  border: 1px solid var(--mv-line); border-radius: 20px;
  padding: 28px; text-align: center; box-shadow: var(--mv-shadow-lg);
}
.mv-age-gate__card h1 { font-size: 32px; color: var(--mv-ivory); margin: 0 0 10px; }
.mv-age-gate__card p { color: var(--mv-text); line-height: 1.55; margin: 0 0 18px; font-size: 14px; }
.mv-age-gate__row { display: flex; gap: 10px; justify-content: center; margin: 18px 0 10px; }
.mv-age-gate__legal { font-size: 12px; color: var(--mv-muted); }
.mv-age-gate__legal a { color: var(--mv-gold); }

.mv-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-family: var(--mv-sans);
  font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: transform .18s, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.mv-btn:hover { transform: translateY(-1px); }
.mv-btn--gold { background: var(--mv-gold); color: #0a0e1a; }
.mv-btn--gold:hover { background: var(--mv-gold-2); box-shadow: 0 0 28px rgba(212,175,55,0.4); }
.mv-btn--ghost { border-color: var(--mv-line); color: var(--mv-ivory); background: transparent; }
.mv-btn--ghost:hover { border-color: var(--mv-gold); color: var(--mv-gold); }

/* ── TOAST ────────────────────────────────────────────── */
.mv-toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  z-index: 90; padding: 10px 18px; border-radius: 999px;
  background: rgba(15,22,38,0.94); border: 1px solid var(--mv-gold);
  color: var(--mv-ivory); font-size: 13px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: mv-toast-in .25s ease;
}
@keyframes mv-toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%,0); } }

/* ── BOTTOM STICKY BANNER ─────────────────────────────── */
.mv-bottom-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; justify-content: center; padding: 8px;
  backdrop-filter: blur(8px); background: rgba(10,14,26,0.75);
  border-top: 1px solid var(--mv-line);
}
.mv-bottom-sticky iframe, .mv-bottom-sticky > div { max-width: 100%; }

/* ── VAST PRE-ROLL ────────────────────────────────────── */
.mv-vast-overlay {
  position: absolute; inset: 0; z-index: 20; background: #000;
  display: grid; place-items: center;
}
.mv-vast-overlay video { width: 100%; height: 100%; object-fit: contain; }
.mv-vast-skip {
  position: absolute; right: 14px; bottom: 14px; z-index: 25;
  padding: 8px 14px; border-radius: 999px; background: rgba(10,14,26,0.85);
  color: var(--mv-ivory); border: 1px solid var(--mv-gold); font-size: 12px; cursor: pointer;
  font-family: var(--mv-sans);
}
.mv-vast-skip:disabled { opacity: 0.65; cursor: not-allowed; border-color: var(--mv-line); }
.mv-vast-unmute {
  position: absolute; top: 14px; right: 14px; z-index: 25;
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(10,14,26,0.85); border: 1px solid var(--mv-line);
  color: var(--mv-ivory); cursor: pointer;
  display: grid; place-items: center;
  transition: color .2s, border-color .2s;
}
.mv-vast-unmute:hover { color: var(--mv-gold); border-color: var(--mv-gold); }
.mv-vast-unmute.is-on { color: var(--mv-gold); border-color: var(--mv-gold); }
.mv-vast-overlay video { pointer-events: auto; }

/* ── STATIC PAGES ─────────────────────────────────────── */
.mv-static { max-width: 780px; margin: 0 auto; padding: 40px 22px 80px; }
.mv-static h1 { font-family: var(--mv-serif); font-size: 40px; margin: 0 0 8px; color: var(--mv-ivory); }
.mv-static h2 { font-family: var(--mv-serif); font-size: 22px; margin: 28px 0 10px; color: var(--mv-gold); }
.mv-static p, .mv-static li { line-height: 1.7; color: var(--mv-text); font-size: 15px; }
.mv-static a { color: var(--mv-gold); border-bottom: 1px dotted var(--mv-gold); }
.mv-static hr { border: none; border-top: 1px solid var(--mv-line); margin: 30px 0; }

.mv-tagline { padding: 22px 24px 4px; }
.mv-tagline h1 { margin: 0; font-size: 32px; color: var(--mv-ivory); }

@media (max-width: 375px) {
  .mv-brand__name { font-size: 18px; }
  .mv-clip__title { font-size: 17px; }
}
