/* Keke Voice Assistant — StarkiQ Design System */

:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #1c2333;
  --bg-elevated: #21283b;
  --accent: #e84393;
  --accent-hover: #ff6bb5;
  --accent-dim: rgba(232, 67, 147, 0.15);
  --accent-glow: rgba(232, 67, 147, 0.3);
  --accent2: #a855f7;
  --accent3: #7c5cfc;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --text-faint: #585f6a;
  --border: rgba(139, 148, 158, 0.12);
  --border-hover: rgba(139, 148, 158, 0.25);
  --border-accent: rgba(232, 67, 147, 0.35);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --plex-orange: #e5a00d;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

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

html, body {
  height: 100%; width: 100%;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.hidden { display: none !important; }

/* ═══════ AUTH SCREEN ═══════ */

.auth-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 1000;
}

.auth-card {
  width: 100%; max-width: 420px;
  padding: 48px 40px 36px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  text-align: center;
}

.auth-logo { margin-bottom: 28px; }
.auth-logo-img { height: 48px; }

.auth-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-dim);
  font-size: 14px; margin-bottom: 28px;
}

/* Plex SSO button */
.btn-plex {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px;
  background: var(--plex-orange);
  color: #000; font-weight: 600; font-size: 15px;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.btn-plex:hover { background: #f0b429; transform: translateY(-1px); }
.btn-plex:disabled { opacity: 0.5; cursor: wait; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-faint); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-status {
  color: var(--accent); font-size: 13px;
  margin-top: 12px; min-height: 18px;
}

.auth-error {
  color: #f85149; font-size: 13px;
  min-height: 18px; margin-top: 8px;
}

/* Form inputs */
.form-group { margin-bottom: 12px; }
.form-group input {
  width: 100%; padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-group input::placeholder { color: var(--text-faint); }

.btn-secondary {
  width: 100%; padding: 12px;
  background: var(--bg3); color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text); }

.auth-switch {
  margin-top: 16px; font-size: 13px;
}
.auth-switch a {
  color: var(--accent); text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ═══════ TOPBAR ═══════ */

.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 28px; }
.topbar-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  color: var(--accent);
}

.topbar-right { display: flex; align-items: center; gap: 8px; }

.btn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-dim); cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg3); color: var(--text); }

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}

/* ═══════ SIDEBAR ═══════ */

