:root {
  --bg: #0f1117;
  --panel: #171a23;
  --panel-2: #1e2230;
  --border: #2a2f3f;
  --text: #e7eaf3;
  --muted: #9aa3b8;
  --accent: #ff5d8f;
  --accent-2: #8a6bff;
  --user: #2a3352;
  --ok: #4ade80;
  --live: #ff5d8f;
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(255, 93, 143, 0.12), transparent 60%),
              radial-gradient(900px 500px at 10% 110%, rgba(138, 107, 255, 0.12), transparent 60%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 860px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px rgba(255, 93, 143, 0.35);
}

.brand h1 { font-size: 20px; letter-spacing: 0.5px; }
.tagline { color: var(--muted); font-size: 12.5px; }

.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.2s, box-shadow 0.2s;
}
.dot.live {
  background: var(--live);
  box-shadow: 0 0 10px var(--live);
  animation: pulse 1.1s infinite;
}
.dot.busy { background: var(--accent-2); }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.chat {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 4px;
  scroll-behavior: smooth;
}

.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg.ruhi { justify-content: flex-start; }

.bubble {
  max-width: 78%;
  padding: 11px 14px;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 14.5px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.msg.ruhi .bubble {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.msg.user .bubble {
  background: var(--user);
  border-bottom-right-radius: 5px;
}

.bubble.hint {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 13px;
}
.bubble.hint a { color: var(--accent); }

.action-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 220px;
}
.action-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}
.action-text {
  flex: 1;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.1s, filter 0.15s;
}
.action-btn:hover { filter: brightness(1.1); }
.action-btn:active { transform: scale(0.95); }

.suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 0;
}

.chip {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.chip:hover { border-color: var(--accent); }
.chip:active { transform: scale(0.97); }

.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}

.composer input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
.composer input::placeholder { color: var(--muted); }

.mic, .send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
  flex-shrink: 0;
}
.mic:hover, .send:hover { border-color: var(--accent); }
.mic:active, .send:active { transform: scale(0.94); }

.mic.recording {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  animation: pulse 1.1s infinite;
}

.interim {
  color: var(--muted);
  font-style: italic;
  font-size: 13.5px;
  text-align: center;
  padding: 4px;
  min-height: 20px;
}

.mic-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding-bottom: 4px;
}
