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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #0a0015 0%, #1a0033 100%);
  color: #ffffff;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.arkgpt-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  /* Add animated neon border to container */
  position: relative;
  border: 2px solid transparent;
}

.arkgpt-container::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 0;
  padding: 2px;
  background: linear-gradient(45deg, #a855f7, #ec4899, #f59e0b, #10b981, #3b82f6, #8b5cf6, #a855f7);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: neon-border-rotate 4s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes neon-border-rotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.arkgpt-header {
  padding: 1.5rem;
  text-align: center;
  background: rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.2);
  position: relative;
  z-index: 2;
}

.arkgpt-title {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
  text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.arkgpt-subtitle {
  font-size: 0.9rem;
  color: rgba(168, 85, 247, 0.8);
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}

.arkgpt-chat {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.arkgpt-chat::-webkit-scrollbar {
  width: 8px;
}

.arkgpt-chat::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.arkgpt-chat::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 4px;
}

.arkgpt-message {
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  max-width: 80%;
  animation: fadeIn 0.3s ease-in;
}

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

/* Updated user message to cyan/blue color */
.arkgpt-message.user {
  align-self: flex-end;
  background: rgba(59, 130, 246, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* Updated AI message to neon green color */
.arkgpt-message.assistant {
  align-self: flex-start;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.arkgpt-input-container {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(168, 85, 247, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}

.arkgpt-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.arkgpt-input:focus {
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.arkgpt-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Updated button styles and added microphone button */
.arkgpt-send-btn,
.arkgpt-mic-btn {
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  background: rgba(168, 85, 247, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.8);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.arkgpt-send-btn:hover,
.arkgpt-mic-btn:hover {
  background: rgba(168, 85, 247, 0.8);
  box-shadow: 0 6px 30px rgba(168, 85, 247, 0.6);
  transform: translateY(-2px);
}

.arkgpt-send-btn:active,
.arkgpt-mic-btn:active {
  transform: translateY(0);
}

/* Add recording state for mic button */
.arkgpt-mic-btn.recording {
  background: rgba(239, 68, 68, 0.6);
  border-color: rgba(239, 68, 68, 0.8);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
  animation: recording-pulse 1s ease-in-out infinite;
}

@keyframes recording-pulse {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
  }
  50% {
    box-shadow: 0 6px 40px rgba(239, 68, 68, 0.9);
  }
}

/* Add speaking state visual feedback */
body.voice-active .arkgpt-container::before {
  animation: neon-border-rotate 2s linear infinite, voice-pulse 1.5s ease-in-out infinite;
}

@keyframes voice-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.arkgpt-loading {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.8);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}
