/* ============================================
   WEBCHAT TEST PAGE — STYLES
   ============================================ */

:root {
  --bg-dark: #0a0a0f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --danger: #ef4444;
  --danger-hover: #f87171;
  --success: #10b981;
  --radius: 14px;
  --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ---- Animated background blobs ---- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  animation: float 18s ease-in-out infinite alternate;
}

.blob-1 {
  width: 420px;
  height: 420px;
  background: #6366f1;
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: #a855f7;
  bottom: -8%;
  right: -5%;
  animation-delay: -6s;
}

.blob-3 {
  width: 280px;
  height: 280px;
  background: #3b82f6;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -12s;
}

@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.05); }
  66%  { transform: translate(-20px, 15px) scale(0.95); }
  100% { transform: translate(10px, -10px) scale(1.02); }
}

/* ---- Layout ---- */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  padding: 24px;
}

/* ---- Card ---- */
.card {
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px 32px;
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.06);
  animation: fadeUp 0.6s ease-out both;
}

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

/* ---- Badge ---- */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 18px;
}

h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #e4e4e7, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ---- Input group ---- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: 'Inter', monospace;
  font-size: 13px;
  color: var(--text-primary);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

textarea::placeholder {
  color: var(--text-muted);
}

textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ---- Buttons ---- */
.button-row {
  display: flex;
  gap: 10px;
}

button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

#loadBtn {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

#loadBtn:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

#loadBtn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ---- Status ---- */
.status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  animation: fadeUp 0.35s ease-out both;
}

.status.hidden {
  display: none;
}

.status.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--success);
}

.status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--danger);
}

/* ---- Footer ---- */
.footer-text {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 0;
}

/* ---- Responsive ---- */
@media (max-width: 580px) {
  .card {
    padding: 28px 20px 24px;
  }

  h1 {
    font-size: 22px;
  }

  .button-row {
    flex-direction: column;
  }
}
