/* ===== MODE SELECTION MODAL ===== */
.mode-selection-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mode-selection-modal.active {
  opacity: 1;
  visibility: visible;
}

.mode-selection-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.mode-selection-modal.active .mode-selection-content {
  transform: scale(1);
}

.mode-selection-content h2 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 12px;
  text-align: center;
  font-weight: 600;
}

.mode-selection-content > p {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-bottom: 32px;
  font-size: 16px;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.mode-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 30px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mode-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mode-btn .icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.mode-btn .label {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.mode-btn .description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* ===== VOICE ASSISTANT ===== */
.voice-assistant {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 450px;
  height: 650px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.voice-assistant.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  visibility: hidden;
  pointer-events: none;
}

.voice-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  border-radius: 20px 20px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.voice-avatar {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.voice-info h4 {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.voice-status-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

.voice-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.voice-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.voice-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 400px;
}

.mic-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mic-pulse, .mic-pulse-2 {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  opacity: 0;
}

.mic-pulse.active,
.mic-pulse-2.active {
  animation: pulse 2s infinite;
  opacity: 0.8;
}

.mic-pulse-2 {
  animation-delay: 1s;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.mic-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  position: relative;
  z-index: 2;
}

.mic-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.mic-circle {
  animation: glow 1.5s infinite;
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5), 0 0 40px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8), 0 0 60px rgba(102, 126, 234, 0.5);
  }
}

.voice-prompt {
  color: #667eea;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

.voice-transcript-container {
  width: 100%;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  padding: 16px;
  min-height: 80px;
}

.transcript-label {
  color: #667eea;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.voice-transcript {
  color: #333;
  font-size: 16px;
  line-height: 1.6;
}

.transcript-placeholder {
  color: rgba(102, 126, 234, 0.5);
  font-style: italic;
}

.voice-response-container {
  width: 100%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
}

.voice-response-container.hidden {
  display: none;
}

.response-label {
  color: #667eea;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.voice-response {
  color: #333;
  font-size: 15px;
  line-height: 1.6;
}

.typing-indicator {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 10px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .voice-assistant {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 80px;
    max-height: 500px;
  }

  .mode-buttons {
    grid-template-columns: 1fr;
  }

  .mode-selection-content {
    padding: 30px 20px;
  }

  .mic-container {
    width: 100px;
    height: 100px;
  }

  .mic-pulse, .mic-pulse-2 {
    width: 100px;
    height: 100px;
  }

  .mic-circle {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }
}

/* Dark mode support */
[data-theme="dark"] .voice-assistant {
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.9));
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .voice-transcript-container {
  background: rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] .voice-transcript {
  color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .voice-response {
  color: rgba(255, 255, 255, 0.9);
}
