/* supernetslive - Developed by acidvegas in CSS (https://github.com/acidvegas) */
/* static/style.css */

/* ============================================================
   SuperNETs.live — modern broadcast theme
   ============================================================ */

:root {
	--bg:            #0b0d12;
	--bg-1:          #10131b;
	--panel:         #161a24;
	--panel-2:       #1c2130;
	--elevated:      #222838;
	--border:        rgba(255, 255, 255, 0.08);
	--border-strong: rgba(255, 255, 255, 0.16);
	--text:          #eef0f6;
	--text-dim:      #9aa2b1;
	--text-mut:      #616b7d;
	--red:           #ff3b3b;
	--red-2:         #ff5c5c;
	--red-glow:      rgba(255, 59, 59, 0.45);
	--blue:          #3aa0ff;
	--amber:         #ffb020;
	--green:         #2fd47a;
	--radius:        14px;
	--radius-sm:     10px;
	--shadow:        0 12px 40px rgba(0, 0, 0, 0.45);
	--shadow-lg:     0 24px 70px rgba(0, 0, 0, 0.6);
	--sidebar-w:     320px;
	--font:          'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono:          'JetBrains Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
	height: 100%;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow: hidden;
}

button { font-family: inherit; cursor: pointer; color: inherit; }
input, select { font-family: inherit; }
svg { display: block; }
.hidden { display: none !important; }

.noscript-warning {
	position: fixed; inset: 0; z-index: 9999;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 12px; background: var(--bg); text-align: center; padding: 24px;
}

/* ============================ LANDING ============================ */

#login-screen {
	position: fixed; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	overflow: hidden;
}

.landing-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.landing-glow {
	position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
	width: 900px; height: 900px; border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 59, 59, 0.22), rgba(255, 59, 59, 0.04) 45%, transparent 70%);
	filter: blur(20px); animation: glow-float 9s ease-in-out infinite;
}
@keyframes glow-float { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(30px); } }
.landing-grid {
	position: absolute; inset: 0;
	background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
	                  linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
	background-size: 46px 46px;
	mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent 80%);
	-webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent 80%);
}

.landing {
	position: relative; z-index: 2;
	display: flex; flex-direction: column; align-items: center; text-align: center;
	padding: 24px; max-width: 620px; width: 100%;
}

.landing-live {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 6px 14px; margin-bottom: 26px;
	border: 1px solid rgba(255, 59, 59, 0.4); border-radius: 999px;
	background: rgba(255, 59, 59, 0.1);
	color: var(--red-2); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.22em;
}

.live-dot {
	width: 9px; height: 9px; border-radius: 50%; background: var(--red);
	box-shadow: 0 0 0 0 var(--red-glow); animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--red-glow); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.brand-wordmark {
	font-size: clamp(2.6rem, 9vw, 5.2rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1;
	background: linear-gradient(180deg, #ffffff, #c6cbd8);
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-dot { color: var(--red); -webkit-text-fill-color: var(--red); }
.brand-tagline { margin-top: 18px; font-size: clamp(1rem, 2.4vw, 1.25rem); color: var(--text); font-weight: 500; }
.brand-schedule { margin-top: 8px; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-mut); font-weight: 700; }

.watch-btn {
	margin-top: 34px;
	display: inline-flex; align-items: center; gap: 12px;
	padding: 16px 34px; border: none; border-radius: 999px;
	background: linear-gradient(180deg, var(--red-2), var(--red));
	color: #fff; font-size: 1.06rem; font-weight: 800; letter-spacing: 0.01em;
	box-shadow: 0 10px 30px var(--red-glow), inset 0 1px 0 rgba(255,255,255,0.25);
	transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.watch-btn svg { width: 20px; height: 20px; }
.watch-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px var(--red-glow); filter: brightness(1.05); }
.watch-btn:active { transform: translateY(0); }

.viewer-count { margin-top: 20px; color: var(--text-dim); font-size: 0.9rem; }

.callin {
	margin-top: 26px; display: inline-flex; align-items: center; gap: 10px;
	padding: 11px 18px; border: 1px solid var(--border); border-radius: 999px;
	background: rgba(255,255,255,0.03); backdrop-filter: blur(8px);
}
.callin svg { width: 16px; height: 16px; color: var(--red-2); }
.callin-label { color: var(--text-dim); font-size: 0.85rem; }
.callin-number { color: var(--text); font-family: var(--mono); font-weight: 700; letter-spacing: 0.03em; }

.host-trigger {
	position: absolute; top: 20px; right: 20px; z-index: 3;
	display: inline-flex; align-items: center; gap: 7px;
	padding: 9px 15px; border: 1px solid var(--border); border-radius: 999px;
	background: rgba(255,255,255,0.03); color: var(--text-dim);
	font-size: 0.82rem; font-weight: 600; transition: all 0.18s ease; backdrop-filter: blur(8px);
}
.host-trigger svg { width: 15px; height: 15px; }
.host-trigger:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.06); }

