/* ── Reset ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Raleway:wght@300;400;500;700&display=swap');

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #050508 0%, #0a0a0f 25%, #1a1a2e 50%, #0a0a0f 75%, #050508 100%);
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: background-shift 20s ease-in-out infinite;
}

@keyframes background-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── Canvas — fills the viewport behind everything ───────────────────────── */
#orb-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Status text — "listening…" / "thinking…" ────────────────────────────── */
#status-text {
  position: fixed;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(76, 168, 232, 0.7);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: lowercase;
  font-weight: 300;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  transition: all 0.4s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#status-text:empty {
  opacity: 0;
}

#status-text.speaking {
  color: rgba(76, 168, 232, 1);
  text-shadow: 
    0 0 15px rgba(76, 168, 232, 0.8), 
    0 0 30px rgba(76, 168, 232, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.5);
  animation: speaking-glow 1.2s ease-in-out infinite alternate;
  font-size: 16px;
  letter-spacing: 4px;
}

@keyframes speaking-glow {
  0% { 
    text-shadow: 0 0 15px rgba(76, 168, 232, 0.8), 0 0 30px rgba(76, 168, 232, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5); 
    transform: translateX(-50%) scale(1);
  }
  100% { 
    text-shadow: 0 0 20px rgba(76, 168, 232, 1), 0 0 40px rgba(76, 168, 232, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5); 
    transform: translateX(-50%) scale(1.05);
  }
}

/* ── Persistent label ─────────────────────────────────────────────────────── */
#assistant-label {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(76, 168, 232, 0.25);
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  font-weight: 300;
  font-family: 'JetBrains Mono', monospace;
  pointer-events: none;
  z-index: 10;
  user-select: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  animation: label-pulse 4s ease-in-out infinite;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 2px 8px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

#assistant-label.ai-mode-code {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes label-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.4; }
}

/* ── Connection badge — top-right ─────────────────────────────────────────── */
#connection-badge {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(76, 168, 232, 0.12);
  border-radius: 20px;
  background: rgba(5, 5, 8, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 20;
  pointer-events: none;
}

#connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* Connected */
#connection-badge.connected #connection-dot {
  background: #22c55e;
  box-shadow: 0 0 7px rgba(34, 197, 94, 0.5);
}

/* Disconnected / reconnecting */
#connection-badge.disconnected #connection-dot {
  background: #ef4444;
  box-shadow: 0 0 7px rgba(239, 68, 68, 0.4);
  animation: pulse-red 1.4s ease-in-out infinite;
}

@keyframes pulse-red {
  0%,
  100% { opacity: 1; }
  50%  { opacity: 0.35; }
}

#connection-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.3);
  text-transform: lowercase;
  transition: color 0.4s ease;
}

#connection-badge.connected #connection-label {
  color: rgba(34, 197, 94, 0.7);
}

#connection-badge.disconnected #connection-label {
  color: rgba(239, 68, 68, 0.6);
}

/* ── Mute button ───────────────────────────────────────────────────────────── */
#mute-button {
  position: fixed;
  top: 18px;
  left: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(76, 168, 232, 0.16);
  border-radius: 999px;
  background: rgba(5, 5, 8, 0.34);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  z-index: 20;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

#mute-button:hover {
  background: rgba(5, 5, 8, 0.5);
  color: rgba(255, 255, 255, 0.72);
  border-color: rgba(76, 168, 232, 0.28);
}

#mute-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 168, 232, 0.18);
}

#mute-button.is-muted {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.26);
  color: rgba(255, 160, 160, 0.9);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.14);
}

/* ── Microphone button ────────────────────────────────────────────────────── */
#mic-button {
  position: fixed;
  top: 18px;
  left: 100px; /* Position next to mute button */
  padding: 8px 12px;
  border: 1px solid rgba(76, 168, 232, 0.16);
  border-radius: 999px;
  background: rgba(5, 5, 8, 0.34);
  color: rgba(76, 168, 232, 0.8);
  font-size: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  z-index: 20;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

#mic-button:hover {
  background: rgba(5, 5, 8, 0.5);
  color: rgba(76, 168, 232, 1);
  border-color: rgba(76, 168, 232, 0.28);
}

#mic-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(76, 168, 232, 0.18);
}

#mic-button:active {
  background: rgba(76, 168, 232, 0.2);
  border-color: rgba(76, 168, 232, 0.4);
  color: rgba(76, 168, 232, 1);
}

/* ── Error toast ──────────────────────────────────────────────────────────── */
#error-text {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  letter-spacing: 1.2px;
  font-weight: 400;
  font-family: 'Raleway', sans-serif;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: all 0.5s ease;
  white-space: pre-wrap;
  max-width: 600px;
  text-align: center;
  line-height: 1.4;
  background: rgba(10, 10, 15, 0.9);
  padding: 16px 24px;
  border-radius: 20px;
  border: 1px solid rgba(76, 168, 232, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#error-text.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: toast-appear 0.5s ease-out;
}

