:root{
  --bg1:#0b1020;
  --bg2:#0b1b3a;
  --card:#0f172a;
  --card2:#111c33;
  --text:#e8eefc;
  --muted:#9fb0d0;
  --border:rgba(255,255,255,.10);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --btn:#225AE3;
  --btn2:#1e4fc8;
  --danger:#ef4444;
  --ok:#22c55e;
  --warn:#f59e0b;
  --chip: rgba(255,255,255,.06);
  --chip2: rgba(255,255,255,.10);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: var(--sans);
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 20% 15%, rgba(34,90,227,.35), transparent 55%),
    radial-gradient(900px 500px at 80% 40%, rgba(249,115,22,.25), transparent 55%),
    radial-gradient(900px 600px at 60% 95%, rgba(34,197,94,.14), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  overflow-x:hidden;
}
.wrap{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 16px;
}
.card{
  width:min(880px, 100%);
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(17,28,51,.92));
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow: var(--shadow);
  padding:26px;
  position:relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(500px 260px at 20% 10%, rgba(34,90,227,.20), transparent 65%),
    radial-gradient(520px 260px at 80% 35%, rgba(249,115,22,.12), transparent 65%);
  pointer-events:none;
  filter: blur(2px);
  opacity:.9;
}
.card > *{position:relative}
header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.title{
  display:flex;
  flex-direction:column;
  gap:6px;
}
h1{
  font-size:22px;
  margin:0;
  letter-spacing:.2px;
}
.sub{
  margin:0;
  color:var(--muted);
  line-height:1.45;
  font-size:14px;
  max-width:56ch;
}
.pillbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}
.pill{
  font-size:12px;
  color:var(--muted);
  background: var(--chip);
  border:1px solid var(--border);
  padding:6px 10px;
  border-radius:999px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  white-space:nowrap;
}
.dot{
  width:8px; height:8px;
  border-radius:999px;
  background: var(--chip2);
  display:inline-block;
  box-shadow:0 0 0 3px rgba(255,255,255,.03);
}
.dot.ok{ background: var(--ok); }
.dot.warn{ background: var(--warn); }
.dot.bad{ background: var(--danger); }

.main{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:18px;
  align-items:stretch;
}
@media (max-width: 860px){
  .main{grid-template-columns:1fr}
}
.hero{
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
  background: rgba(255,255,255,.03);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:14px;
  min-height:280px;
}
.center{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  text-align:center;
  padding:18px 10px;
}
.big{
  font-size:36px;
  font-weight:800;
  letter-spacing:.2px;
  margin:0;
}
.hint{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
  max-width:60ch;
}
.actions{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  margin-top:6px;
}
button{
  appearance:none;
  border:0;
  border-radius:999px;
  padding:14px 22px;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  color:white;
  background: linear-gradient(180deg, var(--btn), var(--btn2));
  box-shadow: 0 10px 26px rgba(34,90,227,.35);
  transition: transform .08s ease, filter .12s ease, opacity .12s ease;
  user-select:none;
}
button:hover{ filter:brightness(1.03) }
button:active{ transform: translateY(1px) scale(.995); }
button:disabled{
  opacity:.55;
  cursor:not-allowed;
  filter:grayscale(.15);
}
.ghost{
  background: transparent;
  border:1px solid var(--border);
  color: var(--text);
  box-shadow:none;
}
.ghost:hover{ background: rgba(255,255,255,.04); filter:none; }

.panel{
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
  background: rgba(255,255,255,.02);
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:280px;
}
.panel h2{
  margin:0;
  font-size:14px;
  letter-spacing:.2px;
  color: var(--text);
  opacity:.95;
}
.row{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.row_center{
  margin-top:10px;
  gap:12px;
  justify-content:center;
}
.kv{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:13px;
}
.kv b{
  color:var(--text);
  font-weight:700;
}
.mono{
  font-family: var(--mono);
  font-size:12px;
  color: rgba(232,238,252,.92);
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
  padding:8px 10px;
  border-radius:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
  white-space:nowrap;
}
.log{
  flex:1;
  min-height:140px;
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:10px;
  overflow:auto;
  font-family: var(--mono);
  font-size:12px;
  line-height:1.45;
  color: rgba(232,238,252,.9);
}
.log .l{
  padding:3px 2px;
  border-bottom:1px dashed rgba(255,255,255,.06);
}
.log .t{ color: rgba(159,176,208,.95); }
.log .k{ color: rgba(34,197,94,.95); }
.log .w{ color: rgba(245,158,11,.95); }
.log .e{ color: rgba(239,68,68,.95); }

.foot{
  margin-top:14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  opacity:.95;
}
a{ color: rgba(159,210,255,.95); text-decoration:none; }
a:hover{ text-decoration:underline; }
.sr{
  display:flex; align-items:center; gap:8px;
}
select{
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  color:var(--text);
  padding:8px 10px;
  font-size:13px;
}
.small{
  font-size:12px;
  color:var(--muted);
}

/* --- STT debug list --- */
.stt_list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:260px;
  overflow:auto;
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:10px;
}

.stt_item{
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius:14px;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.stt_head{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.stt_meta{
  font-size:12px;
  color:var(--muted);
  font-family: var(--mono);
}

.stt_text{
  font-family: var(--mono);
  font-size:13px;
  color: rgba(232,238,252,.95);
  white-space:pre-wrap;
  line-height:1.35;
  background: rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  padding:8px 10px;
}

.stt_controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.stt_btn{
  padding:10px 14px;
  font-size:13px;
  font-weight:800;
}

.stt_btn.ghost{
  border-radius:999px;
}

.stt_item audio{
  width:100%;
  height:36px;
}


/* --- SOLO (webcall.html) --- */
.hidden{ display:none !important; }

.solo{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
}

.btn.big{
  min-width: 220px;
  min-height: 64px;
  font-size: 20px;
  border-radius: 999px;
  margin-right:  20px
}

/* --- animated background while in call --- */
body.in-call{
  background-size: 220% 220%;
  animation: bgShift 8s ease-in-out infinite;
}

@keyframes bgShift{
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
