@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-deep: #05070c;
  --bg-surface: #0b0f19;
  --bg-surface-elevated: #111827;
  --bg-glass: rgba(16, 23, 41, 0.65);
  --bg-glass-heavy: rgba(11, 15, 25, 0.88);
  --bg-glass-input: rgba(17, 24, 39, 0.75);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-glow: rgba(139, 92, 246, 0.35);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Model Signatures */
  --color-star: #f59e0b;
  --grad-star: linear-gradient(135deg, #f59e0b 0%, #d946ef 50%, #6366f1 100%);
  --glow-star: 0 0 25px rgba(245, 158, 11, 0.35);

  --color-gemini: #38bdf8;
  --grad-gemini: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  --glow-gemini: 0 0 20px rgba(56, 189, 248, 0.35);

  --color-chatgpt: #10b981;
  --grad-chatgpt: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --glow-chatgpt: 0 0 20px rgba(16, 185, 129, 0.35);

  --color-grok: #fb923c;
  --grad-grok: linear-gradient(135deg, #fb923c 0%, #ef4444 100%);
  --glow-grok: 0 0 20px rgba(251, 146, 60, 0.35);

  --color-claude: #d97706;
  --grad-claude: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  --glow-claude: 0 0 20px rgba(217, 119, 6, 0.35);

  /* Dimensions */
  --sidebar-w: 290px;
  --header-h: 70px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  user-select: text;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmosphere */
.space-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(56, 189, 248, 0.1) 0%, transparent 45%),
    var(--bg-deep);
}

.neural-canvas-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
  transition: opacity var(--transition-smooth);
}

#neuralCoreCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Layout */
.app-container {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 20;
  transition: transform var(--transition-smooth), width var(--transition-smooth);
}

.sidebar.collapsed {
  transform: translateX(-100%);
  width: 0;
  border-right: none;
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-orb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--glow-star);
  border: 1px solid rgba(245, 158, 11, 0.5);
  animation: pulse-orb 4s infinite ease-in-out;
}

.brand-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes pulse-orb {
  0%, 100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 28px rgba(217, 70, 239, 0.6); transform: scale(1.03); }
}

.brand-info h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-star);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-info .brand-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-hover);
}

/* New Chat & Actions */
.sidebar-actions {
  padding: 1rem 1.25rem 0.5rem;
}

.btn-new-chat {
  width: 100%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-new-chat:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%);
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
  transform: translateY(-1px);
}

/* Models Status List in Sidebar */
.sidebar-section {
  padding: 1rem 1.25rem;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.model-sync-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.model-card-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.model-card-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
  transform: translateX(3px);
}

.model-card-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.model-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.model-badge-icon.star { background: var(--grad-star); box-shadow: var(--glow-star); }
.model-badge-icon.gemini { background: var(--grad-gemini); box-shadow: var(--glow-gemini); }
.model-badge-icon.chatgpt { background: var(--grad-chatgpt); box-shadow: var(--glow-chatgpt); }
.model-badge-icon.grok { background: var(--grad-grok); box-shadow: var(--glow-grok); }
.model-badge-icon.claude { background: var(--grad-claude); box-shadow: var(--glow-claude); }

.model-item-details {
  flex: 1;
  min-width: 0;
}

.model-item-details .name {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-item-details .sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  display: block;
}

.model-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* History List */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.history-item {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-footer .status-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Main Command Deck */
.main-deck {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: transparent;
}

/* Top Navbar */
.top-navbar {
  height: var(--header-h);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 10;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mode-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  gap: 0.25rem;
}

.mode-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.mode-tab:hover {
  color: var(--text-main);
}

.mode-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.mode-tab[data-mode="omni"].active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef08a;
}

.mode-tab[data-mode="council"].active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(251, 146, 60, 0.2) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #bae6fd;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-tool-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-tool-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.nav-tool-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fef08a;
}

.audio-pulse-indicator {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 12px;
}

