@import 'bootstrap/dist/css/bootstrap.min.css';
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css');

:root {
  --ai-dark: #0a0b1e;
  --ai-accent: #1a1b3d;
  --ai-glow: rgba(99, 102, 241, 0.15);
  --ai-grid: rgba(99, 102, 241, 0.05);
  --neon-blue: #00f3ff;
  --neon-purple: #ff00ff;
  --neon-green: #00ff99;
  --primary-gradient: linear-gradient(to right, #9333ea, #3b82f6);
  --dark-gradient: linear-gradient(to bottom, #111827, #000000);
  --orb-1: radial-gradient(600px circle at 0% 0%, rgba(0, 243, 255, 0.1), transparent 70%);
  --orb-2: radial-gradient(800px circle at 100% 0%, rgba(255, 0, 255, 0.1), transparent 70%);
  --orb-3: radial-gradient(600px circle at 50% 100%, rgba(0, 255, 153, 0.1), transparent 70%);
}

* {
  font-family: 'Space Grotesk', sans-serif;
}

/* AI-themed background */
body {
  background-color: var(--ai-dark);
  position: relative;
  overflow-x: hidden;
  color: #fff;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    var(--orb-1),
    var(--orb-2),
    var(--orb-3);
  animation: orbFloat 20s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-5%, 5%) scale(1.1);
  }
  66% {
    transform: translate(5%, -5%) scale(0.9);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

.animate-glow {
  animation: glow 4s ease-in-out infinite alternate;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 20px var(--neon-blue),
                0 0 30px var(--neon-blue),
                0 0 40px var(--neon-blue);
  }
  50% {
    box-shadow: 0 0 20px var(--neon-purple),
                0 0 30px var(--neon-purple),
                0 0 40px var(--neon-purple);
  }
  100% {
    box-shadow: 0 0 20px var(--neon-green),
                0 0 30px var(--neon-green),
                0 0 40px var(--neon-green);
  }
}

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: flow 4s linear infinite;
  background-size: 200% auto;
}

@keyframes flow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hover-glow {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hover-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: -1;
  background: linear-gradient(45deg, 
    var(--neon-blue), 
    var(--neon-purple), 
    var(--neon-green), 
    var(--neon-blue)
  );
  background-size: 400%;
  animation: borderGlow 4s linear infinite;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hover-glow:hover::before {
  opacity: 1;
}

@keyframes borderGlow {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 5px rgba(0, 243, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    45deg,
    var(--neon-blue),
    var(--neon-purple),
    var(--neon-green)
  );
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    45deg,
    var(--neon-green),
    var(--neon-blue),
    var(--neon-purple)
  );
}

/* Bootstrap Dark Theme Overrides */
.btn-gradient {
  background: var(--primary-gradient);
  border: none;
  color: white;
  transition: opacity 0.2s;
}

.btn-gradient:hover {
  opacity: 0.9;
  color: white;
}

.btn-gradient:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.bg-glass {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-control.dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.form-control.dark:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #9333ea;
  box-shadow: 0 0 0 0.25rem rgba(147, 51, 234, 0.25);
  color: white;
}

.form-control.dark::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.modal-dark {
  background: var(--dark-gradient);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.spinner-border-light {
  border-color: rgba(255, 255, 255, 0.25);
  border-right-color: white;
}

.text-light-50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Fix for modal backdrop */
.modal {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Fix for button focus states */
.btn:focus {
  box-shadow: none;
}

.btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Fix for navbar */
.navbar {
  height: 60px;
  padding: 0 24px !important;
  background: #0D0D0D !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.navbar-brand {
  font-weight: 500;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
}

.navbar-brand:hover {
  color: #fff;
}

.upgrade-btn {
  background: #7C3AED !important;
  color: #fff !important;
  border: none !important;
  padding: 6px 12px !important;
  font-size: 0.875rem !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
}

.upgrade-btn:hover {
  background: #6D28D9 !important;
}

/* Brilliant button styles */
.brilliant-button {
  position: relative;
  background: rgba(0, 243, 255, 0.1);
  border: none;
  padding: 1rem 2rem;
  color: var(--neon-blue);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  overflow: hidden;
  transition: 0.5s;
}

.brilliant-button:hover {
  background: var(--neon-blue);
  color: #000;
  box-shadow: 0 0 20px var(--neon-blue);
  transition-delay: 0.5s;
}

.brilliant-button span {
  position: absolute;
  display: block;
}

.brilliant-button span:nth-child(1) {
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-blue));
  animation: btn-anim1 1s linear infinite;
}

