/* The Watch Party — "Neon Marquee After Dark" design system */
:root {
  --bg: #08060f;
  --bg-2: #0d0a18;
  --ink: #ece9f7;
  --muted: #9b93b8;
  --faint: #6a6386;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --violet: #8b5cf6;
  --violet-hi: #b79bff;
  --magenta: #ff4d9d;
  --cyan: #34e0e0;
  --grad: linear-gradient(120deg, #7c5cff 0%, #b14dff 55%, #ff4d9d 100%);
  --grad-soft: linear-gradient(120deg, rgba(124, 92, 255, 0.25), rgba(255, 77, 157, 0.18));
  --live: #ff4d6a;
  --ok: #55e2a5;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 40px -6px rgba(124, 92, 255, 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Satoshi', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
/* Aurora glow + grain atmosphere */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(124, 92, 255, 0.35), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(255, 77, 157, 0.18), transparent 55%),
    radial-gradient(700px 600px at 50% 120%, rgba(52, 224, 224, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
/* Dropdown option list: force a dark background so light option text is readable. */
select option, select optgroup { background: #14101f; color: var(--ink); }

h1, h2, h3, .display { font-family: 'Clash Display', 'Satoshi', sans-serif; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr 336px; gap: 22px; max-width: 1560px; margin: 0 auto; padding: 22px; align-items: start; }
.rail-l { position: sticky; top: 22px; }
.rail-r { position: sticky; top: 22px; margin-top: 74px; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 26px; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 22px; }
.brand .mark { width: 38px; height: 38px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; box-shadow: var(--glow); flex: none; }
.brand .mark svg { width: 20px; height: 20px; }
.brand b { font-family: 'Clash Display', sans-serif; font-weight: 700; font-size: 16px; line-height: 1; letter-spacing: 0.02em; }
.brand span { display: block; font-size: 10px; letter-spacing: 0.32em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }

/* ---------- Glass panels ---------- */
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); }
.pad { padding: 20px; }

/* ---------- Left nav ---------- */
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 13px; color: var(--muted); font-weight: 500; font-size: 14.5px; transition: all .18s ease; position: relative; }
.nav a svg { width: 19px; height: 19px; opacity: .85; flex: none; }
.nav a:hover { color: var(--ink); background: var(--glass); }
.nav a.active { color: #fff; background: var(--glass-2); }
.nav a.active::before { content: ''; position: absolute; left: 0; top: 22%; height: 56%; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: var(--glow); }

.rail-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin: 22px 14px 10px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: none; cursor: pointer; font-family: 'Satoshi', sans-serif; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 999px; color: #fff; background: var(--grad); background-size: 160% 160%; transition: transform .1s ease, box-shadow .25s ease, background-position .5s ease; box-shadow: 0 10px 30px -10px rgba(177, 77, 255, 0.7); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -12px rgba(177, 77, 255, 0.85); background-position: 100% 0; }
.btn:active { transform: translateY(0); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; box-shadow: none; border: 1px solid var(--line-2); color: var(--ink); }
.btn.ghost:hover { border-color: var(--violet-hi); color: #fff; background: var(--glass); }
.btn.sm { padding: 9px 15px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ---------- Promo card ---------- */
.promo { margin-top: 16px; border-radius: var(--radius); padding: 18px 16px 16px; position: relative; overflow: hidden; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line); background: radial-gradient(circle at 50% 26%, rgba(124, 92, 255, 0.30), rgba(13, 10, 24, 0.92)); }
.promo img.pimg { width: 150px; max-width: 78%; height: auto; display: block; margin: 0 auto 12px; filter: drop-shadow(0 10px 26px rgba(177, 77, 255, 0.55)); transition: transform .35s ease; }
.promo:hover img.pimg { transform: translateY(-3px) scale(1.05); }
.promo h4 { font-family: 'Clash Display', sans-serif; margin: 0 0 5px; font-size: 15.5px; }
.promo p { margin: 0; font-size: 11.5px; color: #c9c2e0; line-height: 1.45; }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; gap: 16px; }
.topbar .hi { flex: 1; }
.topbar .hi h2 { margin: 0; font-size: 22px; }
.topbar .hi p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
/* Mobile-only "back to home" link — the left sidebar (with Home) is hidden under 820px,
   so this is the only way back. Inert on desktop; opt in by adding it to a page's topbar. */
.mob-home { display: none; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--glass); white-space: nowrap; }
.mob-home:hover { color: #fff; border-color: var(--line-2); }
.iconbtn { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); color: var(--muted); cursor: pointer; transition: .18s; }
.iconbtn:hover { color: #fff; border-color: var(--line-2); }
.avatar { width: 42px; height: 42px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 15px; box-shadow: var(--glow); }
.avatar.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.avatar.xs { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; box-shadow: none; }

/* ---------- Hero ---------- */
.hero { position: relative; border-radius: 24px; overflow: hidden; min-height: 340px; display: flex; align-items: flex-end; border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.04); }
.hero .scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 6, 15, 0.94) 0%, rgba(8, 6, 15, 0.7) 40%, rgba(8, 6, 15, 0.15) 100%), linear-gradient(0deg, rgba(8, 6, 15, 0.9), transparent 60%); }
.hero .content { position: relative; padding: 34px; max-width: 560px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.chip.live { background: var(--live); box-shadow: 0 0 24px -4px var(--live); }
.hero h1 { font-size: 42px; line-height: 1.02; margin: 16px 0 10px; }
.hero .meta { display: flex; gap: 18px; color: var(--muted); font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.hero .meta b { color: var(--ink); font-weight: 600; }
.hero p.blurb { color: #cfc9e4; font-size: 14px; line-height: 1.55; margin: 0 0 20px; }
.hero .cta { display: flex; gap: 12px; align-items: center; }
.count { display: flex; gap: 8px; margin: 4px 0 18px; }
.count .u { background: var(--glass-2); border: 1px solid var(--line); border-radius: 11px; padding: 8px 12px; text-align: center; min-width: 52px; }
.count .u b { font-family: 'Clash Display', sans-serif; font-size: 20px; display: block; line-height: 1; }
.count .u span { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Section head ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2px; }
.sec-head h3 { font-size: 20px; margin: 0; }
.sec-head a { font-size: 13px; color: var(--violet-hi); }

/* ---------- Party card row ---------- */
.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pcard { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .16s ease, border-color .2s; cursor: pointer; }
.pcard:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.pcard .thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, #241d3a, #14101f); position: relative; overflow: hidden; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pcard .thumb .tag { position: absolute; top: 10px; left: 10px; }
.pcard .thumb .host { position: absolute; bottom: 10px; left: 10px; display: flex; align-items: center; gap: 7px; font-size: 12px; background: rgba(8, 6, 15, 0.6); padding: 4px 9px 4px 4px; border-radius: 999px; backdrop-filter: blur(6px); }
.pcard .b { padding: 13px 15px 16px; }
.pcard .b h4 { margin: 0 0 4px; font-size: 15.5px; font-family: 'Clash Display', sans-serif; }
.pcard .b .when { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.pcard .b .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.price { font-weight: 700; color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.pill { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }

/* ---------- Right rail widgets ---------- */
.widget + .widget { margin-top: 20px; }
.widget h3 { font-size: 16px; margin: 0 0 14px; }
/* Media card: image banner on top, content (text + button) in its own clean region */
.room { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.room .room-img { height: 152px; background-image: url('/room.jpg'); background-size: cover; background-position: center 44%; transition: transform .5s ease; }
.room:hover .room-img { transform: scale(1.05); }
.room .room-body { padding: 15px 18px 18px; background: linear-gradient(180deg, rgba(36, 24, 64, 0.92), rgba(13, 10, 24, 0.96)); }
.room .room-body h4 { font-family: 'Clash Display', sans-serif; margin: 0 0 4px; font-size: 18px; }
.room .room-body p { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.friends { display: flex; align-items: center; gap: 0; margin-bottom: 14px; }
.friends .avatar.xs { margin-left: -8px; border: 2px solid var(--bg-2); }
.friends .avatar.xs:first-child { margin-left: 0; }
.friends .more { margin-left: -8px; width: 30px; height: 30px; border-radius: 9px; background: var(--glass-2); border: 2px solid var(--bg-2); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.frow { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: none; }
.frow .n { flex: 1; }
.frow .n b { display: block; font-size: 13.5px; }
.frow .n span { font-size: 11.5px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.empty { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------- Earnings widget ---------- */
.balance-amt { font-family: 'Clash Display', sans-serif; font-size: 34px; line-height: 1; margin: 2px 0 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ledrow { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ledrow:last-child { border-bottom: none; }
.ledrow span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledrow b { color: var(--ok); }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: rise .6s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .19s; } .d4 { animation-delay: .26s; } .d5 { animation-delay: .33s; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.livedot { animation: pulse 1.4s infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) { .shell { grid-template-columns: 240px 1fr; } .rail-r { display: none; } .row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .shell { grid-template-columns: 1fr; padding: 14px; } .rail-l { position: static; display: none; } .mob-home { display: inline-flex; } .row { grid-template-columns: 1fr 1fr; } .hero h1 { font-size: 32px; } }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--glass-2); border: 1px solid var(--line-2); backdrop-filter: blur(12px); padding: 13px 22px; border-radius: 12px; z-index: 80; display: none; font-size: 14px; box-shadow: var(--shadow); }

/* Auth modal (app.js injects it on theme.css pages too — styles.css had these, theme.css didn't,
   so the sign-in fields/buttons were tiny & unstyled). Mobile-friendly: 16px inputs (no iOS zoom),
   comfortable tap targets, full-width on small screens, above the topbar (z-index 1000). */
.modal-bg { position: fixed; inset: 0; background: rgba(4, 3, 8, .66); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: linear-gradient(180deg, rgba(36, 24, 64, .55), rgba(13, 10, 24, .94)); border: 1px solid var(--line-2); border-radius: 20px; padding: 26px; width: 100%; max-width: 380px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); backdrop-filter: blur(20px); }
.modal h2 { font-family: 'Clash Display', sans-serif; margin: 0 0 6px; font-size: 24px; }
.modal p { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.field { display: block; margin-bottom: 12px; }
.field input { width: 100%; box-sizing: border-box; padding: 14px 15px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-size: 16px; font-family: inherit; }
.field input:focus { outline: none; border-color: var(--violet-hi); }
.tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.tabs button { flex: 1; background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 12px; border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 14px; transition: .18s; }
.tabs button.active { color: #fff; border-color: var(--violet-hi); background: var(--glass-2); }
.err { color: var(--live, #ff4d6a); font-size: 13px; margin: 2px 0 8px; }
.center { text-align: center; }
.modal .btn { width: 100%; }

/* Watch-party social-mode badge (🎉 WE LOUD / 🎤 PANEL). Only these two modes render. */
.mbadge { display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:4px 9px; border-radius:999px; white-space:nowrap; }
.mbadge.loud  { background:#E8822B; color:#fff; }
.mbadge.panel { background:#E3B341; color:#2B2100; }
/* Top-right placement on a card thumbnail, opposite the LIVE/UPCOMING chip (which sits top-left). */
.pcard .thumb .tag-r { position:absolute; top:10px; right:10px; }
