/* =====================================================
   IOSPEED CYBER ANALYST STYLESHEET
   Modern, professional theme for Gemini-powered bots
   ===================================================== */

/* ---------- ROOT VARIABLES ---------- */
:root {
  --primary: #00bcd4;
  --primary-dark: #0099cc;
  --secondary: #21c6e7;
  --text-main: #eaf2ff;
  --text-muted: #9fb0c2;
  --surface: #111821;
  --surface-light: #1a2532;
  --border: #243345;
  --radius: 16px;
  --font-main: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ---------- GLOBAL ---------- */
body {
  margin: 0;
  background: #f6f8fa;
  color: var(--text-main);
  font-family: var(--font-main);
}

.hidden {
  display: none !important;
}

a {
  text-decoration: none;
  color: var(--primary);
}
a:hover {
  color: var(--secondary);
}

/* ---------- HEADER ---------- */
header {
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid #ddd;
}
.header-info h1 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 700;
  color: #111;
}
#user-email {
  font-size: 0.85em;
  color: #666;
}

/* ---------- MAIN CHAT CONTAINER ---------- */
#chat-container {
  width: 100%;
  max-width: 880px;
  height: 88vh;
  margin: 24px auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- CHAT WINDOW ---------- */
#chat-window {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: linear-gradient(180deg, #0d1117 0%, #111821 100%);
  color: var(--text-main);
}

/* ---------- CHAT BUBBLES ---------- */
.chat-message {
  max-width: 80%;
  line-height: 1.55;
  word-wrap: break-word;
  padding: 14px 18px;
  margin-bottom: 10px;
  animation: fadeInUp 0.25s ease both;
  font-size: 0.97rem;
}

.chat-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 188, 212, 0.25);
}

.chat-message.bot {
  align-self: flex-start;
  background: var(--surface-light);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Markdown emphasis */
.chat-message strong {
  color: #fff;
  font-weight: 700;
}
.chat-message code {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  color: #80e0ff;
}

/* ---------- LOADING INDICATOR ---------- */
#loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px solid #1c2835;
}
.spinner {
  border: 3px solid rgba(33, 198, 231, 0.15);
  border-left-color: var(--secondary);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ---------- INPUT AREA ---------- */
.input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid #1f2c3a;
  background: #0f1620;
}
#prompt-input {
  flex: 1;
  border: 1px solid #263143;
  background: #0f1620;
  color: var(--text-main);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}
#prompt-input:focus {
  border-color: var(--primary);
}
#send-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: #001018;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 188, 212, 0.3);
  transition: all 0.2s ease;
}
#send-button:hover {
  transform: scale(1.1);
}

/* ---------- PENDING APPROVAL MESSAGE ---------- */
#pending-approval {
  padding: 40px;
  text-align: center;
  background: #fff3cd;
  color: #856404;
  margin: 20px;
  border-radius: 10px;
}

/* ---------- AUTH SCREENS ---------- */
.auth-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #0e1116;
  color: var(--text-main);
}
.auth-container {
  background: var(--surface);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.auth-container input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #263143;
  border-radius: 8px;
  background: #0f141d;
  color: var(--text-main);
}
.auth-container .button {
  width: 100%;
  background: var(--primary);
  border: none;
  border-radius: 25px;
  color: #fff;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}
.auth-container .button:hover {
  background: var(--primary-dark);
}

/* ---------- BUTTON STYLES ---------- */
.button {
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-weight: 500;
  display: inline-block;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}
.button.primary {
  background-color: var(--primary);
  color: #fff;
}
.button.secondary {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  #chat-container {
    height: 80vh;
    border-radius: 0;
    margin: 0;
  }
  .chat-message {
    max-width: 90%;
    font-size: 0.95rem;
  }
}
