/* ============================================
   My AI | Astra — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Light Mode (default) */
  --bg-primary: #FFF8F0;
  --bg-secondary: #f5e6d3;
  --bg-sidebar: #f5e6d3;
  --bg-card: #ffffff;
  --bg-user-msg: #d4a574;
  --bg-ai-msg: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: rgba(196, 151, 58, 0.08);

  --text-primary: #3d2b1f;
  --text-secondary: #6b5344;
  --text-muted: #9c8577;
  --text-on-accent: #ffffff;
  --text-user-msg: #3d2b1f;

  --accent: #c4973a;
  --accent-hover: #a87e30;
  --accent-soft: rgba(196, 151, 58, 0.15);
  --accent-gradient: linear-gradient(135deg, #c4973a, #d4a574);

  --border: rgba(61, 43, 31, 0.1);
  --border-strong: rgba(61, 43, 31, 0.2);

  --shadow-sm: 0 1px 3px rgba(61, 43, 31, 0.08);
  --shadow-md: 0 4px 12px rgba(61, 43, 31, 0.1);
  --shadow-lg: 0 8px 30px rgba(61, 43, 31, 0.12);
  --shadow-glow: 0 0 20px rgba(196, 151, 58, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --sidebar-width: 260px;
  --input-height: 56px;

  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f1729;
  --bg-secondary: #1a2332;
  --bg-sidebar: #141c2b;
  --bg-card: #1e293b;
  --bg-user-msg: #8b7355;
  --bg-ai-msg: #1e293b;
  --bg-input: #1a2332;
  --bg-hover: rgba(212, 165, 116, 0.08);

  --text-primary: #e8dcc8;
  --text-secondary: #b8a99a;
  --text-muted: #7a6e63;
  --text-on-accent: #1a1a1a;
  --text-user-msg: #f0e6d8;

  --accent: #d4a574;
  --accent-hover: #e0b88a;
  --accent-soft: rgba(212, 165, 116, 0.12);
  --accent-gradient: linear-gradient(135deg, #d4a574, #c4973a);

  --border: rgba(232, 220, 200, 0.08);
  --border-strong: rgba(232, 220, 200, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(212, 165, 116, 0.15);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-base), color var(--transition-base);
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---------- Star Canvas Background ---------- */
#star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

[data-theme="dark"] #star-canvas {
  opacity: 1;
}

/* ---------- Layout — Chat Page ---------- */
.app-container {
  display: flex;
  height: 100vh;
  position: relative;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: background var(--transition-base), border-color var(--transition-base);
  flex-shrink: 0;
}

.sidebar-header {
  padding: 24px 20px 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 30%,
      rgba(255, 255, 255, 0.15) 50%,
      transparent 70%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--text-muted);
  font-weight: 400;
}

.new-chat-btn {
  width: 100%;
  padding: 12px 16px;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.new-chat-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.new-chat-btn:active {
  transform: translateY(0);
}

/* Chat History */
.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.chat-history-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.chat-history-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 0 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  font-weight: 600;
}

.sidebar-footer-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-footer-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.theme-toggle {
  margin-left: auto;
  font-size: 22px;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.theme-toggle:hover {
  transform: scale(1.15) rotate(15deg);
}

/* ---------- Main Chat Area ---------- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Welcome Screen */
.welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 20px 24px;
  text-align: center;
  overflow-y: auto;
  animation: fadeInUp 0.8s ease;
}

.welcome-screen.hidden {
  display: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-greeting {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.welcome-subtext {
  font-size: 24px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-family: 'Outfit', sans-serif;
}

.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.quick-action-btn {
  padding: 10px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  background: var(--bg-card);
}

.quick-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-messages.hidden {
  display: none;
}

.message {
  display: flex;
  gap: 12px;
  animation: msgFadeIn 0.4s ease;
}

@keyframes msgFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  max-width: 75%;
}

.message.ai {
  align-self: flex-start;
  max-width: 100%;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.message.ai .message-avatar {
  background: var(--accent-gradient);
  color: white;
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(196, 151, 58, 0.2);
  }

  50% {
    box-shadow: 0 0 12px 4px rgba(196, 151, 58, 0.15);
  }
}

.message.user .message-avatar {
  background: var(--bg-user-msg);
  color: var(--text-on-accent);
}

/* User message: keep bubble style */
.message.user .message-content {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg-user-msg);
  color: var(--text-user-msg);
  border-bottom-right-radius: var(--radius-sm);
}

/* AI message: container-free, no bubble (ChatGPT style) */
.message.ai .message-content {
  padding: 4px 16px;
  border-radius: 0;
  font-size: 14px;
  line-height: 1.7;
  background: transparent;
  border: none;
  box-shadow: none;
  border-left: 2px solid var(--accent);
}

/* List styles moved below hr for proper specificity */

.message-content strong {
  color: var(--accent);
}

.message-content p {
  margin-bottom: 8px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

/* Rich AI response formatting */
.message.ai .message-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 8px;
  font-family: 'Outfit', sans-serif;
}

.message.ai .message-content h3:first-child {
  margin-top: 4px;
}

.message.ai .message-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin: 12px 0 6px;
}