.landing-foot {
	position: absolute; bottom: 18px; z-index: 2;
	display: flex; align-items: center; gap: 10px; color: var(--text-mut); font-size: 0.72rem;
}
.footer-brand { font-weight: 800; letter-spacing: 0.14em; }
.footer-version { font-family: var(--mono); opacity: 0.7; }

.error-msg { margin-top: 14px; color: var(--red-2); font-size: 0.86rem; font-weight: 500; }

/* ============================ SHOW LAYOUT ============================ */

#chat-screen { position: fixed; inset: 0; display: flex; }
#main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

#controls {
	display: flex; align-items: center; gap: 14px;
	padding: 12px 16px; background: rgba(16, 19, 27, 0.9);
	border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); z-index: 20;
}
.bar-left { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.bar-center { flex: 1; display: flex; justify-content: center; }
.bar-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }

.onair { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.16em; color: var(--red-2); }
.timer { font-family: var(--mono); font-size: 0.9rem; color: var(--text-dim); letter-spacing: 0.04em; }

.role-badge {
	padding: 3px 9px; border-radius: 6px; font-family: var(--mono);
	font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
	border: 1px solid var(--border); color: var(--text-dim);
}
.role-badge.role-viewer { color: var(--text-mut); }
.role-badge.role-host   { color: var(--red-2); border-color: rgba(255,59,59,0.5); background: rgba(255,59,59,0.12); }
.role-badge.role-cohost { color: var(--blue); border-color: rgba(58,160,255,0.5); background: rgba(58,160,255,0.12); }
.role-badge.role-guest  { color: var(--amber); border-color: rgba(255,176,32,0.5); background: rgba(255,176,32,0.12); }

.control-group { display: flex; align-items: center; gap: 8px; }