.sidebar {
  position: fixed; top: 56px; left: 0; bottom: 0;
  width: 260px; z-index: 90;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  position: fixed; inset: 0; z-index: 89;
  background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.sidebar-overlay.visible { opacity: 1; pointer-events: auto; }

.sidebar-header {
  padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.sidebar-title { font-size: 14px; font-weight: 600; color: var(--text-dim); }

.btn-new-chat {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--accent); font-size: 12px;
  cursor: pointer; transition: all 0.15s;
}
.btn-new-chat:hover { background: var(--accent-glow); }
.btn-new-chat svg { width: 14px; height: 14px; }

.sidebar-list { padding: 8px; }
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
  font-size: 13px; color: var(--text-dim);
}
.sidebar-item:hover { background: var(--bg3); color: var(--text); }
.sidebar-item.active { background: var(--accent-dim); color: var(--accent); }
.sidebar-item-icon { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-item-content { flex: 1; min-width: 0; }
.sidebar-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-item-date { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.sidebar-item-delete {
  width: 24px; height: 24px;
  background: none; border: none;
  color: var(--text-faint); cursor: pointer;
  opacity: 0; transition: opacity 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-item:hover .sidebar-item-delete { opacity: 1; }
.sidebar-item-delete svg { width: 14px; height: 14px; }
.sidebar-date-group {
  padding: 8px 12px 4px; font-size: 11px;
  color: var(--text-faint); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.sidebar-empty { padding: 24px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* Sidebar toggle is now inside the topbar — no fixed positioning needed */

/* ═══════ MAIN CONTENT ═══════ */

.chat-container {
  position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
}

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 24px 16px;
  display: flex; flex-direction: column; align-items: center;
}

/* ═══════ KEKE ORB — The Mic Button ═══════ */

.keke-center {
  display: flex; flex-direction: column; align-items: center;
  margin-top: 6vh; margin-bottom: 24px;
}

/* Keke avatar is now the main interaction button */

.input-bar-inline {
  width: 100%;
  max-width: 640px;
  margin: 16px auto 8px;
}

/* ═══════ KEKE ORB — Fluid Animated States ═══════ */

.keke-orb {
  width: 140px; height: 140px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Ambient glow ring behind the orb */
.keke-orb::before {
  content: '';
  position: absolute; inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  opacity: 0.5;
  transition: all 0.5s ease;
  z-index: -1;
}

.keke-avatar-btn {
  width: 150px; height: 150px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  overflow: hidden; padding: 0;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 0 0 var(--accent-glow);
  position: relative;
  z-index: 1;
}

.keke-avatar-btn:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: scale(1.05);
}

/* ── IDLE: Gentle breathing ── */
.keke-orb:not(.listening):not(.thinking):not(.speaking) .keke-avatar-btn {
  animation: keke-breathe 4s ease-in-out infinite;
}
@keyframes keke-breathe {
  0%, 100% { box-shadow: 0 0 8px var(--accent-dim); transform: scale(1); }
  50% { box-shadow: 0 0 16px var(--accent-glow); transform: scale(1.02); }
}

/* ── LISTENING: Reactive pulse ring ── */
.keke-orb.listening .keke-avatar-btn {
  border-color: #42a5f5;
  color: #42a5f5;
  animation: keke-listen 1.5s ease-in-out infinite;
}
.keke-orb.listening::before {
  background: radial-gradient(circle, rgba(66,165,245,0.2) 0%, transparent 70%);
  opacity: 1;
  animation: keke-listen-ring 1.5s ease-in-out infinite;
}
@keyframes keke-listen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(66,165,245,0.4); }
  50% { box-shadow: 0 0 0 16px rgba(66,165,245,0); }
}
@keyframes keke-listen-ring {
  0%, 100% { inset: -8px; opacity: 0.6; }
  50% { inset: -20px; opacity: 0.2; }
}

/* ── THINKING: Orbital shimmer ── */
.keke-orb.thinking .keke-avatar-btn {
  border-color: var(--accent2);
  color: var(--accent2);
  animation: keke-think 2s ease-in-out infinite;
}
.keke-orb.thinking::before {
  background: conic-gradient(from 0deg, rgba(168,85,247,0.3), transparent, rgba(232,67,147,0.3), transparent);
  opacity: 1;
  animation: keke-think-spin 2s linear infinite;
}
@keyframes keke-think {
  0%, 100% { box-shadow: 0 0 12px rgba(168,85,247,0.3); }
  50% { box-shadow: 0 0 24px rgba(168,85,247,0.5); }
}
@keyframes keke-think-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── SPEAKING: Rhythmic bounce ── */
.keke-orb.speaking .keke-avatar-btn {
  border-color: #34d399;
  color: #34d399;
  animation: keke-speak 0.6s ease-in-out infinite;
}
.keke-orb.speaking::before {
  background: radial-gradient(circle, rgba(52,211,153,0.2) 0%, transparent 70%);
  opacity: 1;
  animation: keke-speak-ring 0.6s ease-in-out infinite;
}
@keyframes keke-speak {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(52,211,153,0.3); }
  50% { transform: scale(1.06); box-shadow: 0 0 24px rgba(52,211,153,0.5); }
}
@keyframes keke-speak-ring {
  0%, 100% { inset: -8px; opacity: 0.6; }
  50% { inset: -16px; opacity: 0.3; }
}

/* ── ERROR: Brief red flash ── */
.keke-orb.error .keke-avatar-btn {
  border-color: #f85149;
  color: #f85149;
  animation: keke-error 0.3s ease-in-out 2;
}
@keyframes keke-error {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248,81,73,0); }
  50% { box-shadow: 0 0 20px rgba(248,81,73,0.5); }
}