.message.ai .message-content hr,
.message.ai .message-content hr.cosmic-divider {
  border: none;
  height: 2px;
  margin: 20px 0;
  opacity: 1;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 15%,
    rgba(196, 151, 58, 0.6) 50%,
    var(--accent) 85%,
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(196, 151, 58, 0.3), 0 0 2px rgba(196, 151, 58, 0.2);
  border-radius: 2px;
}

/* Typewriter blinking cursor */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Chunk reveal animation for typewriter */
.chunk-reveal {
  animation: chunkFadeIn 0.35s ease-out;
}

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

/* ── Smart Typing Indicator ── */
.smart-typing-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  background: var(--bg-ai-msg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-sm);
}

.smart-typing-phrase {
  font-size: 13px;
  color: var(--accent);
  font-style: italic;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.3px;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  animation: phraseShimmer 2s ease-in-out infinite;
}

@keyframes phraseShimmer {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Better list styling in messages */
.message-content ol {
  list-style-type: decimal;
  padding-left: 24px;
  margin: 8px 0;
}

.message-content ul {
  list-style-type: disc;
  padding-left: 24px;
  margin: 8px 0;
}

.message-content li {
  margin-bottom: 4px;
  line-height: 1.6;
}

/* Word fade-in during typewriter */
.word-fade {
  animation: wordAppear 0.15s ease-out;
}

@keyframes wordAppear {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Suggested Follow-up Pills ── */
.suggestion-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.suggestion-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  max-width: 280px;
  text-align: left;
  opacity: 0;
  animation: pillFadeIn 0.3s ease forwards;
}

.suggestion-pill:nth-child(1) { animation-delay: 0.1s; }
.suggestion-pill:nth-child(2) { animation-delay: 0.2s; }
.suggestion-pill:nth-child(3) { animation-delay: 0.3s; }

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

.suggestion-pill:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: msgFadeIn 0.4s ease;
}

.typing-indicator .message-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.typing-dots {
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  background: var(--bg-ai-msg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-sm);
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* ---------- Input Area ---------- */
.input-area {
  padding: 12px 20px 20px;
  position: relative;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 6px 6px 6px 8px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-soft);
}

/* ── + Attach Button ── */
.attach-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 22px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.attach-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: rotate(45deg);
}

.attach-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(45deg);
}

.attach-btn-icon {
  line-height: 1;
}

/* ── Attachment Menu ── */
.attach-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 20px;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 6px;
  z-index: 200;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: attachMenuIn 0.2s cubic-bezier(0.22, 0.72, 0, 1);
}

.attach-menu.open {
  display: flex;
}