#error-text.show.info {
  border: 1px solid rgba(76, 232, 168, 0.3);
  background: rgba(10, 15, 10, 0.9);
}

@keyframes toast-appear {
  0% { 
    opacity: 0; 
    transform: translateX(-50%) translateY(-20px); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
  }
}

/* ── Input container ───────────────────────────────────────────────────────── */
#input-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  z-index: 20;
  background: rgba(10, 10, 15, 0.8);
  padding: 18px 24px;
  border-radius: 35px;
  border: 1px solid rgba(76, 168, 232, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(76, 168, 232, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  animation: container-float 6s ease-in-out infinite;
}

#voice-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

#button-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

@keyframes container-float {
  0%, 100% { transform: translateX(-50%) translateY(0px); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

#input-container:hover {
  border-color: rgba(76, 168, 232, 0.4);
  box-shadow: 
    0 16px 50px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(76, 168, 232, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

#voice-select {
  padding: 8px 12px;
  border: 1px solid rgba(76, 168, 232, 0.2);
  border-radius: 20px;
  background: rgba(20, 20, 30, 0.6);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-family: 'Raleway', sans-serif;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

#voice-select:focus {
  border-color: rgba(76, 168, 232, 0.5);
  box-shadow: 
    0 0 10px rgba(76, 168, 232, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
  background: rgba(25, 25, 40, 0.8);
}

#voice-select option {
  background: rgba(10, 10, 15, 0.9);
  color: rgba(255, 255, 255, 0.9);
}
}

#user-input {
  padding: 12px 18px;
  border: 1px solid rgba(76, 168, 232, 0.1);
  border-radius: 25px;
  background: rgba(20, 20, 30, 0.6);
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  outline: none;
  width: 320px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

#user-input:focus {
  border-color: rgba(76, 168, 232, 0.6);
  box-shadow: 
    0 0 15px rgba(76, 168, 232, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
  background: rgba(25, 25, 40, 0.8);
}

#user-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#button-row #mic-button {
  position: static !important;
  top: auto !important;
  left: auto !important;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid rgba(76, 168, 232, 0.2);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.8), rgba(20, 20, 30, 0.6));
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

#button-row #mic-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(76, 168, 232, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

#button-row #mic-button:hover::before {
  transform: translateX(100%);
}

#reload-voices-button:hover {
  border-color: rgba(156, 163, 175, 0.6);
  box-shadow: 0 6px 20px rgba(156, 163, 175, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

#send-button {
  padding: 12px 24px;
  border: 1px solid rgba(76, 168, 232, 0.2);
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(76, 168, 232, 0.2), rgba(100, 180, 255, 0.1));
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

#send-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(76, 168, 232, 0.2), transparent);
  transition: left 0.5s ease;
}

#send-button:hover::before {
  left: 100%;
}

#send-button:hover {
  border-color: rgba(76, 168, 232, 0.5);
  box-shadow: 0 6px 20px rgba(76, 168, 232, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

/* ==========================================
   HOMEPAGE STYLES
   ========================================== */

body {
  margin: 0;
  padding: 0;
  font-family: 'Raleway', sans-serif;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
  color: #ffffff;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
#hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  z-index: 2;
  position: relative;
}

.logo-container {
  text-align: center;
}

.orb-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

#hero-orb-canvas {
  max-width: 100%;
  height: auto;
}

.main-title {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: -2px;
}

.subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.hero-description h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.description {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(79, 172, 254, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: block;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

.feature-card p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-button.primary {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.cta-button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(79, 172, 254, 0.4);
}

.cta-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.cta-button.code {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 150, 255, 0.1) 100%);
  border-color: rgba(0, 212, 255, 0.4);
  color: #00d4ff;
}

.cta-button.code:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(0, 150, 255, 0.2) 100%);
  border-color: #00d4ff;
  color: #fff;
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.arrow {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
  transform: translateX(5px);
}

/* Hero Background */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 1;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: 10%;
  left: -5%;
  animation-delay: 0s;
}

.shape-2 {
  width: 300px;
  height: 300px;
  top: 60%;
  right: -5%;
  animation-delay: 5s;
}

.shape-3 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(120deg); }
  66% { transform: translateY(10px) rotate(240deg); }
}

/* Stats Section */
#stats-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.02);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-item {
  padding: 30px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
}

/* Sections */
.section {
  padding: 100px 0;
}