.keke-label {
  margin-top: 14px;
  font-size: 14px; font-weight: 500;
  color: var(--text-dim);
  transition: all 0.4s ease;
  min-height: 20px;
}
.keke-orb.listening + .keke-label { color: #42a5f5; }
.keke-orb.thinking + .keke-label { color: var(--accent2); }
.keke-orb.speaking + .keke-label { color: #34d399; }

/* ═══════ MIC PRIVACY INDICATOR ═══════ */

.mic-indicator {
  position: fixed;
  top: 62px; right: 12px;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(248, 81, 73, 0.15);
  border: 1px solid rgba(248, 81, 73, 0.3);
  border-radius: 20px;
  font-size: 11px; font-weight: 500;
  color: #f85149;
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.mic-indicator.active {
  opacity: 1;
}
.mic-indicator-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f85149;
  animation: mic-blink 1.5s ease-in-out infinite;
}
@keyframes mic-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ═══════ LIVE CAPTIONS (subtitle bar) ═══════ */

.live-caption {
  position: fixed; bottom: 90px;
  left: 50%; transform: translateX(-50%);
  max-width: 80vw; padding: 10px 20px;
  border-radius: 12px; font-size: 15px;
  text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
  z-index: 100; backdrop-filter: blur(12px);
}
.live-caption.caption-visible { opacity: 1; }
.live-caption.caption-user {
  background: rgba(66, 165, 245, 0.12);
  color: #bbdefb;
  border: 1px solid rgba(66, 165, 245, 0.2);
}
.live-caption.caption-ai {
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

/* ═══════ LOADING / PROGRESS INDICATOR ═══════ */

.tool-status {
  text-align: center;
  padding: 12px;
  color: var(--text-dim);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.tool-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════ ACTION CONFIRMATION CARDS ═══════ */

/* ── Action Confirmation (compact pill style) ── */
.action-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
}
.action-card.success-bg { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.15); }
.action-card.error-bg { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.15); }
.action-card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}
.action-card-icon.success { background: rgba(34,197,94,0.12); color: #22c55e; }
.action-card-icon.error { background: rgba(239,68,68,0.12); color: #ef4444; }
.action-card-icon.loading { background: var(--accent-dim); color: var(--accent); }
.action-card-body { flex: 1; }
.action-card-title { font-size: 15px; font-weight: 500; }
.action-card-desc { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* ── Task Plan + Result Cards ── */
.task-plan-card {
  padding: 16px;
  border-left: 3px solid #fbbf24;
}
.task-plan-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.task-plan-risk { font-size: 12px; font-weight: 600; }
.task-plan-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; }
.task-plan-desc { font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.task-plan-steps {
  font-size: 12px; color: var(--text-dim);
  background: var(--bg); padding: 10px;
  border-radius: 6px; white-space: pre-wrap;
  margin-bottom: 8px; line-height: 1.5;
}
.task-plan-wd { font-size: 11px; color: var(--text-faint); }
.task-plan-footer {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--accent);
  text-align: center;
}
.task-result-output {
  font-size: 12px; color: var(--text-dim);
  background: var(--bg); padding: 8px;
  border-radius: 6px; white-space: pre-wrap;
  max-height: 200px; overflow-y: auto;
  margin-top: 8px; line-height: 1.4;
}

/* ═══════ WELCOME STATE ═══════ */

.welcome-state {
  text-align: center;
  max-width: 480px;
}

.welcome-greeting {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.welcome-subtitle {
  color: var(--text-dim);
  font-size: 15px; margin-bottom: 24px;
}

.suggestion-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
}

.chip {
  padding: 8px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim); font-size: 13px;
  cursor: pointer; transition: all 0.2s;
}
.chip:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ═══════ USER QUERY ═══════ */

.user-query {
  align-self: flex-end;
  max-width: 70%;
  padding: 10px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--text); font-size: 14px;
  margin-bottom: 16px;
}

.keke-face {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ═══════ RESULTS — Premium Card System ═══════ */

.results-area {
  width: 100%; max-width: 480px;
  margin: 16px auto 0;
}

/* Universal card shell — glass effect */
.result-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  animation: card-enter 220ms ease-out both;
}
.result-card:hover {
  border-color: rgba(255,255,255,0.1);
}
@keyframes card-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-card:nth-child(2) { animation-delay: 40ms; }
.result-card:nth-child(3) { animation-delay: 80ms; }
.result-card:nth-child(4) { animation-delay: 120ms; }

