/* ================================================================
   BalloonAI Chatbot – Stylesheet
   نسخة محسّنة بالكامل – متوافقة مع chatbot.html الجديد
================================================================ */

:root {
  --bg-dark: #0a0118;
  --bg-darker: #050008;
  --bg-card: #1a0f2e;
  --bg-card-hover: #251540;
  --accent-primary: #ff4b8b;
  --accent-secondary: #a855f7;
  --accent-tertiary: #3b82f6;
  --text-primary: #ffffff;
  --text-secondary: #c4b5fd;
  --text-muted: #94a3b8;
  --border-subtle: rgba(168, 85, 247, 0.18);
  --gradient-primary: linear-gradient(135deg, #ff4b8b 0%, #a855f7 50%, #3b82f6 100%);
  --radius-md: 20px;
  --radius-lg: 28px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Almarai', sans-serif;
  background: var(--bg-darker);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Background Animations */
.bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.18), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(255, 75, 139, 0.18), transparent 60%);
  animation: pulse 14s ease-in-out infinite;
  z-index: 0;
}
@keyframes pulse {
  0%,100% { opacity:1 }
  50% { opacity:.6 }
}

/* Header */
.header {
  background: rgba(10,1,24,0.7);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-content {
  max-width: 1200px;
  margin: auto;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-icon {
  width: 48px;
}
.logo-name {
  font-size: 24px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.header-nav {
  display: flex;
  gap: 22px;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
}
.nav-link:hover {
  background: var(--bg-card);
  color: white;
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

}
.btn-lang {
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 10px;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

/* Chat Page */
.chat-main {
  padding: 40px 20px;
  position: relative;
  z-index: 2;
}
.welcome-banner {
  text-align: center;
  padding-bottom: 20px;
}
.bot-avatar-large {
  width: 120px;
  animation: float 3s infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0) }
  50% { transform: translateY(-10px) }
}
.welcome-title {
  font-size: 32px;
  margin-top: 10px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 18px;
}

/* Chat Box */
.chat-container {
  max-width: 900px;
  margin: auto;
}
.messages-area {
  max-height: 420px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.messages-area::-webkit-scrollbar {
  width: 6px;
}
.messages-area::-webkit-scrollbar-thumb {
  background: var(--accent-secondary);
  border-radius: 10px;
}

/* Messages */
.message {
  display: flex;
  gap: 12px;
}
.message.user {
  flex-direction: row-reverse;
}
.message-content {
  padding: 14px 18px;
  max-width: 70%;
  border-radius: 16px;
  word-break: break-word;
}
.message.user .message-content {
  background: var(--gradient-primary);
  color: white;
}
.message.bot .message-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

/* Input Area */
.input-area {
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-top: 12px;
}
.input-container {
  display: flex;
  gap: 12px;
}
.message-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  resize: none;
}
.btn-send {
  background: var(--gradient-primary);
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
}

/* Quick buttons */
.quick-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}
.quick-action-btn {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset:0;
  background: rgba(5,0,12,0.8);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
}
.loading-overlay.active {
  display: flex;
}
.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}
@keyframes spin {
  to { transform: rotate(360deg) }
}

/* Modal */
.modal {
  position: fixed;
  inset:0;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal.active {
  display: flex;
}
.modal-content {
  max-width: 90%;
  max-height: 90%;
}
