/* ───────────── MemeFi TV broadcast — 1920×1080, clean retro-broadcast look ───────────── */
:root {
  --bg: #06130f;
  --bg-2: #0b1f18;
  --panel: rgba(6, 19, 15, 0.86);
  --line: rgba(255,255,255,0.10);
  --text: #f3efe4;
  --muted: #9aa79f;
  --green: #1fbf66;
  --green-bright: #4be08c;
  --red: #ff5f6d;
  --amber: #ffd23f;
  --blue: #5aa9ff;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Space Grotesk", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; overflow: hidden; font-family: var(--font-body); color: var(--text); }

/* embed mode (inside the memefi.tv player) */
html.embed #gate { background: #04100c; }
html.embed .gate-card { border: 0; background: transparent; box-shadow: none; }
html.embed .gate-card small { display: none; }

/* gate */
#gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(1200px 600px at 50% 40%, #0d2a20, #03100c); }
#gate.hidden { display: none; }
.gate-card { text-align: center; max-width: 560px; padding: 40px; border: 1px solid var(--line); background: var(--panel); border-radius: 20px; }
.gate-logo { font-family: var(--font-head); font-size: 56px; letter-spacing: -2px; font-weight: 700; }
.gate-logo b { color: var(--green-bright); }
.gate-card p { color: var(--muted); margin: 12px 0 28px; line-height: 1.4; }
.gate-card small { display: block; color: var(--muted); margin-top: 22px; font-size: 12px; line-height: 1.6; }
kbd { font-family: var(--font-mono); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--text); }
#go-live { font-family: var(--font-mono); font-size: 18px; letter-spacing: 3px; font-weight: 700; padding: 14px 40px; border-radius: 999px; border: 2px solid #fff; cursor: pointer; background: var(--red); color: #fff; box-shadow: 0 0 40px rgba(255, 95, 109, 0.45); }
#go-live:hover { filter: brightness(1.1); }

/* stage */
#stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: center center; background: var(--bg); overflow: hidden; }
.bg { position: absolute; inset: 0; }
#bg-canvas { display: none; }
.bg-grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.07) 1.5px, transparent 1.8px); background-size: 22px 22px; mask-image: linear-gradient(#000 30%, transparent 90%); }
.bg-glow { position: absolute; inset: 0; background: radial-gradient(1000px 600px at 34% 60%, rgba(31,191,102,0.22), transparent 60%), radial-gradient(700px 400px at 85% 15%, rgba(90,169,255,0.10), transparent 60%); transition: background 0.6s; }
.bg-skyline { position: absolute; left: 0; right: 0; bottom: 0; height: 420px; background: linear-gradient(transparent, rgba(3,10,8,0.9)); }
.mood-panic .bg-glow { background: radial-gradient(1000px 600px at 34% 60%, rgba(255,95,109,0.26), transparent 60%); }
.mood-hype .bg-glow { background: radial-gradient(1000px 600px at 34% 60%, rgba(31,191,102,0.34), transparent 60%), radial-gradient(700px 400px at 85% 15%, rgba(255,210,63,0.16), transparent 60%); }
.mood-sad .bg-glow { background: radial-gradient(1000px 600px at 34% 60%, rgba(90,169,255,0.16), transparent 60%); }

/* topbar */
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 86px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; background: rgba(4,12,9,0.9); border-bottom: 1px solid var(--line); z-index: 5; }
.bug { display: flex; align-items: center; gap: 16px; }
.bug-live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 700; letter-spacing: 3px; font-size: 15px; color: #fff; background: var(--red); padding: 6px 12px; border-radius: 8px; }
.bug-live i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.bug-name { font-family: var(--font-head); font-size: 34px; font-weight: 700; letter-spacing: -1px; }
.bug-name b { color: var(--green-bright); }
.top-stats { display: flex; gap: 40px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; }
.stat label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); font-weight: 700; }
.stat span { font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.stat.feed span { font-size: 15px; color: var(--amber); }
.stat.feed.ok span { color: var(--green-bright); }
.clock { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--text); }