@keyframes btn-anim1 {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* Chat Interface Styles */
.bg-gradient {
  background: linear-gradient(to right, #9333ea, #3b82f6);
}

.btn-gradient {
  background: linear-gradient(to right, #9333ea, #3b82f6);
  border: none;
  color: white;
}

.btn-gradient:hover {
  opacity: 0.9;
  color: white;
}

.text-gradient {
  background: linear-gradient(to right, #9333ea, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-gradient-purple-blue {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(59, 130, 246, 0.1));
}

.border-purple {
  border-color: rgba(147, 51, 234, 0.3) !important;
}

.messages-container {
  height: calc(100vh - 13rem);
}

.typing-dot {
  width: 8px;
  height: 8px;
  animation: bounce 1s infinite;
}

.animation-delay-100 {
  animation-delay: 0.1s;
}

.animation-delay-200 {
  animation-delay: 0.2s;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.white-space-pre-wrap {
  white-space: pre-wrap;
}

/* Dark theme form controls */
.form-control {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.form-control:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #9333ea;
  box-shadow: 0 0 0 0.25rem rgba(147, 51, 234, 0.25);
  color: white;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Custom scrollbar */
.messages-container::-webkit-scrollbar {
  width: 8px;
}

.messages-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.messages-container::-webkit-scrollbar-thumb {
  background: rgba(147, 51, 234, 0.5);
  border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: rgba(147, 51, 234, 0.7);
}

/* Update chat container background */
.chat-container {
  background: rgba(10, 11, 30, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ai-accent);
  border-radius: 12px;
}

/* Update message backgrounds */
.user-message {
  background: rgba(99, 102, 241, 0.1) !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

.assistant-message {
  background: rgba(10, 11, 30, 0.6) !important;
  border: 1px solid var(--ai-accent) !important;
}

/* Chat Window Styles */
.chat-window {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: calc(100vh - 120px);
  background: rgba(82, 82, 92, 0.7);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: 20px auto;
}

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.message-container {
  display: flex;
  margin-bottom: 20px;
  padding: 0 20px;
}

.message-container.user {
  justify-content: flex-end;
}

.message-container.ai {
  justify-content: flex-start;
}

.message-bubble {
  background: rgba(64, 65, 79, 0.9);
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 80%;
  position: relative;
}

.user .message-bubble {
  background: rgba(82, 82, 92, 0.9);
}

.ai-badge {
  position: absolute;
  left: 8px;
  top: -10px;
  background: linear-gradient(to right, #9333ea, #3b82f6);
  color: white;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
}

.message-bubble p {
  margin: 0;
  color: #fff;
  line-height: 1.5;
}

.input-area {
  padding: 20px;
  background: rgba(64, 65, 79, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-container input[type="file"] {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.input-container .btn-outline-primary {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.input-container .btn-outline-primary:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
}

.input-container input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 10px;
  font-size: 16px;
  outline: none;
}

.input-container input[type="text"]:focus {
  outline: none;
}

.input-container .send-button {
  padding: 8px 20px;
  border-radius: 6px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.input-container .send-button:hover {
  opacity: 0.9;
}

.input-container .send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: typing 1s infinite;
}

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

@keyframes typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.welcome-message {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 20px;
}

/* Logo Styles */
.text-gradient-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-secondary {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
}

.chat-bubble {
  position: relative;
  z-index: 1;
}

.glow-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0) 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
}

.logo-icon:hover .glow-effect {
  animation: pulse 1s infinite;
}

.btn-outline-glow {
  color: var(--neon-purple);
  border: 2px solid var(--neon-purple);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-outline-glow:hover {
  background: var(--neon-purple);
  color: var(--ai-dark);
  box-shadow: 0 0 15px var(--neon-purple);
}

.logo-svg {
  filter: drop-shadow(0 0 10px rgba(255, 77, 106, 0.2));
  transition: all 0.3s ease;
}

.logo-svg:hover {
  filter: drop-shadow(0 0 15px rgba(156, 63, 228, 0.4));
  transform: scale(1.05);
}

.logo-svg path {
  stroke-dasharray: 500;
  stroke-dashoffset: 0;
  animation: flow 4s ease-in-out infinite;
}

@keyframes flow {
  0% {
    stroke-dashoffset: 500;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -500;
  }
}

.logo-svg circle {
  animation: pulse 2s ease-in-out infinite;
}

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

.logo-icon {
  position: relative;
  display: inline-block;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, 
    rgba(156, 63, 228, 0.1) 0%, 
    rgba(55, 223, 217, 0.05) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
} 