/* ========================================================================== */
/* Theme — Apple Futuristic Chat                                               */
/* Zero glow, zero shadow, zero gradient. Pure Apple minimalism.               */
/* ========================================================================== */

.chat-app { background: transparent !important; }

/* ═══ HEADER — 44px iOS standard ═══ */
.header-bar {
  background: rgba(28,28,30,0.88) !important;
  backdrop-filter: saturate(200%) blur(40px) !important;
  -webkit-backdrop-filter: saturate(200%) blur(40px) !important;
  border-bottom: 0.5px solid rgba(255,255,255,0.08) !important;
  position: relative;
  padding: 0 16px !important;
  height: 44px !important;
}
.header-bar::after { display: none !important; }
.header-bar h1 {
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: unset !important;
  background: none !important;
  filter: none !important;
  font-size: 15px !important;
}
.header-bar > * { gap: 4px !important; }
.header-bar span { font-size: 13px !important; }

.app-body { background: transparent !important; }
.messages-area { background: transparent !important; animation: fadeIn 0.2s ease; }

/* Consistent 8px gap between messages */
.messages-area > div { margin-bottom: 8px !important; }
.messages-area > div:last-child { margin-bottom: 0 !important; }

/* ═══ AI MESSAGE ═══ */
.assistant-msg {
  color: var(--text-primary) !important;
  line-height: 1.65 !important;
  font-size: 15px !important;
  letter-spacing: -0.01em !important;
}

/* ═══ USER BUBBLE — Solid Apple blue, no shadow ═══ */
.user-msg {
  background: #007AFF !important;
  border: none !important;
  color: #ffffff !important;
  border-radius: 18px 18px 18px 4px !important;
  box-shadow: none !important;
  position: relative;
  padding: 8px 14px !important;
}
.user-msg::before, .user-msg::after { display: none !important; }
.user-msg .text-blue-200\/50 { color: rgba(255,255,255,0.7) !important; }

/* ═══ INPUT BAR ═══ */
.input-bar {
  background: rgba(28,28,30,0.88) !important;
  backdrop-filter: saturate(200%) blur(40px) !important;
  -webkit-backdrop-filter: saturate(200%) blur(40px) !important;
  border-top: 0.5px solid rgba(255,255,255,0.06) !important;
  position: relative;
  padding: 10px 20px 16px !important;
}
.input-bar::before { display: none !important; }
.input-bar textarea {
  background: rgba(0,0,0,0.25) !important;
  border: none !important;
  border-radius: 24px !important;
  color: var(--text-primary) !important;
  padding: 10px 48px 10px 16px !important;
  font-size: 15px !important;
  min-height: 38px !important;
  transition: background 0.15s !important;
  resize: none !important;
  box-shadow: none !important;
  line-height: 1.4 !important;
}
.input-bar textarea:focus {
  background: rgba(0,0,0,0.4) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(0,122,255,0.3) !important;
}
.input-bar textarea::placeholder { color: var(--text-tertiary) !important; }