/* ── Movie/TV Cards ── */
.media-card {
  display: flex; gap: 14px;
  padding: 14px;
}
.result-poster {
  width: 80px; height: 120px;
  object-fit: cover; flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.result-poster-placeholder {
  width: 80px; height: 120px;
  background: var(--bg3); border-radius: 10px;
}
.result-info { flex: 1; min-width: 0; }
.result-title {
  font-weight: 600; font-size: 17px;
  margin-bottom: 4px; color: var(--text);
  line-height: 1.3;
}
.result-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 13px; color: var(--text-dim);
  margin-bottom: 8px;
}
.result-rating {
  background: rgba(229,160,13,0.15);
  color: #e5a00d;
  padding: 1px 6px; border-radius: 4px;
  font-weight: 600; font-size: 12px;
}
.result-type {
  color: var(--accent); font-size: 12px;
  font-weight: 500;
}
.result-overview {
  font-size: 14px; color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.result-actions {
  margin-top: 10px;
  display: flex; gap: 8px;
}
.btn-request {
  padding: 6px 16px; height: 32px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 16px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.btn-request:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-monitor {
  padding: 6px 16px; height: 32px;
  background: transparent; color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; font-size: 13px;
  cursor: pointer; transition: all 0.15s;
}
.btn-monitor:hover { border-color: var(--accent); color: var(--accent); }
.btn-success { background: #22c55e !important; }

/* ── Text Response Card ── */
.text-card { padding: 16px; }
.text-card-content {
  font-size: 15px; line-height: 1.6; color: var(--text);
}
.text-card-content p { margin-bottom: 8px; }

/* ── Info Card (places, people, topics) ── */
.info-card { overflow: hidden; }
.info-card-image {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block;
}
.info-card-body {
  padding: 16px;
  position: relative;
}
/* Gradient overlay on image */
.info-card-image + .info-card-body {
  margin-top: -40px;
  background: linear-gradient(transparent, rgba(13,17,23,0.95) 30px);
  padding-top: 44px;
}
.info-card-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  margin-bottom: 6px; color: #fff;
}
.info-card-desc {
  font-size: 14px; line-height: 1.6;
  color: var(--text-dim);
}

/* ── YouTube Video Cards ── */
.video-cards-container {
  display: flex; flex-direction: column;
  gap: 8px; width: 100%;
}
.video-card {
  display: flex; gap: 12px;
  text-decoration: none; color: inherit;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.video-card:hover { background: rgba(255,255,255,0.04); }
.video-thumb-wrap {
  position: relative; flex-shrink: 0;
  width: 160px; aspect-ratio: 16/9;
  border-radius: 10px; overflow: hidden;
}
.video-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
}
.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  opacity: 0; transition: opacity 0.15s;
}
.video-card:hover .video-play-btn { opacity: 1; }
.video-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  justify-content: center; gap: 4px;
}
.video-title {
  font-size: 14px; font-weight: 500;
  line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.video-channel {
  font-size: 12px; color: var(--text-faint);
}

/* ── Weather Card ── */
.weather-card-display {
  padding: 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.06), transparent);
}
.weather-main {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 12px;
}
.weather-icon { font-size: 44px; line-height: 1; }
.weather-temp {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 700;
  color: var(--text); letter-spacing: -1px;
}
.weather-condition {
  font-size: 14px; color: var(--text-dim);
  text-transform: capitalize; margin-top: 2px;
}
.weather-details {
  display: flex; gap: 16px;
  font-size: 13px; color: var(--text-faint);
  margin-bottom: 16px;
}
.weather-forecast {
  display: flex; justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.weather-fc-day {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  flex: 1;
}
.weather-fc-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-dim);
}
.weather-fc-icon { font-size: 20px; }
.weather-fc-temps {
  font-size: 12px; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* ── Timer Card ── */
.timer-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  cursor: pointer;
}
.timer-countdown {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ═══════ QUICK ACTIONS ═══════ */

.quick-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.quick-action {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-action:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.quick-action-icon { font-size: 16px; }

/* ═══════ LIST CARD ═══════ */

/* ── List Card ── */
.list-card-display { padding: 16px; }
.list-card-header {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-faint); margin-bottom: 12px;
}
.list-card-items { list-style: none; padding: 0; }
.list-card-items li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 15px; color: var(--text);
}
.list-card-items li:last-child { border-bottom: none; }

/* Enhanced result card with drop shadow */
.result-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  animation: card-in 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.2);
  transition: box-shadow 0.2s, transform 0.2s;
}
.result-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px var(--border-accent);
  transform: translateY(-2px);
}

/* ═══════ INPUT BAR ═══════ */