@keyframes attachMenuIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.attach-menu-arrow {
  display: none;
  /* decorative, handled by positioning */
}

.attach-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  width: 100%;
}

.attach-item:hover {
  background: var(--bg-hover);
}

.attach-item-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 8px;
  flex-shrink: 0;
}

.attach-item-body {
  display: flex;
  flex-direction: column;
}

.attach-item-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.attach-item-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Chat Input ── */
.chat-input {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
  resize: none;
  max-height: 120px;
  line-height: 1.5;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-input:disabled {
  opacity: 1;
  cursor: default;
}

/* Wrapper dims slightly when no AI selected */
.input-wrapper:has(.chat-input:disabled) {
  opacity: 0.72;
}


/* ── Right group: mic + avatar + send ── */
.input-right-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Mic Button ── */
.mic-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mic-btn svg {
  width: 15px;
  height: 15px;
}

.mic-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.mic-btn.active {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  animation: micPulse 1.2s ease-in-out infinite;
}

@keyframes micPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

/* ── AI Avatar in chat bar ── */
.ai-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.ai-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.ai-avatar-circle.no-ai {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text-muted);
}

.ai-avatar-circle.no-ai:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: scale(1.08);
}

.ai-avatar-circle.has-ai {
  border-color: rgba(212, 165, 116, 0.4);
  box-shadow: 0 0 10px rgba(212, 165, 116, 0.2);
}

.ai-avatar-circle.has-ai:hover {
  border-color: rgba(212, 165, 116, 0.8);
  box-shadow: 0 0 18px rgba(212, 165, 116, 0.35);
  transform: scale(1.08);
}

/* Pulse ring on AI avatar when selected */
.ai-avatar-circle.has-ai::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 165, 116, 0.25);
  animation: avatarRing 2.5s ease-in-out infinite;
}

@keyframes avatarRing {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.12);
  }
}

.ai-avatar-icon {
  line-height: 1;
  font-size: 15px;
}

/* Tooltip on avatar hover */
.ai-avatar-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 5px 10px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.ai-avatar-wrap:hover .ai-avatar-tooltip {
  opacity: 1;
}

.tooltip-arrow {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 9px;
  margin-top: 2px;
  line-height: 1;
}

/* ── Send Button ── */
.send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Astrologer Selection Toast ---------- */
.astrologer-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 10px 18px 10px 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 165, 116, 0.15);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.astrologer-toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

/* ── Astrologer photo portrait (chat app) ── */
.astro-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.toast-name {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.toast-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ---------- Decorative Star (bottom right) ---------- */
.floating-star {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  color: var(--accent);
  font-size: 40px;
  z-index: 5;
  animation: floatStar 6s ease-in-out infinite;
  opacity: 0.3;
  pointer-events: none;
}

@keyframes floatStar {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-12px) rotate(15deg);
  }
}