.control-btn {
	position: relative; width: 44px; height: 44px; flex: 0 0 auto;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--border); border-radius: 12px;
	background: var(--panel); color: var(--text-dim);
	transition: all 0.16s ease;
}
.control-btn svg { width: 20px; height: 20px; }
.control-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--panel-2); transform: translateY(-1px); }
.control-btn.active { color: #fff; background: var(--panel-2); border-color: var(--border-strong); }
.control-btn.muted { color: var(--red-2); border-color: rgba(255,59,59,0.4); background: rgba(255,59,59,0.1); }
.control-btn.cooldown { opacity: 0.5; pointer-events: none; }
.control-btn.cooldown::after { content: attr(data-cooldown); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; }
.leave-btn:hover { color: var(--red-2); border-color: rgba(255,59,59,0.4); background: rgba(255,59,59,0.12); }

.queue-badge {
	position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
	display: flex; align-items: center; justify-content: center;
	background: var(--red); color: #fff; font-size: 0.66rem; font-weight: 800; border-radius: 999px;
	box-shadow: 0 0 0 2px var(--bg-1);
}

.pill-btn {
	display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
	border: 1px solid var(--border); border-radius: 12px; background: var(--panel);
	color: var(--text); font-weight: 600; font-size: 0.9rem; transition: all 0.16s ease;
}
.pill-btn svg { width: 18px; height: 18px; }
.pill-btn:hover { border-color: var(--border-strong); background: var(--panel-2); transform: translateY(-1px); }
.queue-cta { background: linear-gradient(180deg, var(--red-2), var(--red)); border-color: transparent; color: #fff; box-shadow: 0 8px 24px var(--red-glow); }
.queue-cta:hover { filter: brightness(1.06); }
.queue-cta.active { background: var(--panel); color: var(--amber); border-color: rgba(255,176,32,0.5); box-shadow: none; }
#callins-btn.active { color: var(--green); border-color: rgba(47,212,122,0.5); background: rgba(47,212,122,0.12); }

/* ============================ STAGE / VIDEO ============================ */

#video-container { position: relative; flex: 1; padding: 16px; overflow: hidden; }
#video-grid { display: grid; gap: 12px; width: 100%; height: 100%; place-content: center; grid-auto-rows: 1fr; }

.video-tile {
	position: relative; overflow: hidden; border-radius: var(--radius);
	background: linear-gradient(160deg, #12151d, #0c0e14);
	border: 1px solid var(--border); box-shadow: var(--shadow);
	aspect-ratio: 16 / 9; min-height: 0;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.video-tile.speaking { border-color: var(--green); box-shadow: 0 0 0 2px rgba(47,212,122,0.4), var(--shadow); }
.video-tile.screen-share { border-color: rgba(58,160,255,0.4); }
.video-tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.video-tile .username {
	position: absolute; left: 10px; bottom: 10px;
	padding: 5px 11px; border-radius: 8px; background: rgba(0,0,0,0.62); backdrop-filter: blur(6px);
	font-size: 0.82rem; font-weight: 600; color: #fff; max-width: calc(100% - 20px);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.video-tile .you { color: var(--text-dim); font-weight: 400; }
.video-tile.maximized { aspect-ratio: auto; width: 100%; height: 100%; }

#maximized-view { position: absolute; inset: 16px; display: flex; flex-direction: column; gap: 12px; }
#maximized-video { flex: 1; min-height: 0; }
#maximized-video .video-tile { width: 100%; height: 100%; }
#thumbnail-strip { display: flex; gap: 10px; height: 96px; overflow-x: auto; }
#thumbnail-strip .thumbnail { flex: 0 0 auto; width: 150px; height: 100%; cursor: pointer; }
#thumbnail-strip .video-tile { width: 100%; height: 100%; aspect-ratio: auto; }

.stage-empty {
	grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 14px; height: 100%; color: var(--text-dim); text-align: center;
}
.stage-empty .se-ring {
	width: 84px; height: 84px; border-radius: 50%;
	border: 2px solid rgba(255,59,59,0.4); display: flex; align-items: center; justify-content: center;
	animation: pulse 1.8s ease-out infinite;
}
.stage-empty .se-ring span { width: 16px; height: 16px; border-radius: 50%; background: var(--red); }
.stage-empty h2 { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.stage-empty p { font-size: 0.9rem; }

.network-quality { position: absolute; top: 10px; right: 10px; display: flex; align-items: flex-end; gap: 2px; height: 14px; padding: 4px; background: rgba(0,0,0,0.5); border-radius: 6px; }
.network-bar { width: 3px; background: rgba(255,255,255,0.25); border-radius: 1px; }
.network-bar:nth-child(1){height:4px}.network-bar:nth-child(2){height:7px}.network-bar:nth-child(3){height:10px}.network-bar:nth-child(4){height:13px}
.network-quality.excellent .network-bar.active { background: var(--green); }
.network-quality.good .network-bar.active { background: var(--green); }
.network-quality.fair .network-bar.active { background: var(--amber); }
.network-quality.poor .network-bar.active { background: var(--red); }

.viewer-strip {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 16px; background: var(--bg-1); border-top: 1px solid var(--border);
	color: var(--text-dim); font-size: 0.85rem;
}

/* ============================ SIDEBAR (host) ============================ */

#sidebar {
	position: relative; width: var(--sidebar-w); flex: 0 0 auto;
	background: var(--bg-1); border-left: 1px solid var(--border);
	display: flex; flex-direction: column; z-index: 25;
}
.sidebar-resize-handle { position: absolute; left: 0; top: 0; width: 6px; height: 100%; cursor: ew-resize; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.sidebar-header h3 { font-size: 0.95rem; font-weight: 700; }
.sidebar-header-right { display: flex; align-items: center; gap: 10px; }
.count-chip { padding: 2px 9px; border-radius: 999px; background: var(--panel-2); color: var(--text-dim); font-size: 0.76rem; font-weight: 700; font-family: var(--mono); }
.icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text-dim); transition: all 0.15s ease; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); background: var(--panel); }

#users-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }

.user-item {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 9px 11px; border-radius: var(--radius-sm); background: var(--panel);
	border: 1px solid transparent; transition: all 0.15s ease;
}
.user-item.speaking { border-color: var(--green); background: rgba(47,212,122,0.08); }
.user-item.local { background: var(--panel-2); }
.user-info { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.user-name { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.role-tag, .hand-tag, .fed-tag, .breakout-tag {
	flex: 0 0 auto; padding: 1px 6px; border-radius: 5px; font-family: var(--mono);
	font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em;
}
.role-tag.role-host   { color: var(--red-2); border: 1px solid rgba(255,59,59,0.5); background: rgba(255,59,59,0.12); }
.role-tag.role-cohost { color: var(--blue); border: 1px solid rgba(58,160,255,0.5); background: rgba(58,160,255,0.12); }
.role-tag.role-guest  { color: var(--amber); border: 1px solid rgba(255,176,32,0.5); background: rgba(255,176,32,0.12); }
.hand-tag { font-family: inherit; font-size: 0.85rem; animation: blink 1.4s steps(2) infinite; }
.fed-tag { color: var(--red); border: 1px solid var(--red); }
.breakout-tag { color: var(--blue); border: 1px solid var(--blue); }
@keyframes blink { 50% { opacity: 0.25; } }

.user-indicators { display: inline-flex; align-items: center; gap: 4px; }
.indicator { width: 15px; height: 15px; }
.indicator.mic-muted { color: var(--red-2); }
.indicator.cam-on, .indicator.screen-on { color: var(--text-dim); }
.indicator.mic-active { color: var(--green); }

.user-controls { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.user-control-btn {
	min-width: 28px; height: 28px; padding: 0 6px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--text-dim);
	font-family: var(--mono); font-size: 0.72rem; font-weight: 700; transition: all 0.14s ease;
}
.user-control-btn svg { width: 14px; height: 14px; }
.user-control-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--panel-2); }
.user-control-btn.active { color: var(--red-2); border-color: rgba(255,59,59,0.4); }
.host-ctl.approve { color: var(--green); border-color: rgba(47,212,122,0.5); }
.host-ctl.approve:hover { background: rgba(47,212,122,0.14); }
.host-ctl.kick:hover { color: var(--red-2); border-color: rgba(255,59,59,0.5); background: rgba(255,59,59,0.12); }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.host-tools summary { cursor: pointer; color: var(--text-mut); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; list-style: none; user-select: none; }
.host-tools summary::-webkit-details-marker { display: none; }
.host-tools summary:hover { color: var(--text-dim); }
.host-tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.tool-btn { padding: 9px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); color: var(--text-dim); font-size: 0.8rem; font-weight: 600; transition: all 0.15s ease; }
.tool-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--panel-2); }
.tool-btn.active { color: var(--red-2); border-color: rgba(255,59,59,0.4); background: rgba(255,59,59,0.1); }

#sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 24; }

/* ============================ MODALS ============================ */

.modal {
	position: fixed; inset: 0; z-index: 100;
	display: flex; align-items: center; justify-content: center; padding: 20px;
	background: rgba(6, 8, 12, 0.72); backdrop-filter: blur(6px);
	animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal-content {
	width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
	background: linear-gradient(180deg, var(--panel), var(--bg-1));
	border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-lg);
	padding: 22px; animation: pop 0.2s cubic-bezier(0.2,0.8,0.3,1.2);
}
@keyframes pop { from { transform: translateY(14px) scale(0.98); opacity: 0; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { font-size: 1.15rem; font-weight: 800; }
.modal-close-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 9px; background: var(--panel-2); color: var(--text-dim); transition: all 0.15s ease; }
.modal-close-btn svg { width: 18px; height: 18px; }
.modal-close-btn:hover { color: var(--text); background: var(--elevated); }

.btn-primary, .btn-secondary {
	width: 100%; padding: 13px; border-radius: 12px; font-size: 0.95rem; font-weight: 700;
	border: 1px solid transparent; transition: all 0.16s ease; margin-top: 8px;
}
.btn-primary { background: linear-gradient(180deg, var(--red-2), var(--red)); color: #fff; box-shadow: 0 8px 24px var(--red-glow); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--elevated); }

.field-label { display: block; margin: 12px 0 6px; font-size: 0.78rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.field-input, select, .keypad-text {
	width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px;
	background: var(--bg); color: var(--text); font-size: 0.95rem; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-input:focus, select:focus, .keypad-text:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,59,59,0.18); }
.field-input::placeholder { color: var(--text-mut); }

/* Keypad (host) */
.keypad-modal { max-width: 340px; text-align: center; }
.keypad-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 16px; }
.keypad-dots { display: flex; align-items: center; justify-content: center; gap: 10px; height: 22px; margin-bottom: 20px; }
.keypad-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red-glow); animation: pop 0.15s ease; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.keypad-key {
	height: 64px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel);
	color: var(--text); font-size: 1.5rem; font-weight: 600; font-family: var(--mono); transition: all 0.12s ease;
}
.keypad-key:hover { background: var(--panel-2); border-color: var(--border-strong); }
.keypad-key:active { transform: scale(0.95); background: var(--elevated); }
.keypad-alt { font-size: 1.2rem; color: var(--text-dim); }
.keypad-go { color: var(--red-2); border-color: rgba(255,59,59,0.4); background: rgba(255,59,59,0.1); }
.keypad-hint { margin-top: 16px; color: var(--text-mut); font-size: 0.76rem; }
.link-btn { display: inline-block; margin-top: 6px; background: none; border: none; color: var(--text-dim); font-size: 0.82rem; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.keypad-text { margin-top: 14px; text-align: center; letter-spacing: 0.2em; }
.shake { animation: shake 0.4s; }
@keyframes shake { 10%,90% { transform: translateX(-2px); } 20%,80% { transform: translateX(4px); } 30%,50%,70% { transform: translateX(-8px); } 40%,60% { transform: translateX(8px); } }

/* Queue captcha */
.queue-modal { max-width: 400px; }
.queue-sub { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 4px; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-q { flex: 0 0 auto; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel-2); font-family: var(--mono); font-weight: 700; letter-spacing: 0.05em; white-space: nowrap; }
.captcha-a { flex: 1; text-align: center; }

/* ============================ SETTINGS ============================ */
.settings-modal { max-width: 480px; }
.settings-section { margin-bottom: 18px; }
.settings-section h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-mut); margin-bottom: 12px; }
.settings-group { margin-bottom: 12px; }
.settings-group label { display: block; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 6px; }
.mic-level-container { margin-top: 8px; }
.mic-level-meter { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.mic-level-fill { height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width 0.06s linear; }
.mic-level-fill.high { background: var(--red); }
.settings-preview { margin-top: 12px; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.settings-preview video { width: 100%; height: 100%; object-fit: cover; }
#settings-preview-placeholder { color: var(--text-mut); font-size: 0.85rem; }
.settings-toggle { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.settings-toggle label { font-size: 0.9rem; }
.settings-hint { color: var(--text-mut); font-size: 0.78rem; }
.toggle-btn { width: 46px; height: 26px; border-radius: 999px; border: none; background: var(--panel-2); position: relative; transition: background 0.2s ease; }
.toggle-slider { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-mut); transition: all 0.2s ease; }
.toggle-btn[data-enabled="true"] { background: var(--red); }
.toggle-btn[data-enabled="true"] .toggle-slider { left: 23px; background: #fff; }
.desktop-only-setting { display: block; }
@media (hover: none) and (pointer: coarse) { .desktop-only-setting { display: none; } }
.mobile-only-setting { display: none; }

/* ============================ SOUNDBOARD ============================ */
.soundboard-modal { max-width: 460px; }
.soundboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.soundboard-key { padding: 18px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font-size: 0.92rem; font-weight: 600; transition: all 0.14s ease; }
.soundboard-key:hover { border-color: var(--red); background: rgba(255,59,59,0.08); transform: translateY(-2px); }
.soundboard-key:active { transform: translateY(0); }
.soundboard-hint { color: var(--text-mut); font-size: 0.76rem; text-align: center; }
.soundboard-hint code { font-family: var(--mono); color: var(--text-dim); }

/* ============================ VOLUME POPUP ============================ */
.volume-popup { position: fixed; z-index: 120; width: 220px; padding: 14px; background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); }
.volume-popup-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.85rem; }
.volume-popup-header span:last-child { color: var(--text-dim); font-family: var(--mono); }
.volume-popup input[type=range] { width: 100%; accent-color: var(--red); }
.volume-popup-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.7rem; color: var(--text-mut); }