/* set */
.set { position: absolute; left: 0; top: 86px; width: 1330px; height: 760px; }
.monitor-wall { display: none; }
#anchor-wrap { position: absolute; left: 300px; top: 30px; width: 720px; height: 720px; }
#anchor-wrap svg { width: 100%; height: 100%; overflow: visible; }
#anchor-wrap canvas { width: 100%; height: 100%; display: block; filter: drop-shadow(0 24px 30px rgba(0,0,0,0.5)); }
.pip { position: absolute; left: 56px; top: 46px; width: 248px; height: 248px; display: none; border-radius: 16px; background: radial-gradient(circle at 50% 35%, #123f2e, #06130f); border: 2px solid rgba(255,255,255,0.14); box-shadow: 0 20px 50px rgba(0,0,0,0.5); overflow: hidden; }
.pip.on { display: block; animation: slamIn 0.3s; }
.pip canvas { width: 100%; height: 100%; display: block; }
.pip span { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); background: rgba(3,10,8,0.85); }
.pip span b { color: var(--green-bright); }
.nameplate { position: absolute; left: 40px; bottom: 292px; display: inline-flex; align-items: baseline; gap: 12px; padding: 8px 16px; background: var(--text); color: #06130f; border-radius: 8px; z-index: 6; opacity: 0; transition: opacity 0.3s; }
.nameplate.on { opacity: 1; }
.nameplate b { font-family: var(--font-head); font-size: 22px; letter-spacing: -0.5px; }
.nameplate span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: #3a4a42; font-weight: 700; }
.guest { position: absolute; left: 1030px; top: 372px; width: 250px; height: 250px; display: none; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #123f2e, #06130f); border: 2px solid var(--amber); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.guest.on { display: block; animation: slamIn 0.3s; }
.guest canvas { width: 100%; height: 100%; display: block; }
.guest span { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); background: rgba(3,10,8,0.85); white-space: nowrap; overflow: hidden; }
.guest span b { color: var(--amber); }
.desk { position: absolute; left: 0; right: 0; bottom: 0; height: 190px; }
.desk-top { position: absolute; left: 60px; right: 0; top: 0; height: 44px; background: linear-gradient(#1a3b2e, #0f2a20); border-top: 2px solid rgba(75,224,140,0.4); transform: skewX(-12deg); transform-origin: left bottom; box-shadow: 0 -10px 40px rgba(31,191,102,0.12); }
.desk-front { position: absolute; left: 40px; right: 0; top: 44px; bottom: 0; background: linear-gradient(#0c2219, #071810); border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start; padding: 12px 70px 0 0; }
.desk-front span { font-family: var(--font-head); font-size: 30px; font-weight: 700; letter-spacing: -1px; color: rgba(243,239,228,0.7); line-height: 1; }
.desk-front span b { color: var(--green-bright); }
.desk-front em { font-style: normal; font-family: var(--font-mono); font-size: 9px; letter-spacing: 4px; color: var(--muted); }

/* rail */
.rail { position: absolute; right: 40px; top: 110px; width: 480px; display: flex; flex-direction: column; gap: 14px; z-index: 4; transition: top 0.35s; }
.is-breaking .rail { top: 176px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.panel-title { font-family: var(--font-mono); font-weight: 700; letter-spacing: 3px; font-size: 11px; color: var(--green-bright); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); }
.token-head { display: flex; align-items: center; gap: 14px; }
.token-logo { width: 56px; height: 56px; border-radius: 14px; background: #123f2e; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 20px; color: #fff; overflow: hidden; flex: none; }
.token-logo img { width: 100%; height: 100%; object-fit: cover; }
.token-id { flex: 1; min-width: 0; }
.token-symbol { font-family: var(--font-head); font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.token-name { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.token-change { font-family: var(--font-mono); font-size: 24px; font-weight: 700; }
.up { color: var(--green-bright); } .down { color: var(--red); }
.token-mcap { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 4px; }
.token-mcap label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.token-mcap span { font-family: var(--font-mono); font-size: 28px; font-weight: 700; }
#spark { width: 100%; height: 120px; display: block; }
.bond { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.bond-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.bond-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--green-bright)); transition: width 0.6s; }
.bond span { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.list-panel ol { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.list-panel li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; font-size: 15px; padding: 7px 8px; border-radius: 8px; background: rgba(255,255,255,0.03); }
.list-panel li i { font-style: normal; font-family: var(--font-mono); color: var(--muted); font-size: 11px; }
.list-panel li b { font-family: var(--font-head); font-size: 18px; letter-spacing: -0.3px; }
.list-panel li small { color: var(--muted); font-size: 12px; margin-left: 6px; }
.list-panel li span { font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.fg-wrap { display: flex; align-items: center; gap: 18px; }
#fg-gauge { width: 200px; height: 120px; }
#fg-needle { transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.fg-read b { display: block; font-family: var(--font-mono); font-size: 50px; line-height: 1; font-weight: 700; }
.fg-read span { font-family: var(--font-mono); letter-spacing: 3px; font-size: 13px; color: var(--amber); font-weight: 700; }

/* breaking */
.breaking { position: absolute; left: 0; right: 0; top: 86px; height: 72px; display: none; align-items: center; z-index: 8; background: repeating-linear-gradient(135deg, #d6344a 0 30px, #b8283c 30px 60px); border-bottom: 3px solid #fff; box-shadow: 0 10px 40px rgba(255,95,109,0.45); }
.breaking.on { display: flex; animation: slamIn 0.35s cubic-bezier(.2,1.4,.3,1); }
@keyframes slamIn { from { transform: translateY(-80px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.breaking-tag { font-family: var(--font-mono); font-size: 30px; font-weight: 700; letter-spacing: 6px; padding: 0 30px; background: #fff; color: #d6344a; height: 100%; display: flex; align-items: center; animation: flash 0.8s steps(2) infinite; }
@keyframes flash { 50% { background: var(--amber); } }
.breaking-text { font-family: var(--font-head); font-size: 34px; font-weight: 700; letter-spacing: -0.5px; padding: 0 30px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }

/* lower third */
.lower-third { position: absolute; left: 40px; bottom: 175px; width: 1300px; display: flex; align-items: stretch; z-index: 6; filter: drop-shadow(0 14px 30px rgba(0,0,0,0.5)); transform: translateX(-40px); opacity: 0; transition: all 0.35s cubic-bezier(.2,.9,.2,1); }
.lower-third.on { transform: none; opacity: 1; }
.lt-tag { font-family: var(--font-mono); font-weight: 700; font-size: 16px; letter-spacing: 3px; background: var(--green); color: #03140a; padding: 0 24px; display: flex; align-items: center; border-radius: 12px 0 0 12px; }
.mood-panic .lt-tag, .lower-third.lt-breaking .lt-tag { background: var(--red); color: #fff; }
.lt-main { flex: 1; background: rgba(243,239,228,0.97); color: #06130f; padding: 14px 28px 16px; border-radius: 0 12px 12px 0; }
.lt-headline { font-family: var(--font-head); font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -1.5px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-subline { font-size: 19px; color: #4a5a52; margin-top: 6px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* captions */
.caption { position: absolute; left: 40px; width: 1300px; bottom: 84px; font-size: 25px; font-weight: 600; line-height: 1.3; color: #fff; z-index: 6; min-height: 36px; }
.caption span { background: rgba(3,10,8,0.82); padding: 5px 12px; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* mailbag card */
.mailbag { position: absolute; left: 1000px; top: 400px; width: 330px; background: rgba(243,239,228,0.97); color: #06130f; border-radius: 14px; padding: 16px 20px; display: none; z-index: 5; border-left: 8px solid var(--blue); }
.mailbag.on { display: block; animation: slamIn 0.4s; }
.mailbag label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: #2d6fb5; font-weight: 700; }
.mailbag b { display: block; font-family: var(--font-head); font-size: 24px; margin: 4px 0; letter-spacing: -0.5px; }
.mailbag p { font-size: 17px; line-height: 1.35; color: #2a3a32; }

/* ticker */
.ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; background: #03100c; border-top: 2px solid var(--green); z-index: 7; overflow: hidden; }
.ticker-label { font-family: var(--font-mono); font-weight: 700; letter-spacing: 4px; font-size: 16px; background: var(--green); color: #03140a; padding: 0 26px; display: flex; align-items: center; z-index: 2; }
.ticker-track { flex: 1; position: relative; overflow: hidden; }
.ticker-inner { position: absolute; top: 0; left: 0; height: 64px; display: flex; align-items: center; gap: 56px; white-space: nowrap; will-change: transform; animation: scroll var(--ticker-dur, 60s) linear infinite; padding-left: 20px; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--font-mono); font-size: 20px; }
.tk b { font-family: var(--font-head); font-size: 24px; letter-spacing: -0.5px; font-weight: 700; }
.tk small { color: var(--muted); font-size: 14px; }
.tk.home b { color: var(--amber); }
.tk.grad b::after { content: " 🎓"; font-size: 18px; }

/* debug + muted */
.debug { position: absolute; left: 40px; top: 100px; font-family: var(--font-mono); font-size: 14px; color: var(--green-bright); background: rgba(0,0,0,0.75); padding: 10px; border-radius: 6px; display: none; z-index: 50; white-space: pre; max-width: 900px; }
.debug.on { display: block; }
.muted-badge { position: absolute; right: 40px; bottom: 84px; font-family: var(--font-mono); letter-spacing: 3px; background: var(--red); color: #fff; padding: 4px 12px; border-radius: 6px; display: none; z-index: 50; }
.muted-badge.on { display: block; }

/* mood motion */
.mood-panic #anchor-wrap { animation: jitter 0.12s infinite; }
@keyframes jitter { 0% { transform: translate(0,0); } 50% { transform: translate(1.5px,-1px); } 100% { transform: translate(-1px,1px); } }
.mood-hype #anchor-wrap { animation: bounce 0.7s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-6px); } }

/* ───────── off-air standby (the transmitter is admin-controlled) ───────── */
#standby { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: #03100c; }
#standby.on { display: grid; }
.sb-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); opacity: 0.16; }
.sb-bars i:nth-child(1) { background: #c8c8c8; }
.sb-bars i:nth-child(2) { background: #d2d200; }
.sb-bars i:nth-child(3) { background: #00d2d2; }
.sb-bars i:nth-child(4) { background: #00c832; }
.sb-bars i:nth-child(5) { background: #d200d2; }
.sb-bars i:nth-child(6) { background: #d22832; }
.sb-bars i:nth-child(7) { background: #2832d2; }
.sb-card { position: relative; text-align: center; max-width: 620px; padding: 44px 48px; border: 2px solid rgba(255,255,255,0.16); border-radius: 20px; background: rgba(3, 16, 12, 0.92); backdrop-filter: blur(6px); }
.sb-logo { font-family: var(--font-head); font-size: 46px; letter-spacing: -2px; font-weight: 700; line-height: 1; }
.sb-logo b { color: var(--green-bright); }
.sb-state { display: inline-flex; align-items: center; gap: 10px; margin: 20px 0 14px; font-family: var(--font-mono); font-weight: 700; letter-spacing: 5px; font-size: 20px; padding: 8px 20px; border-radius: 999px; border: 2px solid rgba(255,255,255,0.2); color: var(--muted); }
.sb-state i { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 16px var(--red); animation: sb-pulse 2.4s ease-in-out infinite; }
@keyframes sb-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.sb-card p { color: var(--muted); line-height: 1.55; margin: 0 auto; max-width: 44ch; }
.sb-clock { display: block; margin-top: 22px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 3px; color: rgba(255,255,255,0.45); }

/* ───────── clip desk panel + X bug ───────── */
.bug-x { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); margin-left: 4px; }
.clips-panel { display: none; }
.clips-panel.on { display: block; animation: clip-in 0.35s ease-out; }
@keyframes clip-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.clip-rate-line { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.clip-rate-line b { font-family: var(--font-head); font-size: 26px; color: var(--green-bright); }
.clips-panel ol { list-style: none; display: grid; gap: 8px; }
.clips-panel li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.clips-panel li i { font-family: var(--font-mono); font-style: normal; font-size: 12px; color: var(--muted); }
.clips-panel li b { display: block; font-size: 15px; }
.clips-panel li small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.clips-panel li span { font-family: var(--font-mono); font-weight: 700; }
.clip-cta { margin-top: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: var(--muted); }

.sol-mark { width: 0.8em; height: 0.8em; vertical-align: -0.02em; margin-left: 0.14em; flex: none; }
.clip-rate-line .sol-mark { width: 0.62em; height: 0.62em; vertical-align: 0.06em; }