.audio-pulse-indicator span {
  width: 3px;
  height: 100%;
  background: #f59e0b;
  border-radius: 2px;
  animation: audio-bar 0.8s infinite ease-in-out alternate;
}
.audio-pulse-indicator span:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.audio-pulse-indicator span:nth-child(3) { animation-delay: 0.4s; height: 80%; }

@keyframes audio-bar {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Chat Feed Area */
.chat-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.chat-viewport::-webkit-scrollbar {
  width: 6px;
}
.chat-viewport::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Welcome Hero Screen */
.welcome-hero {
  max-width: 900px;
  margin: auto;
  text-align: center;
  padding: 2.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.4), 0 0 60px rgba(99, 102, 241, 0.25);
  border: 2px solid rgba(245, 158, 11, 0.6);
}

.hero-halo {
  position: absolute;
  inset: -8px;
  border-radius: 34px;
  border: 1px dashed rgba(245, 158, 11, 0.4);
  animation: spinHalo 25s linear infinite;
}

@keyframes spinHalo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

.hero-title .gradient-text {
  background: var(--grad-star);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 650px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.quad-cluster-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cluster-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  backdrop-filter: blur(10px);
}

.cluster-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.cluster-pill.gemini .pill-dot { background: var(--color-gemini); box-shadow: var(--glow-gemini); }
.cluster-pill.chatgpt .pill-dot { background: var(--color-chatgpt); box-shadow: var(--glow-chatgpt); }
.cluster-pill.grok .pill-dot { background: var(--color-grok); box-shadow: var(--glow-grok); }
.cluster-pill.claude .pill-dot { background: var(--color-claude); box-shadow: var(--glow-claude); }
.cluster-pill.star .pill-dot { background: var(--color-star); box-shadow: var(--glow-star); }

/* Quick Action Prompt Chips */
.quick-prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: 850px;
  margin-top: 1rem;
}

.prompt-chip {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.prompt-chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--grad-star);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.prompt-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.prompt-chip:hover::before {
  opacity: 1;
}

.prompt-chip .chip-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-star);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.prompt-chip .chip-text {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.4;
  font-weight: 500;
}