/* ============================ DEBUG / DIAL / RECORD ============================ */
.debug-modal { max-width: 620px; }
.debug-section { margin-bottom: 14px; }
.debug-section h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mut); margin-bottom: 8px; }
.debug-info-block, .debug-logs { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); white-space: pre-wrap; word-break: break-word; }
.debug-logs { max-height: 200px; overflow-y: auto; }
.debug-actions { display: flex; gap: 10px; }
.debug-actions .btn-secondary { margin-top: 0; }

.dial-modal { max-width: 320px; }
.dial-display { min-height: 42px; margin-bottom: 14px; padding: 10px; text-align: center; font-family: var(--mono); font-size: 1.3rem; letter-spacing: 0.1em; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.dial-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dial-key { height: 56px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font-size: 1.3rem; font-family: var(--mono); transition: all 0.12s ease; }
.dial-key:hover { background: var(--panel-2); }
.dial-key:active { transform: scale(0.95); }
.dial-actions { display: flex; gap: 10px; margin-top: 14px; }
.dial-actions .btn-primary, .dial-actions .btn-secondary { margin-top: 0; }
.dial-codes-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dial-codes-list li { display: flex; gap: 12px; align-items: center; padding: 8px; background: var(--panel); border-radius: 8px; }
.dial-codes-list code { font-family: var(--mono); color: var(--red-2); }
.dial-codes-list span { color: var(--text-dim); font-size: 0.85rem; }

.record-modal { max-width: 340px; text-align: center; }
.record-status { font-family: var(--mono); color: var(--text-dim); margin-bottom: 12px; }
.record-progress { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-bottom: 16px; }
.record-progress-fill { height: 100%; width: 0; background: var(--red); transition: width 0.1s linear; }
.record-actions { display: flex; gap: 10px; }
.record-btn { margin-top: 0; }
.fed-fake-rec { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 8px; padding: 7px 14px; background: rgba(20,0,0,0.9); border: 1px solid var(--red); border-radius: 999px; }
.fed-fake-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: blink 1.2s steps(2) infinite; }
.fed-fake-label { color: var(--red-2); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; }
.fed-fake-time { font-family: var(--mono); color: var(--text-dim); font-size: 0.8rem; }

