/* Mozhi AI custom styles layered on Tailwind */

/* Smooth scroll and selection */
html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: #03131F; }

/* Premium subtle shadow and card surface */
.shadow-elevated { box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.surface { background: var(--bubble); border: 1px solid var(--border); }

/* Animated gradient badge with new colors */
.badge-gradient {
  background: var(--gradient-button);
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(10deg); }
}

/* Thin scrollbar */
.thin-scrollbar { scrollbar-width: thin; }
.thin-scrollbar::-webkit-scrollbar { width: 8px; height: 8px; }
.thin-scrollbar::-webkit-scrollbar-thumb { background: #17324f; border-radius: 8px; }
.thin-scrollbar::-webkit-scrollbar-track { background: transparent; }

/* Glass effect cards */
.glass-card {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-input {
  background: rgba(15, 33, 57, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: all 0.3s ease;
}

.glass-input:focus {
  background: rgba(15, 33, 57, 0.8);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15), 0 4px 12px rgba(0, 229, 255, 0.2);
  outline: none;
}

/* Animated gradient background with new theme */
.auth-bg {
  background: var(--gradient-bg);
  position: relative;
  overflow: hidden;
}

.auth-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, rgba(124, 58, 237, 0.05) 50%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10%, 10%) scale(1.1); }
}

/* Premium button with new gradient */
.btn-premium {
  background: var(--gradient-button);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5), 0 0 30px rgba(124, 58, 237, 0.3);
}

/* Chat Message Bubbles - Updated with new colors */
.message-bubble {
  max-width: 75%;
  word-wrap: break-word;
  animation: slideIn 0.3s ease-out;
}

.message-bubble-ai {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.1);
}

.message-bubble-user {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(0, 229, 255, 0.15) 100%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile App Container */
.chat-container {
  background: linear-gradient(180deg, rgba(10, 25, 47, 0.95) 0%, rgba(15, 33, 57, 0.98) 100%);
  border-radius: 16px;
  overflow: hidden;
}

/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 12px 16px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.2); }
}

/* Chat Form Container - Flex layout */
.chat-form-container {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 640px) {
  .chat-form-container {
    gap: 0.75rem;
  }
}

/* Chat Message Input */
.chat-message-input {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  line-height: 1.5;
  max-height: 150px;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .chat-message-input {
    padding: 0.75rem 1rem;
    border-radius: 0.875rem;
  }
}

/* Auto-resize textarea based on content */
.chat-message-input:focus {
  outline: none;
}

/* Chat Send Button */
.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .chat-send-btn {
    width: 48px;
    height: 48px;
  }
}

/* Mobile bottom margin for chat input */
@media (max-width: 640px) {
  .chat-input-area {
    margin-bottom: 5rem !important;
    padding-bottom: 1rem !important;
  }
}