/* Chat Messages */
.message-row {
  display: flex;
  gap: 1rem;
  max-width: 950px;
  width: 100%;
  margin: 0 auto;
  animation: msgSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msgSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-row.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.message-row.user .msg-avatar {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff;
}

.msg-avatar.star { background: var(--grad-star); box-shadow: var(--glow-star); color: #fff; }
.msg-avatar.gemini { background: var(--grad-gemini); box-shadow: var(--glow-gemini); color: #fff; }
.msg-avatar.chatgpt { background: var(--grad-chatgpt); box-shadow: var(--glow-chatgpt); color: #fff; }
.msg-avatar.grok { background: var(--grad-grok); box-shadow: var(--glow-grok); color: #fff; }
.msg-avatar.claude { background: var(--grad-claude); box-shadow: var(--glow-claude); color: #fff; }

.msg-content-wrapper {
  flex: 1;
  max-width: calc(100% - 50px);
}

.message-row.user .msg-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.msg-sender-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.msg-sender-meta .sender-name {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

.msg-sender-meta .consensus-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fef08a;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
}

.msg-bubble {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  line-height: 1.65;
  font-size: 0.95rem;
  color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.message-row.user .msg-bubble {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.3) 0%, rgba(14, 165, 233, 0.2) 100%);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  border-top-right-radius: 4px;
}

.message-row.ai .msg-bubble {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border-top-left-radius: 4px;
}

.message-row.ai.star .msg-bubble { border-color: rgba(245, 158, 11, 0.3); }
.message-row.ai.gemini .msg-bubble { border-color: rgba(56, 189, 248, 0.3); }
.message-row.ai.chatgpt .msg-bubble { border-color: rgba(16, 185, 129, 0.3); }
.message-row.ai.grok .msg-bubble { border-color: rgba(251, 146, 60, 0.3); }
.message-row.ai.claude .msg-bubble { border-color: rgba(217, 119, 6, 0.3); }

/* Markdown styling inside bubbles */
.msg-bubble h1, .msg-bubble h2, .msg-bubble h3 {
  font-family: 'Outfit', sans-serif;
  margin: 1.1rem 0 0.5rem;
  color: #fff;
  font-weight: 700;
}
.msg-bubble h1:first-child, .msg-bubble h2:first-child, .msg-bubble h3:first-child {
  margin-top: 0;
}
.msg-bubble p {
  margin-bottom: 0.85rem;
}
.msg-bubble p:last-child {
  margin-bottom: 0;
}
.msg-bubble ul, .msg-bubble ol {
  margin: 0.5rem 0 0.85rem 1.35rem;
}
.msg-bubble li {
  margin-bottom: 0.35rem;
}
.msg-bubble strong {
  color: #fff;
  font-weight: 600;
}

/* Thought Accordion */
.thought-accordion {
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.thought-header {
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.thought-header:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.thought-body {
  padding: 0.75rem 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #a1a1aa;
  line-height: 1.5;
  border-top: 1px solid var(--border-subtle);
  white-space: pre-wrap;
  display: none;
}

.thought-accordion.open .thought-body {
  display: block;
}

/* Consensus Matrix Card in STAR AI Bubble */
.consensus-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.model-contrib-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.72rem;
}

.contrib-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.contrib-text {
  color: var(--text-muted);
  line-height: 1.35;
  font-size: 0.7rem;
}

/* Code Snippet & Sandbox Block */
.code-container {
  background: #090d16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin: 0.9rem 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.code-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-code-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.btn-code-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-code-action.run-btn {
  color: #38bdf8;
  font-weight: 600;
}

pre code {
  display: block;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #f1f5f9;
  overflow-x: auto;
}

/* Msg Footer Actions */
.msg-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.toolbar-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

/* Council Mode Layout (Arena) */
.council-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
}

.council-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color var(--transition-fast);
}

.council-card.gemini { border-top: 3px solid var(--color-gemini); }
.council-card.chatgpt { border-top: 3px solid var(--color-chatgpt); }
.council-card.grok { border-top: 3px solid var(--color-grok); }
.council-card.claude { border-top: 3px solid var(--color-claude); }

.council-card-header {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.council-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
}

.council-card-body {
  padding: 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2e8f0;
  flex: 1;
  max-height: 380px;
  overflow-y: auto;
}

/* ===================================================
   ULTRA-LUXURY CHAT INPUT DOCK (State-of-the-Art Capsule)
   =================================================== */
.input-deck {
  padding: 0.85rem 1.75rem 1.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 7, 12, 0.85) 30%, var(--bg-deep) 100%);
  position: relative;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
}

.input-card {
  max-width: 880px;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 28px;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(245, 158, 11, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.input-card:hover {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.75), 0 0 35px rgba(245, 158, 11, 0.2);
}

.input-card:focus-within {
  border-color: #f59e0b;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.3);
}

/* Attachment Preview inside capsule */
.attachment-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  margin-bottom: 0.25rem;
}

.attachment-preview img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.attachment-tag {
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 500;
  flex: 1;
}

.btn-remove-attachment {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.2rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

#promptInput {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #f8fafc !important;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  resize: none !important;
  max-height: 160px;
  min-height: 26px;
  padding: 0.35rem 0.25rem !important;
  box-shadow: none !important;
}

#promptInput::placeholder {
  color: rgba(148, 163, 184, 0.65);
  font-weight: 400;
}

.btn-action, .btn-mic {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-action:hover, .btn-mic:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  transform: scale(1.08);
}

.btn-mic.listening {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  animation: pulse-mic 1s infinite alternate;
}

@keyframes pulse-mic {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

.btn-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d946ef) !important;
  border: none !important;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-send:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(217, 70, 239, 0.6);
}