/* ============================ EASTER-EGG MODES ============================ */
body.trippy-mode #chat-screen { animation: trippy 8s linear infinite; }
@keyframes trippy { 0%,100% { filter: hue-rotate(0); } 50% { filter: hue-rotate(180deg); } }
body.schizo-mode .video-tile { animation: schizo 0.4s infinite; }
@keyframes schizo { 0%,100% { transform: translate(0,0); } 25% { transform: translate(1px,-1px) rotate(0.4deg); } 75% { transform: translate(-1px,1px) rotate(-0.4deg); } }
body.pong-mode #video-grid { display: block; position: relative; }
body.pong-mode #video-grid .video-tile { position: absolute; width: 220px; aspect-ratio: 16/9; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 820px) {
	:root { --sidebar-w: 86%; }
	.bar-center { display: none; }
	#controls { gap: 8px; }
	.bar-right { gap: 6px; }
	.pill-btn { padding: 0 12px; font-size: 0.82rem; }
	#sidebar { position: fixed; right: 0; top: 0; height: 100%; box-shadow: var(--shadow-lg); }
	.mobile-only-setting { display: flex; }
}
@media (max-width: 520px) {
	.pill-btn span { display: none; }
	.pill-btn { width: 44px; justify-content: center; padding: 0; }
	.control-btn { width: 42px; height: 42px; }
}
