* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #090b12; color: #f3f4f6; font-family: 'Nunito', system-ui, sans-serif; }
body.clean #topbar, body.clean #side { display: none !important; }
body.clean #layout { grid-template-columns: 1fr; height: 100vh; }

#topbar { height: 48px; background: #111522; border-bottom: 1px solid #22293d; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.brand b { color: #fbbf24; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #1f2937; color: #cbd5e1; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.pill.live { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.pill.live .dot { background: #10b981; }
.pill.wait { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.pill.wait .dot { background: #f59e0b; }
.stats { display: flex; gap: 12px; font-size: 13px; font-weight: 700; }
.actions { display: flex; gap: 8px; }
.btn { background: #1e293b; color: #f8fafc; border: 1px solid #334155; border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.btn:hover { background: #334155; }

#layout { display: grid; grid-template-columns: 1fr 330px; height: calc(100vh - 48px); }
#stageWrap { position: relative; background: #05070e; overflow: hidden; width: 100%; height: 100%; }
#stage { position: absolute; top: 0; left: 0; width: 1080px; height: 1920px; transform-origin: top left; overflow: hidden; background: #8ec5fc; }
#cv3d, #ov { position: absolute; inset: 0; width: 1080px; height: 1920px; display: block; }
#ov { pointer-events: none; }

/* Üst HUD (Referans Görsel 1-8 Birebir Tasarım) */
#hudTop { position: absolute; top: 54px; left: 0; width: 100%; padding: 0 28px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; z-index: 10; }
.hud-top-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; width: 100%; }

#rankBoard { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.rb-title { font-size: 24px; font-weight: 900; color: #facc15; text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0 4px 10px rgba(0,0,0,0.8); letter-spacing: 1px; }
.rb-item { display: flex; align-items: center; gap: 9px; max-width: 630px; transition: opacity 0.2s; }
.rb-item.empty { opacity: 0.42; }
.rb-num { font-size: 32px; font-weight: 900; color: #facc15; width: 24px; flex-shrink: 0; text-align: center; text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000; }
.rb-av { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f59e0b, #78350f); border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 900; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.6); }
.rb-name { font-size: 24px; font-weight: 900; font-style: italic; color: #fff; max-width: 410px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000, 0 4px 12px rgba(0,0,0,0.85); }
.rb-score { font-size: 20px; font-weight: 900; flex-shrink: 0; color: #fde047; background: rgba(15, 23, 42, 0.78); border: 2px solid rgba(250, 204, 21, 0.7); border-radius: 999px; padding: 2px 10px; white-space: nowrap; text-shadow: 0 2px 6px rgba(0,0,0,0.9); box-shadow: 0 3px 10px rgba(0,0,0,0.45); }

#giftGuide { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-shrink: 0; }
.gg-item { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 14px; font-weight: 900; color: #fff; line-height: 1.05; text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000; }
.gg-ic { font-size: 38px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.65)); margin-bottom: 2px; }

#goalTitle { background: linear-gradient(90deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.1)); padding: 8px 20px; text-align: center; font-size: 38px; font-weight: 800; color: #fff; text-shadow: 0 3px 10px rgba(0,0,0,0.95); }
#goalBarWrap { position: relative; width: 100%; height: 64px; background: rgba(15, 23, 42, 0.65); border: 4px solid #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; }
#goalBarFill { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, #22d3ee, #22d3ee 24px, #38bdf8 24px, #38bdf8 48px); transition: width 0.3s; }
#goalBarPct { position: relative; z-index: 2; font-size: 40px; font-weight: 900; color: #0f172a; text-shadow: 0 1px 4px rgba(255,255,255,0.8); }

#announceBox { align-self: center; background: rgba(15, 23, 42, 0.9); border: 3px solid #facc15; border-radius: 999px; padding: 10px 30px; font-size: 28px; font-weight: 900; color: #fef08a; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.6); transition: opacity 0.25s; }
#announceBox.off { opacity: 0; }

/* Sağ Kenar Kamera Değiştirme Okları */
#camArrows { position: absolute; right: 26px; top: 53%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 16px; z-index: 15; }
#camArrows button { width: 64px; height: 64px; border-radius: 50%; background: rgba(15, 23, 42, 0.65); border: 2px solid rgba(255,255,255,0.45); color: #fff; font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
#camArrows button:hover { background: rgba(30, 41, 59, 0.9); transform: scale(1.06); }

/* Sol Alt Hediye Bildirimi (Referans Görsel 6 Pembe Hediye Kartı) */
#bottomGift { position: absolute; left: 28px; bottom: 260px; background: rgba(15, 18, 26, 0.86); border-left: 6px solid #fb7185; border-radius: 18px; padding: 18px 26px; font-size: 28px; font-weight: 900; color: #fff; z-index: 10; box-shadow: 0 10px 28px rgba(0,0,0,0.65); transition: opacity 0.25s; max-width: 520px; }
#bottomGift.off { opacity: 0; }

#topCoinCard { position: absolute; right: 28px; bottom: 84px; background: rgba(10, 14, 24, 0.78); border: 2px solid rgba(251, 191, 36, 0.65); border-radius: 22px; padding: 12px 22px; text-align: center; min-width: 210px; z-index: 10; box-shadow: 0 8px 24px rgba(0,0,0,0.55); display: flex; flex-direction: column; align-items: center; }
.tc-title { font-size: 20px; font-weight: 900; color: #facc15; }
.tc-avatar-wrap { position: relative; margin-top: 4px; display: flex; flex-direction: column; align-items: center; }
.tc-crown { font-size: 26px; margin-bottom: -10px; z-index: 2; }
.tc-avatar { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fef08a, #b45309); border: 3px solid #facc15; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 900; color: #111827; }
.tc-name { font-size: 24px; font-weight: 900; color: #fff; margin-top: 6px; }
.tc-val { font-size: 21px; font-weight: 800; color: #fde047; }

#side { background: #0f1422; border-left: 1px solid #22293d; padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.panel { background: #161c2e; border: 1px solid #252f4a; border-radius: 12px; padding: 10px; }
.panel.grow { flex: 1; min-height: 150px; display: flex; flex-direction: column; overflow: hidden; }
.panel-h { font-size: 13px; font-weight: 800; color: #e2e8f0; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sub { font-size: 12px; color: #94a3b8; }
.sw { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.btns button { background: #1e293b; color: #f8fafc; border: 1px solid #334155; border-radius: 8px; padding: 7px 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.btns button:hover { background: #334155; }
#chatForm { display: flex; gap: 6px; margin-top: 8px; }
#chatForm input { min-width: 0; flex: 1; background: #0b0f19; border: 1px solid #334155; border-radius: 8px; padding: 7px 8px; color: #fff; font-size: 12px; }
#chatForm button { background: #2563eb; color: #fff; border: 0; border-radius: 8px; padding: 0 12px; font-weight: 800; font-size: 12px; cursor: pointer; }
#feed, #giftLog { list-style: none; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 12px; max-height: 220px; }
#feed li, #giftLog li { background: rgba(15, 23, 42, 0.7); padding: 6px 8px; border-radius: 8px; }
#giftLog li.empty { color: #64748b; text-align: center; }

.round-pill { align-self: center; background: rgba(15, 23, 42, 0.82); border: 2px solid rgba(250, 204, 21, 0.75); border-radius: 999px; padding: 6px 24px; font-size: 26px; font-weight: 900; color: #fef08a; letter-spacing: 1px; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.round-pill.off, #goalTitle.off, #goalBarWrap.off { display: none; }

#thankOverlay { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%) scale(1); background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 135, 0.92)); border: 4px solid #facc15; border-radius: 28px; padding: 26px 46px; text-align: center; color: #fff; z-index: 25; pointer-events: none; box-shadow: 0 18px 50px rgba(0,0,0,0.75), 0 0 40px rgba(250, 204, 21, 0.45); transition: opacity 0.3s, transform 0.3s; max-width: 880px; }
#thankOverlay.off { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
#thankOverlay.vip { border-color: #fb7185; background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(159, 18, 57, 0.92)); box-shadow: 0 22px 65px rgba(0,0,0,0.85), 0 0 70px rgba(251, 113, 133, 0.65); }
.th-top { font-size: 30px; font-weight: 900; color: #fde047; letter-spacing: 1px; }
.th-name { font-size: 54px; font-weight: 900; color: #fff; margin: 6px 0; text-shadow: 0 4px 16px rgba(0,0,0,0.8); }
.th-gift { font-size: 32px; font-weight: 800; color: #fbcfe8; }

#roundOverlay { position: absolute; inset: 0; background: rgba(5, 8, 18, 0.82); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 30; transition: opacity 0.3s; }
#roundOverlay.off { opacity: 0; pointer-events: none; }
.ro-card { width: 820px; background: linear-gradient(180deg, #1e293b, #0f172a); border: 4px solid #facc15; border-radius: 32px; padding: 40px; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,0.85); }
.ro-title { font-size: 44px; font-weight: 900; color: #facc15; margin-bottom: 24px; }
.ro-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.ro-row { display: flex; align-items: center; justify-content: space-between; background: rgba(15, 23, 42, 0.85); border: 2px solid rgba(255,255,255,0.12); border-radius: 18px; padding: 14px 24px; font-size: 32px; font-weight: 900; }
.ro-sub { font-size: 26px; font-weight: 800; color: #94a3b8; }

.settings-grid { display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #cbd5e1; }
.set-row input, .set-row select { background: #0b0f19; border: 1px solid #334155; border-radius: 6px; padding: 4px 6px; color: #fff; font-size: 12px; max-width: 145px; }
.set-row input[type=number] { width: 72px; }
.btn-mini { background: #2563eb; color: #fff; border: 0; border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 800; cursor: pointer; }