.btn-send:active {
  transform: scale(0.95);
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Live Artifacts / Sandbox Slide-out Drawer */
.sandbox-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-surface-elevated);
  border-left: 1px solid var(--border-hover);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
}

.sandbox-drawer.open {
  transform: translateX(0);
}

.sandbox-header {
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sandbox-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.sandbox-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px;
  border-radius: var(--radius-sm);
}

.sandbox-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
}

.sandbox-tab.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.sandbox-preview-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #ffffff;
}

.sandbox-code-view {
  flex: 1;
  display: none;
  background: #090d16;
  overflow: auto;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #f1f5f9;
}

/* Settings Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 560px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform var(--transition-smooth);
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.api-key-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.api-key-label {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.api-key-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #fff;
  outline: none;
  transition: border-color var(--transition-fast);
}

.api-key-input:focus {
  border-color: rgba(245, 158, 11, 0.6);
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--grad-star);
  border: none;
  color: #fff;
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Typing cursor animation */
.typing-cursor::after {
  content: '▋';
  color: #f59e0b;
  margin-left: 2px;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===================================================
   RESPONSIVE LUXURY MOBILE ENGINE (<= 900px)
   =================================================== */

.mobile-menu-btn {
  display: none;
}

.mobile-nav-logo {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.brand-orb-small {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.brand-orb-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-nav-logo span {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--grad-star);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 998;
  display: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-backdrop.active {
  display: block !important;
  opacity: 1 !important;
}

@media (max-width: 900px) {
  :root {
    --header-h: 60px;
  }

  /* Slide-over Off-canvas Mobile Drawer */
  .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 285px !important;
    max-width: 82vw !important;
    height: 100dvh !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 12px 0 45px rgba(0, 0, 0, 0.85) !important;
    border-right: 1px solid rgba(245, 158, 11, 0.25) !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .mobile-nav-logo {
    display: flex !important;
  }

  .mode-selector {
    display: none !important;
  }

  /* Keep top navbar uncluttered & ultra luxury */
  .top-navbar {
    padding: 0 0.85rem !important;
    height: 60px !important;
  }

  .nav-right .nav-tool-btn:not(.luxury-vip-pill) {
    display: none !important;
  }

  .nav-right {
    gap: 0.45rem !important;
  }

  /* Responsive Arena & Council */
  .council-grid {
    grid-template-columns: 1fr;
  }
  .consensus-matrix {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Chat viewport adjustments */
  .chat-viewport {
    padding: 1rem 0.85rem 1rem !important;
  }

  /* Welcome hero scaled for mobile */
  .welcome-hero {
    padding: 1.5rem 0.5rem 1rem !important;
    gap: 1rem !important;
  }

  .hero-avatar-wrap {
    width: 72px !important;
    height: 72px !important;
  }

  .hero-title {
    font-size: 1.85rem !important;
  }

  .hero-subtitle {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  .preset-suggestions-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .feature-pills {
    display: none !important;
  }

  /* Luxury Input Dock on Mobile */
  .input-deck {
    padding: 0.4rem 0.65rem 0.75rem !important;
  }

  .input-card {
    border-radius: 24px !important;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem !important;
  }

  .input-meta {
    display: none !important;
  }
}

/* =========================================
   NEURAL IMAGE STUDIO & HANDS-FREE VOICE
   ========================================= */

.btn-hands-free {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 70, 239, 0.2) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef08a;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-hands-free:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 70, 239, 0.35) 100%);
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.btn-hands-free.active {
  background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
  border-color: #ef4444;
  color: #fff;
  animation: pulse-voice-glow 1.5s infinite alternate;
}

@keyframes pulse-voice-glow {
  0% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); }
  100% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.8); }
}