/* ---------- Settings Panel (ChatGPT Style) ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.settings-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 750px;
  height: 80vh;
  max-height: 600px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--transition-base);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.modal-overlay.active .settings-panel {
  transform: scale(1) translateY(0);
}

.settings-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  z-index: 2;
  transition: all var(--transition-fast);
}

.settings-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.settings-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.settings-nav {
  width: 210px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 12px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  overflow-y: auto;
}

.settings-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 8px;
  margin-bottom: 16px;
  font-family: 'Outfit', sans-serif;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
  margin-bottom: 2px;
}

.settings-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.settings-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.nav-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.settings-nav-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.settings-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
}

.settings-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.settings-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.settings-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-user-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #ef4444;
  transition: all var(--transition-fast);
  text-align: left;
  margin-top: 6px;
}

.settings-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  min-width: 0;
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
  animation: fadeInUp 0.25s ease;
}

.settings-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  font-family: 'Outfit', sans-serif;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  gap: 20px;
}

.setting-row.column {
  flex-direction: column;
  align-items: stretch;
}

.setting-info {
  flex: 1;
  min-width: 0;
}

.setting-info label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.setting-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.setting-control {
  flex-shrink: 0;
}

.setting-control.full-width {
  width: 100%;
  flex: 1;
}

.setting-control select,
.setting-input {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
  min-width: 160px;
}

.setting-control select:focus,
.setting-input:focus {
  border-color: var(--accent);
  outline: none;
}

.setting-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  resize: vertical;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
  margin-top: 10px;
  transition: border-color var(--transition-fast);
}

.setting-textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.api-key-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.api-key-wrapper .setting-input {
  width: 100%;
  padding-right: 40px;
}

.api-key-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  opacity: 0.4;
  transition: opacity 0.2s;
  padding: 4px;
}

.api-key-toggle:hover {
  opacity: 0.8;
}

.setting-action-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  background: transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.setting-action-btn:hover {
  background: var(--accent-soft);
}

.setting-danger-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.setting-danger-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5);
}

@media (max-width: 600px) {
  .settings-panel {
    width: 95%;
    height: 90vh;
    max-height: none;
  }

  .settings-layout {
    flex-direction: column;
  }

  .settings-nav {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .settings-title {
    width: 100%;
    margin-bottom: 8px;
  }

  .settings-nav-item {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 13px;
  }

  .settings-nav-footer {
    width: 100%;
    border-top: none;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .settings-content {
    padding: 20px 16px;
  }

  .setting-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .setting-control select,
  .setting-input {
    width: 100%;
    min-width: unset;
  }
}

/* ---------- Birth Info Form (inline) ---------- */
.birth-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  max-width: 480px;
  width: 100%;
  margin: 12px auto;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.6s ease;
}

.birth-info-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.birth-info-card .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.birth-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.birth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.birth-field.full-width {
  grid-column: 1 / -1;
}

.birth-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.birth-field input {
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.birth-field input:focus {
  border-color: var(--accent);
}

.birth-submit-btn {
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.birth-submit-btn:hover {
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-1px);
}

/* ============================================
   Signup Page
   ============================================ */
.signup-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 20px;
  background: var(--bg-primary);
}

.signup-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.7s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .signup-card {
  background: rgba(30, 41, 59, 0.85);
}

.signup-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--accent-gradient);
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
  opacity: 0.15;
}

.signup-logo {
  text-align: center;
  margin-bottom: 28px;
}

.signup-logo .logo-icon {
  margin: 0 auto 12px;
  width: 56px;
  height: 56px;
  font-size: 28px;
}

.signup-logo h1 {
  font-size: 24px;
  font-weight: 600;
}

.signup-logo h1 span {
  color: var(--text-muted);
  font-weight: 400;
}

.signup-logo .tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tabs */
.auth-tabs {
  display: flex;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.auth-tab.active {
  color: var(--accent);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form.hidden {
  display: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.3px;
}

.auth-submit-btn:hover {
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-2px);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-divider {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: var(--border);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.signup-theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  transition: transform var(--transition-base);
  color: var(--text-muted);
}

.signup-theme-toggle:hover {
  transform: scale(1.2) rotate(15deg);
  color: var(--accent);
}

/* Zodiac decorations on signup */
.zodiac-decoration {
  position: absolute;
  font-size: 60px;
  opacity: 0.04;
  pointer-events: none;
  color: var(--accent);
}

.zodiac-decoration.top-right {
  top: -10px;
  right: -10px;
  transform: rotate(15deg);
}

.zodiac-decoration.bottom-left {
  bottom: -10px;
  left: -10px;
  transform: rotate(-15deg);
}

/* Error message */
.form-error {
  color: #e74c3c;
  font-size: 12px;
  min-height: 16px;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100%;
    z-index: 200;
    transition: left var(--transition-base);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: flex;
    font-size: 22px;
    color: var(--text-primary);
  }

  .welcome-greeting {
    font-size: 22px;
  }

  .welcome-subtext {
    font-size: 18px;
  }

  .message {
    max-width: 90%;
  }

  .quick-actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (min-width: 769px) {
  .mobile-header {
    display: none;
  }

  .menu-toggle {
    display: none;
  }

  .sidebar-overlay {
    display: none;
  }
}

/* overlay for mobile sidebar */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}

/* Constellation lines for dark mode decoration */
.constellation-line {
  position: fixed;
  background: var(--accent);
  opacity: 0;
  height: 1px;
  transform-origin: left center;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

[data-theme="dark"] .constellation-line {
  opacity: 0.06;
}

/* ═══════════════════════════════════════════
   Backend Wake-Up Loading Overlay (Render)
   ═══════════════════════════════════════════ */
.backend-wakeup-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  opacity: 0;
  animation: wakeupFadeIn 0.6s ease forwards;
  overflow: hidden;
}

.backend-wakeup-overlay.wakeup-fade-out {
  animation: wakeupFadeOut 0.8s ease forwards;
  pointer-events: none;
}

@keyframes wakeupFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes wakeupFadeOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.05); }
}