.section h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 60px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tech Section */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.tech-item {
  text-align: center;
  padding: 40px 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-10px);
  border-color: rgba(79, 172, 254, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tech-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.tech-item h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

.tech-item p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* ==========================================
   NAVIGATION & MENUS
   ========================================== */

/* Main Navigation */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(76, 168, 232, 0.2);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-brand a:hover {
  color: #4facfe;
}

.nav-logo {
  font-size: 24px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.nav-title {
  font-size: 18px;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-menu.mobile-open {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(5, 5, 8, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(76, 168, 232, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px;
  animation: slideDown 0.3s ease;
}

.nav-menu.mobile-open .nav-link {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(76, 168, 232, 0.1);
}

.nav-link.active {
  color: #4facfe;
  background: rgba(79, 172, 254, 0.15);
}

.nav-icon {
  font-size: 16px;
}

.menu-button {
  display: none;
  background: none;
  border: 1px solid rgba(76, 168, 232, 0.3);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu-button:hover {
  border-color: rgba(76, 168, 232, 0.6);
  background: rgba(76, 168, 232, 0.1);
}

.menu-button.active {
  border-color: #4facfe;
  background: rgba(76, 168, 232, 0.2);
}

/* ── Welcome Section ────────────────────────────────────────────────────── */
#welcome-section {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  z-index: 10;
  pointer-events: none;
}

.welcome-container {
  text-align: center;
  padding: 20px;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  border: 1px solid rgba(76, 168, 232, 0.2);
  margin: 0 20px;
}

.welcome-container h1 {
  color: #ffffff;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-container p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.user-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px;
  background: rgba(76, 168, 232, 0.1);
  border-radius: 10px;
  min-width: 80px;
}

.stat-icon {
  font-size: 20px;
}

.stat-item span:last-child {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.hamburger {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  position: relative;
  transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

/* Side Panels */
.side-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 350px;
  height: 100vh;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(76, 168, 232, 0.2);
  transition: right 0.3s ease;
  z-index: 1100;
  overflow-y: auto;
}

.side-panel.open {
  right: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(76, 168, 232, 0.2);
}

.panel-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
}

.panel-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.panel-close:hover {
  color: #ffffff;
  background: rgba(76, 168, 232, 0.1);
}

.panel-content {
  padding: 20px;
}

/* Settings Styles */
.setting-group {
  margin-bottom: 30px;
}

.setting-group h4 {
  color: #4facfe;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(76, 168, 232, 0.2);
  padding-bottom: 8px;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding: 10px 0;
}

.setting-item label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  min-width: 120px;
}

.setting-item input[type="range"] {
  flex: 1;
  max-width: 120px;
}

.setting-item span {
  color: #4facfe;
  font-size: 12px;
  font-weight: 500;
  min-width: 40px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-label input:checked + .toggle-slider {
  background: #4facfe;
}

.toggle-label input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label input {
  display: none;
}

.setting-item select {
  background: rgba(20, 20, 30, 0.6);
  border: 1px solid rgba(76, 168, 232, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  font-size: 14px;
  backdrop-filter: blur(10px);
  outline: none;
  transition: all 0.3s ease;
}

.setting-item select:focus {
  border-color: rgba(76, 168, 232, 0.5);
  box-shadow: 0 0 10px rgba(76, 168, 232, 0.3);
}

/* Help Panel */
.help-section {
  margin-bottom: 25px;
}

.help-section h4 {
  color: #4facfe;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

.command-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.command-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(76, 168, 232, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.4;
}

.command-list li:last-child {
  border-bottom: none;
}

.command-list strong {
  color: #ffffff;
}

/* Quick Actions */
#quick-actions {
  position: fixed;
  bottom: 120px;
  right: 20px;
  z-index: 900;
}

.quick-actions-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.quick-actions-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(79, 172, 254, 0.4);
}

.plus-icon {
  display: block;
  transition: transform 0.3s ease;
}

.quick-actions-button.active .plus-icon {
  transform: rotate(45deg);
}

.quick-actions-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s ease;
  pointer-events: none;
}

.quick-actions-button.active + .quick-actions-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.quick-action {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.9);
  border: 1px solid rgba(76, 168, 232, 0.3);
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action:hover {
  background: rgba(76, 168, 232, 0.2);
  border-color: rgba(76, 168, 232, 0.6);
  transform: scale(1.1);
}

/* Overlay for panels */
.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1050;
}

.panel-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #welcome-section {
    top: 70px;
    max-width: 95%;
  }

  .welcome-container {
    padding: 15px;
    margin: 0 10px;
  }

  .welcome-container h1 {
    font-size: 24px;
  }

  .welcome-container p {
    font-size: 14px;
  }

  .user-stats {
    gap: 15px;
  }

  .stat-item {
    min-width: 60px;
    padding: 8px;
  }

  .nav-menu {
    display: none;
  }
  
  .menu-button {
    display: block;
  }
  
  .nav-container {
    padding: 0 15px;
  }
  
  .side-panel {
    width: 100%;
    right: -100%;
  }
  
  #quick-actions {
    bottom: 100px;
    right: 15px;
  }
  
  .nav-menu.mobile-open {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(5, 5, 8, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(76, 168, 232, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px;
    animation: slideDown 0.3s ease;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Light Mode */
body.light-mode {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%, #f8fafc 100%);
  color: #1e293b;
}

body.light-mode #main-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(79, 172, 254, 0.3);
}

body.light-mode .nav-link {
  color: rgba(30, 41, 59, 0.7);
}

body.light-mode .nav-link:hover,
body.light-mode .nav-link.active {
  color: #4facfe;
  background: rgba(79, 172, 254, 0.1);
}

body.light-mode .side-panel {
  background: rgba(255, 255, 255, 0.95);
  border-left-color: rgba(79, 172, 254, 0.3);
}

body.light-mode .panel-header h3 {
  color: #1e293b;
}

body.light-mode .setting-group h4 {
  color: #4facfe;
}

body.light-mode .setting-item label {
  color: rgba(30, 41, 59, 0.8);
}

body.light-mode .command-list li {
  color: rgba(30, 41, 59, 0.8);
}

body.light-mode .command-list strong {
  color: #1e293b;
}

body.light-mode .quick-action {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(79, 172, 254, 0.4);
  color: rgba(30, 41, 59, 0.8);
}

/* No Animations Mode */
body.no-animations * {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

body.no-animations .bg-shape {
  animation: none !important;
}

body.no-animations .wave-bar {
  animation: none !important;
}

body.no-animations .container-float {
  animation: none !important;
}

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
  #main-nav {
    height: 50px;
  }
  
  .nav-container {
    height: 50px;
  }
  
  .nav-menu.mobile-open {
    top: 50px;
  }
  
  .side-panel {
    width: 100%;
    right: -100%;
  }
  
  .quick-actions-menu {
    right: 10px;
  }
  
  .quick-action {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* Loading States */
.nav-link.loading {
  opacity: 0.6;
  pointer-events: none;
}

.nav-link.loading::after {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid rgba(76, 168, 232, 0.3);
  border-top: 2px solid #4facfe;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notification Badges */
.nav-link .badge {
  background: #ef4444;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 5px;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

#mic-button.listening {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.2));
  border-color: rgba(239, 68, 68, 0.6);
  color: rgba(255, 160, 160, 1);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
  animation: listening-pulse 1s ease-in-out infinite alternate;
}

@keyframes listening-pulse {
  0% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.4); }
  100% { box-shadow: 0 0 35px rgba(239, 68, 68, 0.6), 0 0 45px rgba(239, 68, 68, 0.3); }
}

#stop-button {
  padding: 12px 16px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
  color: rgba(255, 160, 160, 0.8);
  font-size: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

#stop-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(239, 68, 68, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

#stop-button:hover::before {
  transform: translateX(100%);
}

#stop-button:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
  color: rgba(255, 160, 160, 1);
  transform: scale(1.05);
}

#test-voice-button {
  padding: 12px 16px;
  border: 1px solid rgba(76, 168, 232, 0.3);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(76, 168, 232, 0.2), rgba(100, 180, 255, 0.1));
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