/* Image Studio Modal */
.image-studio-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(16px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.image-studio-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.studio-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 1050px;
  max-width: 95vw;
  height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.studio-header {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--grad-star);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.studio-main-grid {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Left Canvas Viewport */
.studio-canvas-stage {
  flex: 1;
  background: #060911;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
}

#imageEditorCanvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  cursor: crosshair;
}

/* Right Control Panel */
.studio-tools-panel {
  width: 330px;
  background: rgba(11, 15, 25, 0.95);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  gap: 1.25rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.tool-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-star);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preset-pills-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.btn-preset {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.btn-preset:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef08a;
}

.slider-control {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.6rem;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.draw-tools-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-picker-input {
  -webkit-appearance: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}

.color-picker-input::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
}

.studio-footer {
  padding: 0.9rem 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-footer-left {
  display: flex;
  gap: 0.5rem;
}

.studio-footer-right {
  display: flex;
  gap: 0.75rem;
}

/* Hands-Free Voice Floating Banner when active */
.voice-mode-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.6);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.3);
  backdrop-filter: blur(16px);
  z-index: 150;
  animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.voice-wave-animation {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}

.voice-wave-animation span {
  width: 3.5px;
  height: 100%;
  background: #f59e0b;
  border-radius: 2px;
  animation: wavePulse 0.9s infinite ease-in-out alternate;
}
.voice-wave-animation span:nth-child(2) { animation-delay: 0.15s; height: 60%; background: #38bdf8; }
.voice-wave-animation span:nth-child(3) { animation-delay: 0.3s; height: 90%; background: #d946ef; }
.voice-wave-animation span:nth-child(4) { animation-delay: 0.45s; height: 50%; background: #10b981; }

@keyframes wavePulse {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

/* =========================================================
   2026 QUANTUM DEFENSE SHIELD & MODERN LOGIN PORTAL
   ========================================================= */

.login-portal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: 
    radial-gradient(circle at center, rgba(5, 7, 14, 0.72) 0%, rgba(4, 6, 12, 0.95) 100%),
    url('../assets/login_cyber_vault.jpg') center/cover no-repeat fixed;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  visibility: visible;
}

.login-portal-overlay.authenticated {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 480px;
  max-width: 95vw;
  background: rgba(13, 18, 30, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.4rem;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.9), 
    0 0 40px rgba(245, 158, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  animation: loginCardPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardPop {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #38bdf8, #d946ef, #10b981);
}

.login-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
}

.login-brand-orb {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.45);
}

.login-brand-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-star);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.login-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.login-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-google-login {
  width: 100%;
  background: #ffffff;
  color: #1f2937;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.btn-google-login:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.login-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
}

.login-input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.88rem;
  color: #fff;
  outline: none;
  transition: all var(--transition-fast);
}

.login-input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.btn-owner-quick-login {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(56, 189, 248, 0.18) 100%);
  border: 1px dashed rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  color: #fef08a;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-owner-quick-login:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(56, 189, 248, 0.3) 100%);
  border-color: #f59e0b;
  transform: translateY(-1px);
}

.login-msg-error {
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  display: none;
}

.login-footer-security {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* User Profile Badge in Top Navbar */
.nav-user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.65rem 0.3rem 0.4rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.nav-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #f59e0b;
  object-fit: cover;
}

.nav-user-name {
  font-weight: 700;
  color: #fef08a;
}

.btn-nav-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
}

.btn-nav-logout:hover {
  color: #ef4444;
}

/* Quantum Breach Red Alert HUD */
.quantum-breach-hud {
  position: fixed;
  top: 25px;
  right: 25px;
  width: 380px;
  max-width: 90vw;
  background: rgba(20, 5, 8, 0.95);
  border: 2px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: 0 15px 50px rgba(239, 68, 68, 0.5), inset 0 0 25px rgba(239, 68, 68, 0.2);
  backdrop-filter: blur(20px);
  z-index: 1000;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: breachSirenGlow 1.2s infinite alternate;
}

.quantum-breach-hud.active {
  transform: translateX(0);
}