/* ── Ambient background particles ── */
.wakeup-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.wakeup-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: particleDrift 6s ease-in-out infinite;
}

.wakeup-particle:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; animation-duration: 5s; }
.wakeup-particle:nth-child(2) { left: 75%; top: 30%; animation-delay: 1s; animation-duration: 7s; }
.wakeup-particle:nth-child(3) { left: 40%; top: 70%; animation-delay: 0.5s; animation-duration: 6s; }
.wakeup-particle:nth-child(4) { left: 85%; top: 60%; animation-delay: 2s; animation-duration: 5.5s; }
.wakeup-particle:nth-child(5) { left: 25%; top: 85%; animation-delay: 1.5s; animation-duration: 6.5s; }
.wakeup-particle:nth-child(6) { left: 60%; top: 15%; animation-delay: 0.8s; animation-duration: 7.5s; }
.wakeup-particle:nth-child(7) { left: 50%; top: 50%; animation-delay: 2.5s; animation-duration: 5s; }
.wakeup-particle:nth-child(8) { left: 10%; top: 45%; animation-delay: 3s; animation-duration: 8s; }

@keyframes particleDrift {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.6; }
  50%  { opacity: 0.3; transform: translateY(-30px) scale(1); }
  80%  { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-60px) scale(0.3); }
}

/* ── Astrological Chakra Container ── */
.wakeup-chakra-container {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

/* ── Glow pulse behind the chakra ── */
.wakeup-chakra-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,165,116,0.25) 0%, rgba(196,151,58,0.08) 50%, transparent 70%);
  animation: chakraGlow 3s ease-in-out infinite;
}

@keyframes chakraGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.2); opacity: 1; }
}

/* ── Outer Ring — Zodiac Symbols ── */
.wakeup-ring-outer {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1.5px solid rgba(212,165,116,0.2);
  animation: ringSpinSlow 30s linear infinite;
}

.wakeup-ring-outer .zodiac-symbol {
  position: absolute;
  font-size: 14px;
  color: var(--accent);
  opacity: 0.7;
  filter: drop-shadow(0 0 4px rgba(212,165,116,0.4));
}