.input-bar-wrap {
  padding: 12px 16px 20px;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}

.input-bar {
  display: flex; gap: 8px;
  max-width: 640px; margin: 0 auto;
}

.input-bar input {
  flex: 1; padding: 12px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text); font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.input-bar input:focus { border-color: var(--accent); }
.input-bar input::placeholder { color: var(--text-faint); }

.send-btn {
  width: 44px; height: 44px;
  background: var(--accent);
  border: none; border-radius: var(--radius-md);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.send-btn:hover { background: var(--accent-hover); }
.send-btn svg { width: 18px; height: 18px; }

/* ═══════ LIVE CAPTION OVERLAY ═══════ */

.live-caption {
  position: fixed; bottom: 100px;
  left: 50%; transform: translateX(-50%);
  max-width: 80vw; padding: 10px 20px;
  border-radius: 20px; font-size: 15px;
  text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 0.4s;
  z-index: 100; backdrop-filter: blur(10px);
}
.live-caption.caption-visible { opacity: 1; }
.live-caption.caption-user {
  background: rgba(232, 67, 147, 0.15);
  color: #fce4ec;
  border: 1px solid var(--border-accent);
}
.live-caption.caption-ai {
  background: rgba(168, 85, 247, 0.15);
  color: #f3e5f5;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ═══════ SETTINGS PANEL ═══════ */

.settings-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.settings-overlay.visible { opacity: 1; pointer-events: auto; }

.settings-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 320px; z-index: 201;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s;
  overflow-y: auto;
}
.settings-panel.open { transform: translateX(0); }

.settings-close {
  position: absolute; top: 12px; right: 12px;
  color: var(--text-dim);
}

.settings-body {
  padding: 48px 20px 20px;
}
.settings-body h3 {
  font-family: var(--font-display);
  font-size: 18px; margin-bottom: 16px;
}
.settings-body label {
  display: block; font-size: 12px;
  color: var(--text-dim); margin: 12px 0 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.settings-body textarea, .settings-body select, .settings-body input[type="range"] {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); padding: 8px;
  font-size: 13px;
}

.theme-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
}

/* ═══════ CONTINUOUS MODE ═══════ */

.speak-btn.continuous-mode { border: 2px solid var(--accent); }
.speak-btn.continuous-mode.muted { opacity: 0.5; }

/* ═══════ RESPONSIVE ═══════ */

/* ═══════ ONBOARDING ═══════ */

.onboarding {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 500;
}
.onboarding-card {
  width: 100%; max-width: 380px;
  padding: 36px 32px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}
.onboarding-card h2 {
  font-family: var(--font-display);
  font-size: 24px; margin-bottom: 4px;
}
.onboarding-card p { color: var(--text-dim); font-size: 14px; }
.onboarding-features {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 20px; text-align: left;
}
.onboarding-feature {
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
}

/* ═══════ MOBILE RESPONSIVE ═══════ */

@media (max-width: 600px) {
  .auth-card { margin: 0 16px; padding: 32px 24px; }
  .welcome-greeting { font-size: 24px; }
  .welcome-subtitle { font-size: 13px; }
  .keke-center { margin-top: 3vh; }
  .keke-orb { width: 110px; height: 110px; }
  .keke-avatar-btn { width: 120px; height: 120px; }
  .keke-page-logo { height: 80px; }

  .topbar { padding: 0 10px; height: 50px; }
  .brand-logo { height: 22px; }
  .topbar-title { font-size: 14px; }
  .chat-container { top: 50px; }

  .input-bar-wrap { padding: 8px 10px 16px; }
  .input-bar input { padding: 10px 12px; font-size: 14px; }

  .quick-actions { gap: 6px; }
  .quick-action { padding: 6px 10px; font-size: 12px; }

  .results-area { margin-top: 30px; }
  .result-card { margin-bottom: 8px; }
  .info-card-image { height: 150px; }
  .weather-icon { font-size: 36px; }
  .weather-temp { font-size: 32px; }

  .sidebar { width: 80vw; }
  .mic-indicator { top: 54px; right: 8px; font-size: 10px; padding: 3px 8px; }

  .live-caption { bottom: 70px; font-size: 13px; max-width: 90vw; }
  .onboarding-card { margin: 0 16px; padding: 28px 20px; }
}