@keyframes breachSirenGlow {
  0% { box-shadow: 0 10px 40px rgba(239, 68, 68, 0.4); border-color: #ef4444; }
  100% { box-shadow: 0 15px 65px rgba(239, 68, 68, 0.85); border-color: #f87171; }
}

.breach-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
}

.breach-icon {
  font-size: 1.5rem;
  animation: pulse-breach 0.8s infinite alternate;
}

@keyframes pulse-breach {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

.breach-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fca5a5;
  letter-spacing: 0.04em;
}

.breach-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.breach-body p {
  font-size: 0.78rem;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

/* Security Shield Dashboard Modal */
.security-dashboard-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, 0.88);
  backdrop-filter: blur(16px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.security-dashboard-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.security-modal-container {
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-lg);
  width: 620px;
  max-width: 95vw;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(16, 185, 129, 0.2);
  overflow: hidden;
}

.sec-log-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.sec-log-table th {
  text-align: left;
  padding: 0.5rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

.sec-log-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

/* =========================================================
   LUXURY HOVER EFFECTS & MICRO-INTERACTIONS
   ========================================================= */

.luxury-hover-tilt {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s;
  will-change: transform;
}

.luxury-hover-tilt:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.45) !important;
}

.luxury-hover-button {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s, filter 0.22s;
  cursor: pointer;
}

.luxury-hover-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 15px rgba(245, 158, 11, 0.25);
}

.glowing-halo {
  position: relative;
}

.glowing-halo::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(217, 70, 239, 0.15) 60%, transparent 100%);
  z-index: -1;
  animation: cosmicHaloPulse 3s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes cosmicHaloPulse {
  0% { transform: scale(0.96); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 1; filter: blur(3px); }
}

/* VIP Sovereign Badge & Button */
.luxury-vip-pill {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 70, 239, 0.18) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.luxury-vip-pill:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 70, 239, 0.3) 100%) !important;
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.35);
}

/* Saved Chat History in Sidebar */
.history-item.active {
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
  font-weight: 600;
}

.history-item:hover .btn-delete-session {
  opacity: 1;
}

.btn-delete-session {
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-delete-session:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* AI Flyer Studio Modal & Responsive Canvas */
#flyerCanvas {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background: #020617;
  transition: transform 0.3s ease;
}

#flyerCanvas:hover {
  transform: scale(1.01);
}

[data-flyer-theme].active {
  background: linear-gradient(135deg, #f59e0b, #d946ef) !important;
  color: #fff !important;
  border-color: transparent !important;
  font-weight: 700;
}

/* Mobile App Download Cards */
#iosStepsPanel ol li {
  margin-bottom: 0.4rem;
}

@media (max-width: 768px) {
  .modal-card {
    width: 95vw !important;
    padding: 1.25rem !important;
  }
}

/* Floating Mobile Install Prompt Banner */
.mobile-install-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 480px;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 9999;
  animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpBanner {
  from {
    opacity: 0;
    transform: translate(-50%, 40px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Hide Install & Download Triggers Once Installed or Running Standalone */
body.star-app-installed #btnOpenAppDownload,
body.star-app-installed #btnLoginAppDownload,
body.star-app-installed #mobileInstallBanner,
@media all and (display-mode: standalone) {
  #btnOpenAppDownload,
  #btnLoginAppDownload,
  #mobileInstallBanner {
    display: none !important;
  }
}

/* ===================================================
   PERMANENT SUPPRESSION OF NETLIFY BADGE / DRAWER / IFRAME
   =================================================== */
[data-netlify-deploy-id],
.netlify-badge,
#netlify-badge,
[class*="netlify-badge"],
[class*="feedback-drawer"],
iframe[src*="netlify"],
div[data-netlify],
a[href*="netlify.com"],
div[class*="netlify"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  bottom: -9999px !important;
/* Input Error Shake Animation */
@keyframes shakeAnimation {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.input-error-shake {
  animation: shakeAnimation 0.4s ease;
  border-color: #ef4444 !important;
}