/* Position 12 zodiac symbols around the ring */
.wakeup-ring-outer .zodiac-symbol:nth-child(1)  { top: -8px;  left: 50%; transform: translateX(-50%); }
.wakeup-ring-outer .zodiac-symbol:nth-child(2)  { top: 8px;   right: 12px; }
.wakeup-ring-outer .zodiac-symbol:nth-child(3)  { top: 50%;   right: -10px; transform: translateY(-50%); }
.wakeup-ring-outer .zodiac-symbol:nth-child(4)  { bottom: 8px;right: 12px; }
.wakeup-ring-outer .zodiac-symbol:nth-child(5)  { bottom: -8px;left: 50%; transform: translateX(-50%); }
.wakeup-ring-outer .zodiac-symbol:nth-child(6)  { bottom: 8px;left: 12px; }
.wakeup-ring-outer .zodiac-symbol:nth-child(7)  { top: 50%;   left: -10px; transform: translateY(-50%); }
.wakeup-ring-outer .zodiac-symbol:nth-child(8)  { top: 8px;   left: 12px; }
.wakeup-ring-outer .zodiac-symbol:nth-child(9)  { top: 25%;   right: 2px; }
.wakeup-ring-outer .zodiac-symbol:nth-child(10) { bottom: 25%; right: 2px; }
.wakeup-ring-outer .zodiac-symbol:nth-child(11) { bottom: 25%; left: 2px; }
.wakeup-ring-outer .zodiac-symbol:nth-child(12) { top: 25%;   left: 2px; }

@keyframes ringSpinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Middle Ring — dashed, counter-rotate ── */
.wakeup-ring-middle {
  position: absolute;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  border: 1.5px dashed rgba(212,165,116,0.25);
  animation: ringSpinReverse 20s linear infinite;
}

@keyframes ringSpinReverse {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ── Inner Ring — solid, faster ── */
.wakeup-ring-inner {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid rgba(212,165,116,0.15);
  animation: ringSpinFast 12s linear infinite;
  box-shadow: 0 0 20px rgba(212,165,116,0.08) inset;
}

/* Ring dots (compass points) */
.wakeup-ring-inner::before,
.wakeup-ring-inner::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(212,165,116,0.6);
}

.wakeup-ring-inner::before {
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}

.wakeup-ring-inner::after {
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes ringSpinFast {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Center Icon ── */
.wakeup-center-icon {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  box-shadow:
    0 0 30px rgba(212,165,116,0.4),
    0 0 60px rgba(212,165,116,0.15);
  animation: centerPulse 2.5s ease-in-out infinite;
}

@keyframes centerPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(212,165,116,0.4), 0 0 60px rgba(212,165,116,0.15); transform: scale(1); }
  50%      { box-shadow: 0 0 40px rgba(212,165,116,0.6), 0 0 80px rgba(212,165,116,0.25); transform: scale(1.06); }
}

/* ── Text Content ── */
.wakeup-text-container {
  text-align: center;
  max-width: 340px;
  padding: 0 20px;
}

.wakeup-status-text {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  min-height: 28px;
}

.wakeup-engage-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.5s ease;
  min-height: 44px;
  font-family: 'Inter', sans-serif;
}

.wakeup-engage-text.visible {
  opacity: 1;
}

/* ── Progress bar ── */
.wakeup-progress-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 24px;
  overflow: hidden;
  position: relative;
}

.wakeup-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-gradient);
  width: 0%;
  animation: wakeupProgress 45s ease-out forwards;
  box-shadow: 0 0 8px rgba(212,165,116,0.5);
}

@keyframes wakeupProgress {
  0%   { width: 0%; }
  10%  { width: 15%; }
  30%  { width: 35%; }
  50%  { width: 55%; }
  70%  { width: 70%; }
  90%  { width: 85%; }
  100% { width: 92%; }
}

/* ── Don't leave hint ── */
.wakeup-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0;
  animation: hintFadeIn 1s ease 3s forwards;
}

@keyframes hintFadeIn {
  to { opacity: 0.8; }
}

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
  .wakeup-chakra-container {
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
  }

  .wakeup-ring-outer { width: 165px; height: 165px; }
  .wakeup-ring-middle { width: 128px; height: 128px; }
  .wakeup-ring-inner { width: 90px; height: 90px; }
  .wakeup-center-icon { width: 52px; height: 52px; font-size: 24px; }

  .wakeup-status-text { font-size: 16px; }
  .wakeup-engage-text { font-size: 13px; }
  .wakeup-ring-outer .zodiac-symbol { font-size: 12px; }
}