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

:root {
  --bg: #0a0d14;
  --panel: #11161f;
  --line: #1e2633;
  --text: #e7ecf3;
  --muted: #8b94a7;
  --accent: #22d7ee;
  --accent2: #7c5cff;
  --danger: #ff5c7a;
}

html, body { height: 100%; }

body {
  background: radial-gradient(1200px 600px at 80% -10%, #16213a 0%, var(--bg) 55%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100%;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 22px;
}

.logo {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

.tag { color: var(--muted); font-size: 15px; max-width: 480px; }

.pick { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 14px 34px;
  font-size: 17px;
  font-weight: 700;
  color: #04131a;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: transform .08s ease, filter .15s ease;
}
button:hover { filter: brightness(1.08); }
button:active { transform: scale(.97); }
button:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }

button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}
button.ghost:hover { border-color: var(--accent); filter: none; }

button.danger {
  background: var(--danger);
  color: #fff;
}
button.ghost.danger {
  background: transparent;
  color: var(--danger);
  border-color: #3a2030;
}
button.ghost.danger:hover { border-color: var(--danger); }

.how { list-style: none; color: var(--muted); font-size: 14px; display: grid; gap: 8px; }
.how b { color: var(--text); }

footer { color: var(--muted); font-size: 12px; opacity: .7; }

/* ---------- app pages ---------- */

.sitebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(10, 13, 20, .85);
  backdrop-filter: blur(8px);
  z-index: 10;
  gap: 10px;
}

.logo.small { font-size: 18px; letter-spacing: 1px; }

.status {
  font-size: 13px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55vw;
}
.status.live { color: #57e389; border-color: #1d4a32; }
.status.wait { color: var(--accent); border-color: #14394a; }
.status.bad { color: var(--danger); border-color: #4a2030; }

.home {
  max-width: 820px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 62px);
}

.startcard {
  margin: auto;
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 40px 20px;
}
.startcard h1 { font-size: 22px; }
.startcard p { color: var(--muted); max-width: 420px; font-size: 14px; }

/* chat views */
.room {
  flex: 1;
  display: none;
  flex-direction: column;
  min-height: 0;
}
.room.visible { display: flex; }

.roomhead { display: flex; gap: 10px; align-items: center; justify-content: center; padding-bottom: 10px; }
.partnerpill { color: var(--muted); font-size: 13px; }

.messages {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
.messages .dimmer { color: var(--muted); font-size: 12px; text-align: center; }

.msg { max-width: 72%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.4; word-wrap: break-word; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #04131a; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: #1b2332; border: 1px solid var(--line); border-bottom-left-radius: 4px; }

.typingline { color: var(--muted); font-size: 12px; min-height: 16px; padding: 2px 6px; }

.composer { display: flex; gap: 10px; margin-top: 8px; }
.composer input {
  flex: 1;
  font: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}
.composer input:focus { outline: none; border-color: var(--accent); }
.btnp { background: var(--panel); border: 1px solid var(--line); padding: 0 16px; border-radius: 12px; color: var(--text); }

/* voice */
.call { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.audbox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.meter { display: flex; gap: 4px; align-items: flex-end; height: 40px; }
.meter i { width: 6px; border-radius: 3px; background: var(--accent); opacity: .5; height: 8px; }
.meter.live i { opacity: 1; animation: bounce 1s ease-in-out infinite; }
.meter.live i:nth-child(2) { animation-delay: .1s; }
.meter.live i:nth-child(3) { animation-delay: .2s; }
.meter.live i:nth-child(4) { animation-delay: .3s; }
.meter.live i:nth-child(5) { animation-delay: .4s; }
@keyframes bounce { 0%,100% { height: 8px; } 50% { height: 40px; } }

.callbtns { display: flex; gap: 16px; justify-content: center; }
.micbtn.live { background: var(--danger); color: #fff; }

.pill { color: var(--muted); font-size: 13px; }

.hint { color: var(--muted); font-size: 12px; }

/* modal-ish blocked */
.notice { color: var(--danger); font-size: 13px; min-height: 18px; }