/* Audio-first Tovac Call styling */
:root {
  --bg: #05090f;
  --panel: #0f172a;
  --panel-light: rgba(15, 23, 42, 0.86);
  --border: rgba(148, 163, 184, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-strong: #0ea5e9;
  --danger: #f87171;
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: radial-gradient(circle at top, rgba(34, 211, 238, 0.15), transparent 55%), linear-gradient(180deg, #030712 0%, #020409 100%);
  color: var(--text);
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 17, 30, 0.92);
  backdrop-filter: blur(18px);
}
.brand {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.header-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-room {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header-room .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.header-room #headerRoom {
  font-size: 18px;
  font-weight: 600;
}
.header-status {
  color: var(--muted);
  font-size: 14px;
}

.pill-btn {
  padding: 10px 16px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.pill-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.main-grid {
  min-height: calc(100% - 72px - 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  padding: 36px min(6vw, 56px);
}

.panel {
  background: var(--panel-light);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.45);
}

.join-panel h1 { margin: 0 0 8px; font-size: 32px; }
.join-panel .lead { color: var(--muted); margin-bottom: 24px; line-height: 1.5; }

.form-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-row label { font-weight: 600; font-size: 14px; }
.form-row input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 16px;
}

.input-group { display: flex; gap: 10px; }
.input-group input { flex: 1; }

.btn {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.4);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 100%);
  border: none;
  color: #0b1120;
}
.btn.ghost {
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.join-actions { display: flex; gap: 12px; }
.tips { margin-top: 24px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.hidden { display: none !important; }

.call-panel { display: flex; flex-direction: column; gap: 24px; }
.call-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.call-header h2 { margin: 0; font-size: 28px; }
.call-subtitle { color: var(--muted); margin-top: 6px; }
.badges { display: flex; gap: 10px; align-items: center; }
.badge {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  color: var(--muted);
  font-size: 14px;
}

.call-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  min-height: 280px;
}
.participants h3, .chat h3, .now-playing h3 { margin-top: 0; }

.participants-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.participants-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.participants-list .avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-weight: 700;
  font-size: 18px;
}
.participants-list .meta { display: flex; flex-direction: column; gap: 2px; }
.participants-list .meta .name { font-weight: 600; }
.participants-list .meta .meta-sub { color: var(--muted); font-size: 12px; }

.conversation { display: flex; flex-direction: column; gap: 24px; }
.now-playing { padding: 18px; border-radius: 16px; background: rgba(8, 15, 30, 0.75); border: 1px solid rgba(255, 255, 255, 0.05); }
.now-playing p { margin: 8px 0 0; color: var(--muted); }

.chat-box {
  height: 220px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 16px;
  background: rgba(8, 15, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.chat-box.empty { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.chat-box .msg {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
}
.chat-box .msg strong { color: var(--accent); }
.chat-box .msg .time { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 400; }

.chat-input { display: flex; gap: 10px; margin-top: 12px; }
.chat-input input {
  flex: 1;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
  color: var(--text);
}
.chat-input button { min-width: 98px; }

.control-bar { display: flex; gap: 16px; }
.control-btn {
  flex: 0 0 auto;
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 15, 30, 0.85);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.control-btn.danger {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.2) 0%, rgba(248, 113, 113, 0.55) 100%);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fee2e2;
}
.control-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.footer {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
  background: rgba(5, 9, 15, 0.8);
}

@media (max-width: 980px) {
  .call-body { grid-template-columns: 1fr; }
  .participants { order: 2; }
  .conversation { order: 1; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; height: auto; gap: 12px; padding: 16px; }
  .main-grid { padding: 24px; }
  .panel { padding: 22px; }
  .control-bar { flex-direction: column; }
}
