:root {
  --bg: #08090d;
  --panel: #10131b;
  --line: rgba(255, 255, 255, .09);
  --txt: #f3f5f8;
  --mut: #8e98ab;
  --accent: #f59e0b;
  --emerald: #10b981;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--bg); color: var(--txt); font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.wrap { width: min(1440px, calc(100% - 32px)); margin: 0 auto; }

.topbar { position: sticky; top: 0; z-index: 50; background: rgba(8, 9, 13, .85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar-in { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt); }
.brand-link img { height: 28px; width: auto; }
.brand-link span { font: 700 11px var(--mono); letter-spacing: .14em; color: var(--accent); border-left: 1px solid var(--line); padding-left: 10px; }
.top-meta { display: flex; align-items: center; gap: 8px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 8px; border: 1px solid rgba(16,185,129,.35); background: rgba(16,185,129,.1); color: #34d399; font: 700 11px var(--mono); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 10px #10b981; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
.nav-btn { color: var(--mut); text-decoration: none; font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); transition: .2s; }
.nav-btn:hover { background: rgba(255,255,255,.06); color: #fff; }

.head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: end; padding: 20px 0 16px; }
.eyebrow { font: 700 10px var(--mono); letter-spacing: .18em; color: var(--accent); margin-bottom: 6px; }
h1 { font-size: clamp(24px, 3vw, 38px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin-bottom: 6px; }
.sub { color: var(--mut); font-size: 13px; line-height: 1.55; max-width: 580px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sb { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; }
.sb b { display: block; font: 800 20px var(--mono); color: #fff; }
.sb b.gold { color: var(--accent); }
.sb span { display: block; margin-top: 3px; font-size: 9.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }

/* 3D STAGE CINEMATIC */
.stage { position: relative; height: min(76vh, 820px); min-height: 480px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; overflow: hidden; background: #0d0a16; box-shadow: 0 30px 90px rgba(0,0,0,.65); }
#gl { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#gl:active { cursor: grabbing; }
.vignette { position: absolute; inset: 0; pointer-events: none; z-index: 2; background: radial-gradient(ellipse at center, transparent 58%, rgba(5,6,10,.55) 100%); }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }

/* GTA-STYLE FLOATING TAG */
.lbl { position: absolute; transform: translate(-50%, -100%); display: flex; gap: 7px; align-items: center; background: rgba(12, 15, 22, .86); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; padding: 4px 10px 4px 5px; pointer-events: auto; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.5); white-space: nowrap; transition: transform .15s, border-color .15s; }
.lbl:hover { transform: translate(-50%, -108%); border-color: var(--accent); }
.lbl img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--accent); background: #1e2430; }
.lbl b { font-size: 10.5px; display: block; color: #fff; line-height: 1.15; }
.lbl span { font-size: 8.5px; color: var(--mut); display: block; font-weight: 600; }
.lbl .st { font: 700 8px var(--mono); margin-top: 1px; }

.chbub { position: absolute; z-index: 6; max-width: 210px; background: rgba(16, 20, 30, .94); color: #f8fafc; border: 1px solid rgba(245,158,11,.45); border-radius: 10px 10px 10px 2px; padding: 7px 10px; font-size: 10.5px; line-height: 1.4; box-shadow: 0 12px 30px rgba(0,0,0,.55); transform: translate(-50%, -100%); pointer-events: none; opacity: 0; transition: opacity .35s; }
.chbub.on { opacity: 1; }
.chbub b { color: var(--accent); display: block; font: 700 9px var(--mono); margin-bottom: 2px; }

/* HUD CONTROLS */
.ctrl { position: absolute; top: 14px; left: 14px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 295px); }
.ctrl button, .upload-btn { appearance: none; border: 1px solid rgba(255,255,255,.15); background: rgba(12, 15, 22, .82); backdrop-filter: blur(10px); color: #e2e8f0; border-radius: 8px; padding: 7px 11px; font: 600 11px 'Inter', sans-serif; cursor: pointer; transition: .15s; }
.ctrl button:hover, .upload-btn:hover { border-color: var(--accent); color: #fff; background: rgba(245,158,11,.18); }
.upload-btn { border-color: rgba(245,158,11,.45); color: #fcd34d; }

.feedbox { position: absolute; top: 14px; right: 14px; width: 262px; max-height: calc(100% - 28px); z-index: 5; border: 1px solid rgba(255,255,255,.12); background: rgba(10, 12, 19, .82); backdrop-filter: blur(14px); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.feed-head { font: 700 9.5px var(--mono); letter-spacing: .14em; color: var(--accent); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
#feed { list-style: none; overflow: auto; font-size: 11px; margin-top: 4px; }
#feed li { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); line-height: 1.4; }
#feed .t { font: 700 10px var(--mono); color: #64748b; margin-right: 6px; }
#feed .w { color: #34d399; font-weight: 700; }
#feed p { color: #cbd5e1; margin-top: 2px; }

.meetbox { margin-top: 12px; background: var(--panel); border: 1px solid rgba(245,158,11,.35); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 15px; font-size: 12.5px; color: #f1f5f9; display: none; }
.meetbox.on { display: block; }
.coord-sec { margin-top: 22px; }
.sec-title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.bc b { font-size: 12.5px; display: block; margin-bottom: 3px; color: #fff; }
.bc span { font-size: 11px; color: var(--mut); display: block; }
.bc .v { color: var(--accent); font: 700 12px var(--mono); margin-top: 6px; }
.bot { grid-column: 1 / -1; border-radius: 10px; padding: 12px 14px; font-size: 12px; font-weight: 600; }
.bot.warn { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); color: #fcd34d; }
.bot.ok { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #34d399; }

/* DRAWER VIDEO CALL */
.drawer { position: fixed; right: 16px; bottom: 16px; width: 380px; max-width: calc(100vw - 32px); z-index: 60; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: #10131c; box-shadow: 0 28px 80px rgba(0,0,0,.75); transform: translateY(130%); transition: transform .3s cubic-bezier(.2,.8,.2,1); overflow: hidden; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.vid-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #07090e; overflow: hidden; }
.vid-stage video, .vid-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid-stage video { display: none; z-index: 2; }
.vid-stage video.active { display: block; }
.vid-stage img { animation: liveBreath 6s ease-in-out infinite; }
@keyframes liveBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.vid-hud { position: absolute; left: 10px; top: 10px; z-index: 3; display: flex; gap: 6px; }
.rec-tag, .vid-status { font: 700 9.5px var(--mono); padding: 4px 8px; border-radius: 6px; background: rgba(8,10,16,.78); color: #fff; border: 1px solid rgba(255,255,255,.15); display: inline-flex; align-items: center; gap: 5px; }
.rec-dot { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; animation: pulse 1.2s infinite; }
.vid-close { position: absolute; right: 10px; top: 10px; z-index: 3; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(8,10,16,.8); color: #fff; font-size: 18px; cursor: pointer; }

.dh { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.dh b { font-size: 13.5px; display: block; color: #fff; }
.dh span { font-size: 10.5px; color: var(--mut); }
.dh-act { display: flex; align-items: center; gap: 6px; }
.prof { font-size: 11px; font-weight: 700; color: var(--accent); text-decoration: none; padding: 5px 8px; }
.call { border: 1px solid rgba(245,158,11,.4); background: rgba(245,158,11,.14); color: #fcd34d; border-radius: 7px; padding: 6px 9px; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.dm { height: 190px; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #0a0c12; }
.m { max-width: 85%; padding: 9px 11px; border-radius: 11px; font-size: 12px; line-height: 1.45; }
.m.ai { align-self: flex-start; background: #161b26; border: 1px solid var(--line); color: #e2e8f0; }
.m.us { align-self: flex-end; background: var(--accent); color: #090b10; font-weight: 600; }
.di { display: flex; border-top: 1px solid var(--line); background: #10131c; }
.di input { flex: 1; background: none; border: 0; outline: 0; padding: 11px 13px; font: 500 12px 'Inter', sans-serif; color: #fff; }
.di button { border: 0; background: var(--accent); color: #090b10; padding: 0 16px; font-size: 12px; font-weight: 800; cursor: pointer; }
footer { border-top: 1px solid var(--line); color: var(--mut); text-align: center; font-size: 11px; padding: 20px 0; margin-top: 28px; }

@media (max-width: 980px) { .head { grid-template-columns: 1fr; } .feedbox { display: none; } .ctrl { max-width: calc(100% - 28px); } .stage { height: 62vh; min-height: 420px; } }
@media (max-width: 620px) { .wrap { width: calc(100% - 18px); } .brand-link span, .nav-btn:first-of-type { display: none; } .stats { grid-template-columns: repeat(2, 1fr); } .board { grid-template-columns: 1fr; } .ctrl button, .upload-btn { padding: 6px 8px; font-size: 10px; } .drawer { right: 9px; bottom: 9px; max-width: calc(100vw - 18px); } }