/* ═══ SEND BUTTON — Apple blue circle with depth ═══ */
.input-bar button[type="submit"],
.input-bar .send-btn {
  background: linear-gradient(180deg, #339dff 0%, #0066d6 100%) !important;
  border: none !important;
  color: #fff !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 3px rgba(0,102,214,0.35) !important;
  transition: all 0.2s ease !important;
  animation: none !important;
}
.input-bar button[type="submit"]:hover,
.input-bar .send-btn:hover { 
  box-shadow: 0 2px 8px rgba(0,102,214,0.45) !important;
  transform: scale(1.05) !important;
  animation: none !important; 
}
.input-bar button[type="submit"]:active,
.input-bar .send-btn:active { opacity: 0.8 !important; transform: scale(0.95) !important; }
.input-bar button[type="submit"]:disabled,
.input-bar .send-btn:disabled { opacity: 0.3 !important; background: #6e6e73 !important; animation: none !important; }

/* ═══ LOGIN PAGE ═══ */
.login-container { background: #000 !important; }
.login-card {
  background: rgba(28,28,30,0.92) !important;
  border: 0.5px solid rgba(255,255,255,0.1) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.05),
    0 8px 32px rgba(0,0,0,0.3),
    0 32px 64px rgba(0,0,0,0.2) !important;
  backdrop-filter: blur(40px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
  position: relative; overflow: hidden;
}
.login-card::before { display: none !important; }
.login-card h1 { color: var(--text-primary) !important; -webkit-text-fill-color: unset !important; background: none !important; font-weight: 600 !important; letter-spacing: -0.02em !important; }
.login-card input {
  background: rgba(0,0,0,0.35) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: var(--text-primary) !important;
  border-radius: 12px !important;
  transition: border-color 0.25s ease, background 0.2s ease, box-shadow 0.25s ease !important;
}
.login-card input:focus {
  border-color: rgba(0,122,255,0.6) !important;
  box-shadow: 0 0 0 3.5px rgba(0,122,255,0.12) !important;
  outline: none !important;
}
.login-card button[type="submit"],
.login-card .login-btn {
  background: linear-gradient(180deg, #339dff 0%, #0066d6 100%) !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,102,214,0.3) !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  transition: all 0.2s ease !important;
}
.login-card button[type="submit"]:hover,
.login-card .login-btn:hover { 
  box-shadow: 0 2px 6px rgba(0,0,0,0.2), 0 8px 24px rgba(0,102,214,0.4) !important;
}
.login-card button[type="submit"]:active,
.login-card .login-btn:active { transform: scale(0.98) !important; }

/* ═══ STATUS BADGES ═══ */
.header-bar [class*="bg-green"] { background: rgba(48,209,88,0.15) !important; border: none !important; box-shadow: none !important; }
.header-bar [class*="bg-yellow"] { background: rgba(255,214,10,0.15) !important; border: none !important; box-shadow: none !important; }
.header-bar [class*="bg-red"] { background: rgba(255,69,58,0.15) !important; border: none !important; box-shadow: none !important; }

/* ═══ ONBOARDING ═══ */
/* Only style the card — overlay must keep position:fixed from onboarding.css */
.onboarding-card {
  background: rgba(28,28,30,0.95) !important;
  border: 0.5px solid rgba(255,255,255,0.1) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06),
    0 8px 32px rgba(0,0,0,0.4),
    0 32px 64px rgba(0,0,0,0.3) !important;
  backdrop-filter: blur(40px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
  overflow: hidden;
}
.onboarding-card::before { display: none !important; }

/* ═══ DRAG OVERLAY ═══ */
.drag-overlay {
  background: rgba(10,132,255,0.04) !important;
  border: 2px dashed rgba(255,255,255,0.15) !important;
}

/* ═══ TEXT COLORS ═══ */
.text-slate-400 { color: var(--text-secondary) !important; }
.text-slate-500 { color: var(--text-tertiary) !important; }
.text-slate-600 { color: var(--text-placeholder) !important; }

/* ═══ HEADER BUTTONS ═══ */
.header-bar [class*="bg-slate-700"] {
  background: rgba(255,255,255,0.06) !important;
  border: none !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-sm) !important;
}
.header-bar [class*="bg-slate-700"]:hover {
  background: rgba(255,255,255,0.1) !important;
  color: var(--text-primary) !important;
}
.header-bar [class*="text-blue-4"] { color: #007AFF !important; text-shadow: none !important; }
.header-bar [class*="bg-blue-5"] { background: rgba(10,132,255,0.1) !important; }
.header-bar [class*="text-slate-4"]:not([class*="bg-slate"]) {
  color: var(--text-tertiary) !important;
}
.header-bar [class*="text-slate-4"]:hover { color: var(--text-secondary) !important; text-shadow: none !important; }

/* ═══ UTILITY ═══ */
.glow-text { color: #007AFF !important; -webkit-text-fill-color: unset !important; background: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* LIGHT MODE OVERRIDES — Apple light palette                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */

[data-theme="light"] .header-bar {
  background: rgba(255,255,255,0.88) !important;
  border-bottom-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .input-bar {
  background: rgba(255,255,255,0.88) !important;
  border-top-color: rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .input-bar textarea {
  background: rgba(0,0,0,0.04) !important;
}
[data-theme="light"] .input-bar textarea:focus {
  background: rgba(0,0,0,0.06) !important;
  box-shadow: 0 0 0 2px rgba(0,122,255,0.2) !important;
}
[data-theme="light"] .user-msg {
  background: #007AFF !important;
  color: #ffffff !important;
}
[data-theme="light"] .assistant-msg {
  color: var(--text-primary) !important;
}
/* AI response card */
[data-theme="light"] .assistant-card,
[data-theme="light"] .assistant-turn-card,
[data-theme="light"] [class*="bg-slate-800"] {
  background: #f2f2f7 !important;
  border-color: rgba(0,0,0,0.06) !important;
}
/* Login */
[data-theme="light"] .login-container { background: linear-gradient(135deg, #dfe6f0 0%, #f2f2f7 50%, #e8e8f0 100%) !important; }
[data-theme="light"] .login-card {
  background: rgba(255,255,255,0.82) !important;
  border: 0.5px solid rgba(0,0,0,0.06) !important;
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.03),
    0 8px 32px rgba(0,0,0,0.06),
    0 32px 64px rgba(0,0,0,0.04) !important;
  backdrop-filter: blur(40px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
}
[data-theme="light"] .login-card input {
  background: rgba(0,0,0,0.03) !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .login-card button[type="submit"] {
  background: linear-gradient(180deg, #339dff 0%, #0066d6 100%) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 4px 16px rgba(0,102,214,0.25) !important;
}
/* Status badges */
[data-theme="light"] .header-bar [class*="bg-green"] { background: rgba(48,209,88,0.12) !important; }
[data-theme="light"] .header-bar [class*="bg-yellow"] { background: rgba(255,214,10,0.12) !important; }
[data-theme="light"] .header-bar [class*="bg-red"] { background: rgba(255,69,58,0.12) !important; }
/* Header buttons */
[data-theme="light"] .header-bar [class*="bg-slate-700"] {
  background: rgba(0,0,0,0.04) !important;
  color: var(--text-secondary) !important;
}
[data-theme="light"] .header-bar [class*="bg-slate-700"]:hover {
  background: rgba(0,0,0,0.08) !important;
}
/* Drag overlay */
[data-theme="light"] .drag-overlay {
  background: rgba(10,132,255,0.04) !important;
  border-color: rgba(0,0,0,0.15) !important;
}
/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12) !important; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2) !important; }
/* Onboarding — only style the card, keep overlay fixed */
[data-theme="light"] .onboarding-card {
  background: rgba(255,255,255,0.85) !important;
  border: 0.5px solid rgba(0,0,0,0.08) !important;
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.03),
    0 8px 32px rgba(0,0,0,0.06),
    0 32px 64px rgba(0,0,0,0.04) !important;
  backdrop-filter: blur(40px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
}
[data-theme="light"] .onboarding-step-title { color: #1d1d1f !important; }
[data-theme="light"] .onboarding-step-desc { color: #86868b !important; }

/* ═══ EMPTY STATE — Premium 10/10 ═══ */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10vh;
}
.empty-state-icon-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state-icon-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(0,122,255,0.12) 0%, rgba(0,122,255,0.04) 50%, transparent 70%);
  animation: empty-icon-breathe 4s ease-in-out infinite;
}
.empty-state-icon {
  position: relative;
  font-size: 56px;
  line-height: 1;
  opacity: 0.7;
  z-index: 1;
  filter: drop-shadow(0 0 12px rgba(0,122,255,0.3));
}
.empty-state-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 0.5px solid var(--border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.empty-state-action-btn:hover {
  background: var(--bg-tertiary, var(--bg-secondary));
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,122,255,0.12);
  color: var(--text-primary);
}

@keyframes empty-icon-breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.8; }
}

[data-theme="light"] .empty-state-icon-bg {
  background: radial-gradient(circle at 40% 40%, rgba(0,122,255,0.08) 0%, rgba(0,122,255,0.02) 50%, transparent 70%);
}
[data-theme="light"] .empty-state-icon {
  opacity: 0.45;
}
[data-theme="light"] .empty-state-action-btn:hover {
  box-shadow: 0 2px 12px rgba(0,122,255,0.08);
}