#test-voice-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(76, 168, 232, 0.2), transparent);
  transition: left 0.5s ease;
}

#test-voice-button:hover::before {
  left: 100%;
}

#test-voice-button:hover {
  border-color: rgba(76, 168, 232, 0.6);
  box-shadow: 0 6px 20px rgba(76, 168, 232, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

#reload-voices-button {
  padding: 8px 12px;
  border: 1px solid rgba(156, 163, 175, 0.3);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.2), rgba(209, 213, 219, 0.1));
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  margin-left: 8px;
}

#reload-voices-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(156, 163, 175, 0.2), transparent);
  transition: left 0.5s ease;
}

#reload-voices-button:hover::before {
  left: 100%;
}

#reload-voices-button:hover {
  border-color: rgba(156, 163, 175, 0.6);
  box-shadow: 0 6px 20px rgba(156, 163, 175, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

#send-button {
  padding: 12px 24px;
  border: 1px solid rgba(76, 168, 232, 0.2);
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(76, 168, 232, 0.2), rgba(100, 180, 255, 0.1));
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

#send-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

#send-button:hover::before {
  left: 100%;
}

#send-button:hover {
  border-color: rgba(76, 168, 232, 0.6);
  box-shadow: 0 6px 20px rgba(76, 168, 232, 0.3);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
}