/* ── Palette (same as your tkinter main.py, just as CSS variables now) ── */
:root {
  --bg: #050a0f;
  --bg-panel: #080e15;
  --bg-card: #0a1520;
  --bg-msg: #0d1e2e;
  --cyan: #00d4ff;
  --cyan-dim: #0a4a5e;
  --cyan-glow: #00aacc;
  --orange: #ff6b1a;
  --orange-dim: #3d1a06;
  --green: #00ff88;
  --white: #e8f4f8;
  --dim: #2a4a5e;
  --dimmer: #0f2030;
  --font-hud: 'Courier New', monospace;
}

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

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-hud);
  height: 100vh;
  overflow: hidden;
}

.app {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 280px;
  background: var(--bg-panel);
  border-right: 1px solid var(--cyan-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px;
  overflow-y: auto;
}

.ring-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin-bottom: 100px;
}

.ring {
  position: absolute;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.ring-outer-1 { width: 224px; height: 224px; border: 1px solid rgba(0, 212, 255, 0.35); }
.ring-outer-2 { width: 208px; height: 208px; border: 1px solid rgba(0, 212, 255, 0.25); }
.ring-outer-3 { width: 192px; height: 192px; border: 1px solid rgba(0, 212, 255, 0.15); }

.ring-arc {
  width: 180px;
  height: 180px;
  border: 3px solid transparent;
  border-top-color: var(--cyan-glow);
  border-right-color: var(--cyan-glow);
  box-shadow: 0 0 15px rgba(0, 170, 204, 0.5);
  animation: spin 3s linear infinite;
}

.ring-center-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.4); }
}

.status-text {
  color: var(--cyan);
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-top: 16px;
}

.mode-text {
  color: var(--dim);
  font-size: 10px;
  margin-top: 2px;
  margin-bottom: 12px;
}

.divider {
  width: 100%;
  border: none;
  border-top: 1px solid var(--cyan-dim);
  margin: 12px 0;
}

.section-label {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.stat-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 10px;
}

.stat-label { color: var(--dim); width: 70px; }

.stat-bar {
  flex: 1;
  height: 8px;
  background: var(--dimmer);
  border: 1px solid var(--dim);
}

.stat-fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 0.6s ease;
}

.stat-value { color: var(--cyan); width: 32px; text-align: right; }

.clock {
  font-size: 28px;
  font-weight: bold;
  color: var(--white);
}

.date {
  font-size: 10px;
  color: var(--dim);
  margin-top: 2px;
  margin-bottom: 8px;
}

.hud-btn {
  width: 100%;
  background: var(--dimmer);
  color: var(--cyan);
  border: none;
  padding: 10px;
  margin-bottom: 6px;
  font-family: var(--font-hud);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.hud-btn:hover { background: var(--cyan-dim); color: var(--white); }

/* ── Main / chat area ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 48px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--cyan-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.topbar-title {
  color: var(--cyan);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

.topbar-status {
  color: var(--green);
  font-size: 10px;
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 640px;
  padding: 10px 14px;
  border-left: 2px solid var(--dim);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.msg-header {
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 4px;
  opacity: 0.7;
}

.msg-jarvis { background: var(--bg-msg); border-left-color: var(--cyan); align-self: flex-start; }
.msg-jarvis .msg-header { color: var(--cyan); }

.msg-you { background: var(--bg-card); border-left-color: var(--orange); align-self: flex-end; }
.msg-you .msg-header { color: var(--orange); }

.msg-system {
  color: var(--dim);
  font-size: 11px;
  padding: 2px 4px;
}

.typing-indicator {
  color: var(--cyan-glow);
  font-size: 12px;
  padding: 4px;
}

/* ── Input bar ── */
.input-bar {
  height: 64px;
  background: var(--bg-panel);
  border-top: 1px solid var(--cyan-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.input-prompt {
  color: var(--orange);
  font-size: 12px;
  font-weight: bold;
}

#messageInput {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--cyan-dim);
  color: var(--white);
  padding: 10px 12px;
  font-family: var(--font-hud);
  font-size: 13px;
  outline: none;
}

#messageInput:focus { border-color: var(--cyan); }

.transmit-btn {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: none;
  padding: 10px 16px;
  font-family: var(--font-hud);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.transmit-btn:hover { background: var(--cyan); color: var(--bg); }

.voice-btn {
  background: var(--dimmer);
  border: 1px solid var(--cyan-dim);
  color: var(--cyan);
  font-size: 16px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.voice-btn:hover { background: var(--cyan-dim); }

.voice-btn.listening {
  background: var(--orange);
  color: var(--bg);
  border-color: var(--orange);
}
