/* ============================================
   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);
  height: 100vh;
  height: 100dvh;
  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;
  overflow: hidden;
  min-height: 0;
  position: relative;
  z-index: 90;
}

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

.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;
  min-height: 0;
}

.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;
  flex-shrink: 0;
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.sidebar-user-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  margin: 0 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user-area:hover {
  background: var(--bg-hover);
}

.sidebar-user-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

.user-avatar {
  width: 34px;
  height: 34px;
  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;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(212, 165, 116, 0.2);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.sidebar-user-area:hover .user-avatar {
  box-shadow: 0 0 18px rgba(212, 165, 116, 0.35);
  transform: scale(1.05);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Outfit', sans-serif;
  line-height: 1.3;
}

.sidebar-user-type {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.3;
}

.sidebar-user-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.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);
}

.sidebar-footer-btn svg {
  width: 16px;
  height: 16px;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: transform var(--transition-base), background var(--transition-fast);
  border-radius: var(--radius-sm);
}

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

/* ---------- Cosmic Tools (Sidebar) ---------- */
.sidebar-cosmic-tools {
  padding: 8px 12px 4px;
  border-bottom: 1px solid var(--border);
}

.cosmic-tools-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 6px 6px;
}

.cosmic-tool-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 2px;
}

.cosmic-tool-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cosmic-tool-btn:hover {
  color: var(--text-primary);
}

.cosmic-tool-btn:hover::before {
  opacity: 0.08;
}

.cosmic-tool-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border-radius: 8px;
  background: var(--accent-soft);
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
}

.cosmic-tool-btn:hover .cosmic-tool-icon {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(212, 165, 116, 0.3);
}

.cosmic-tool-text {
  flex: 1;
  font-family: 'Outfit', sans-serif;
  position: relative;
  z-index: 1;
}

.cosmic-tool-arrow {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.cosmic-tool-btn:hover .cosmic-tool-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Chat History Header ---------- */
.chat-history-header {
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-history-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.chat-history-toggle-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.chat-history-toggle-btn:hover .chat-history-icon-svg {
  color: var(--accent);
}

.chat-history-icon-svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.chat-history-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.chat-history-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.chat-history-back-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.chat-history-back-btn svg {
  flex-shrink: 0;
}

/* Expanded sidebar state — hides tools & AIs, shows full chat history */
.sidebar.history-expanded .sidebar-cosmic-tools,
.sidebar.history-expanded .astrologer-sidebar-section {
  display: none;
}

.sidebar.history-expanded .chat-history-toggle-btn {
  display: none;
}

.sidebar.history-expanded .chat-history-back-btn {
  display: flex;
}

.sidebar.history-expanded .chat-history {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

/* ---------- 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);
}

.setting-info-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Account Section Styles ---------- */
.account-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.account-profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0.6;
}

.account-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(212, 165, 116, 0.25);
  font-family: 'Outfit', sans-serif;
}

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

.account-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.account-name-input {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 2px 4px;
  min-width: 0;
  flex: 1;
  transition: border-color var(--transition-fast);
  border-radius: 0;
}

.account-name-input:focus {
  border-bottom-color: var(--accent);
  outline: none;
}

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

.account-name-save {
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-gradient);
  color: white;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.account-name-save:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.account-email {
  font-size: 13px;
  color: var(--text-muted);
}

.account-logout-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.account-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: #ef4444;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.2);
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.account-logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
}

.account-logout-btn svg {
  flex-shrink: 0;
}

/* Guest Account Card */
.account-guest-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.account-guest-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.account-guest-icon {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(212, 165, 116, 0.4);
  animation: gentlePulse 3s ease-in-out infinite;
}

.account-guest-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.account-guest-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto 24px;
}

.account-guest-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

.account-guest-signup {
  padding: 14px 24px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glow);
  letter-spacing: 0.3px;
}

.account-guest-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 165, 116, 0.35);
}

.account-guest-signin {
  padding: 10px 24px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.account-guest-signin:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.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;
  }
}

/* ============================================
   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;
  }
}

/* ========================================
   SIDEBAR APPS BUTTON
   ======================================== */
.sidebar-apps-row {
  padding: 4px 12px 6px;
  flex-shrink: 0;
}

.sidebar-apps-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-apps-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-apps-btn:hover {
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow: 0 0 16px rgba(212, 165, 116, 0.12);
}

.sidebar-apps-btn:hover::before {
  opacity: 0.07;
}

.sidebar-apps-btn.active {
  color: var(--accent);
  border-color: rgba(212, 165, 116, 0.35);
  background: var(--accent-soft);
  box-shadow: 0 0 18px rgba(212, 165, 116, 0.18);
}

.sidebar-apps-btn-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-soft);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.sidebar-apps-btn:hover .sidebar-apps-btn-icon,
.sidebar-apps-btn.active .sidebar-apps-btn-icon {
  box-shadow: 0 0 14px rgba(212, 165, 116, 0.35);
  transform: scale(1.08);
}

.sidebar-apps-btn-label {
  flex: 1;
  position: relative;
  z-index: 1;
}

.sidebar-apps-btn-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-gradient);
  color: #fff;
  padding: 2px 7px;
  border-radius: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* ========================================
   APPS LAUNCHER PANEL
   ======================================== */
.apps-launcher {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: appsLauncherIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.apps-launcher.hidden {
  display: none;
}

@keyframes appsLauncherIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

.apps-launcher-inner {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 28px 48px;
}

.apps-launcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.apps-launcher-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.apps-launcher-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

.apps-launcher-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.apps-launcher-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.apps-launcher-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Apps grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

/* Per-card glow colours */
.app-card-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.18;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.app-card:hover .app-card-glow {
  opacity: 0.35;
}

.app-glow-purple {
  background: #a855f7;
}

.app-glow-gold {
  background: #d4a574;
}

.app-glow-rose {
  background: #f43f5e;
}

.app-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.app-card:hover .app-card-icon {
  transform: scale(1.1);
}

.app-glow-purple~.app-card-icon {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.app-glow-gold~.app-card-icon {
  box-shadow: 0 0 20px rgba(212, 165, 116, 0.25);
}

.app-glow-rose~.app-card-icon {
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.25);
}

.app-card:hover .app-glow-purple~.app-card-icon {
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.45);
}

.app-card:hover .app-glow-gold~.app-card-icon {
  box-shadow: 0 0 28px rgba(212, 165, 116, 0.45);
}

.app-card:hover .app-glow-rose~.app-card-icon {
  box-shadow: 0 0 28px rgba(244, 63, 94, 0.45);
}

.app-card-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.app-card-emoji-fallback {
  font-size: 26px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.app-card-body {
  position: relative;
  z-index: 1;
}

.app-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.app-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.app-card-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.8;
}

.apps-launcher-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .apps-launcher-inner {
    padding: 20px 16px 36px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .app-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }

  .app-card-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
    flex-shrink: 0;
  }

  .app-card-body {
    flex: 1;
  }
}

/* ================================================
   FEATURE CSS — Toast, Copy, Search, Context Menu,
   Pinning, Onboarding, Zodiac Widget, Shortcuts
   ================================================ */

/* ── Toast Notification System ── */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-notif {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  font-size: 13px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  pointer-events: all;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
  max-width: 320px;
  min-width: 200px;
}

.toast-notif.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-notif.success .toast-notif-icon { color: #4ade80; }
.toast-notif.error   .toast-notif-icon { color: #f87171; }
.toast-notif.info    .toast-notif-icon { color: var(--accent); }
.toast-notif.warning .toast-notif-icon { color: #fbbf24; }

.toast-notif-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.toast-notif-msg {
  flex: 1;
  line-height: 1.4;
}

/* ── Message Action Toolbar (ChatGPT-style) ── */
.message.ai {
  position: relative;
}

.message.user {
  position: relative;
}

.msg-action-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  padding-top: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.message:hover .msg-action-bar,
.msg-action-bar.always-visible {
  opacity: 1;
}

.msg-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
  font-size: 13px;
  position: relative;
}

.msg-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: scale(1.08);
}

.msg-action-btn.active {
  color: var(--accent);
}

.msg-action-btn.copied {
  color: #4ade80;
}

.msg-action-btn.liked {
  color: #4ade80;
}

.msg-action-btn.disliked {
  color: #f87171;
}

.msg-action-btn.speaking {
  color: var(--accent);
  animation: speakPulse 1.2s ease-in-out infinite;
}

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

/* Separator between action groups */
.msg-action-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Tooltip on action buttons */
.msg-action-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 10;
}

.msg-action-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ── Share Dropdown ── */
.share-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 100;
  animation: shareDropIn 0.18s cubic-bezier(0.22,1,0.36,1);
}

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

.share-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

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

.share-dropdown-item .share-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

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

.suggestion-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.22s ease;
  line-height: 1.3;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-pill:hover {
  background: var(--accent-soft);
  border-color: rgba(212,165,116,0.35);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212,165,116,0.12);
}

.suggestion-pill::before {
  content: '→';
  font-size: 11px;
  color: var(--accent);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── Stop Generation Button ── */
.send-btn--stop {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  animation: stopPulse 1.8s ease-in-out infinite;
}

.send-btn--stop:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  transform: scale(1.05);
}

@keyframes stopPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ── Editable User Message ── */
.msg-edit-btn {
  position: absolute;
  top: 6px;
  left: -34px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease;
  font-size: 12px;
}

.message.user:hover .msg-edit-btn {
  opacity: 1;
}

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

.message-edit-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.message-edit-textarea {
  width: 100%;
  min-height: 60px;
  max-height: 180px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid rgba(212,165,116,0.3);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.message-edit-textarea:focus {
  border-color: rgba(212,165,116,0.5);
  box-shadow: 0 0 0 3px rgba(212,165,116,0.1);
}

.message-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.message-edit-save {
  padding: 7px 18px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.message-edit-save:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.message-edit-cancel {
  padding: 7px 18px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.message-edit-cancel:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── Settings Activity Section ── */
.settings-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.settings-stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.settings-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.settings-stat-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.settings-stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.settings-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.settings-sparkline-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.settings-sparkline-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.settings-sparkline-wrap {
  width: 100%;
  height: 60px;
}

.settings-sparkline-wrap svg {
  width: 100%;
  height: 100%;
}

.settings-lucky-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

[data-theme="dark"] .settings-lucky-card {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.06), var(--bg-primary));
  border-color: rgba(139, 92, 246, 0.12);
}

.settings-lucky-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.settings-lucky-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 12px;
}

.settings-lucky-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-lucky-number {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.settings-lucky-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.settings-lucky-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.settings-lucky-mantra {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Chat History Search ── */
.chat-search-row {
  padding: 6px 12px 4px;
  flex-shrink: 0;
}

.chat-search-row.hidden { display: none; }

.chat-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  transition: border-color 0.2s;
}

.chat-search-wrap:focus-within {
  border-color: rgba(212,165,116,0.4);
  box-shadow: 0 0 0 3px rgba(212,165,116,0.08);
}

.chat-search-wrap svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.chat-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 12px;
  font-family: 'Outfit', sans-serif;
}

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

/* ── Chat History Item Enhancements (pin + context) ── */
.chat-history-item {
  position: relative;
}

.chat-history-item.pinned {
  border-left: 2px solid var(--accent);
  padding-left: calc(12px - 2px);
}

.chat-history-item .pin-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--accent);
  opacity: 0.7;
}

.chat-history-item.dimmed { opacity: 0.4; }

/* ── Chat Context Menu ── */
.chat-context-menu {
  position: fixed;
  z-index: 8000;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  min-width: 170px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  animation: ctxFadeIn 0.15s ease;
}

.chat-context-menu.hidden { display: none; }

@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-ctx-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.chat-ctx-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.chat-ctx-item.danger { color: #f87171; }
.chat-ctx-item.danger:hover { background: rgba(248,113,113,0.1); }

.chat-ctx-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

/* ── Onboarding Modal ── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: onboardFadeIn 0.3s ease;
}

.onboarding-overlay.hidden { display: none; }

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

.onboarding-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 20px);
  padding: 40px 36px 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 60px rgba(212,165,116,0.1);
  position: relative;
  animation: onboardSlideIn 0.35s cubic-bezier(0.22,1,0.36,1);
}

@keyframes onboardSlideIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.onboarding-brand {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--accent);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}

.onboarding-step { display: none; }
.onboarding-step.active { display: block; }

.onboarding-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 14px;
}

.onboarding-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
}

.onboarding-desc {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}

.onboarding-field {
  margin-bottom: 14px;
}

.onboarding-fields { margin-bottom: 4px; }

.onboarding-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.onboarding-field .optional { color: var(--text-muted); font-weight: 400; }

.onboarding-field input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.onboarding-field input:focus {
  border-color: rgba(212,165,116,0.5);
  box-shadow: 0 0 0 3px rgba(212,165,116,0.1);
}

.onboarding-field select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba%28212,165,116,0.8%29' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.onboarding-field select:focus {
  border-color: rgba(212,165,116,0.5);
  box-shadow: 0 0 0 3px rgba(212,165,116,0.1);
}

.onboarding-next-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  margin-top: 18px;
  transition: opacity 0.2s, transform 0.2s;
}

.onboarding-next-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.onboarding-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.onboarding-skip-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

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

.onboarding-btn-row .onboarding-next-btn { flex: 1.5; margin-top: 0; }

.onboarding-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 4px;
}

.onboarding-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.onboarding-feature span { font-size: 18px; }

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, transform 0.3s;
}

.onboarding-dot.active {
  background: var(--accent);
  transform: scale(1.25);
}

/* ── Keyboard Shortcut Badge (tooltip) ── */
.kbd-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-muted);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 5px;
}

@media (max-width: 768px) {
  .toast-container { bottom: 16px; right: 12px; left: 12px; }
  .toast-notif { max-width: 100%; }
  .onboarding-modal { padding: 28px 20px 24px; }
  .msg-action-bar { opacity: 1; }
  .msg-edit-btn { opacity: 1; left: -30px; }
  .suggestion-pills { flex-wrap: wrap; }
  .suggestion-pill { max-width: 100%; font-size: 12px; }
  .share-dropdown { left: auto; right: 0; }
  .settings-activity-grid { grid-template-columns: 1fr; }
  .msg-action-btn::after { display: none; }
}

/* ══════════════════════════════════════════════
   Insights Dashboard
   ══════════════════════════════════════════════ */

.insights-dashboard {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.insights-dashboard.insights-visible {
  opacity: 1;
  transform: translateY(0);
}

.insights-dashboard.hidden {
  display: none;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ── Stat Cards ── */
.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.insight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.insight-card:hover::before {
  opacity: 0.04;
}

.insight-card-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.insight-card-value {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.insight-card-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ── Most Consulted Astrologer ── */
.insight-astrologer {
  grid-column: 1 / -1;
}

.insight-astrologer-header {
  margin-bottom: 10px;
}

.insight-astrologer-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.insight-astrologer-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.insight-astrologer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.insight-astrologer-info {
  text-align: left;
}

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

.insight-astrologer-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Activity Sparkline ── */
.insight-activity {
  grid-column: 1 / -1;
}

.insight-activity-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: left;
}

.insight-sparkline-wrap {
  width: 100%;
  height: 50px;
}

.insight-sparkline {
  width: 100%;
  height: 100%;
}

/* ── Lucky Of The Day ── */
.insight-lucky {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
}

[data-theme="dark"] .insight-lucky {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.06), rgba(30, 41, 59, 1));
  border-color: rgba(139, 92, 246, 0.12);
}

.insight-lucky-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  text-align: left;
}

.insight-lucky-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 12px;
}

.insight-lucky-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.insight-lucky-number {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.insight-lucky-color {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: box-shadow 0.3s ease;
}

.insight-lucky-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.insight-lucky-mantra {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
  text-align: left;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Zodiac Sign PNG Images (sidebar widget) ── */
.zdw-symbol {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zdw-sign-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(212, 165, 116, 0.45));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.zodiac-day-widget:hover .zdw-sign-img {
    transform: scale(1.1) rotate(-5deg);
}
.zdw-symbol-fallback {
    font-size: 26px;
    line-height: 1;
}

/* ── Zodiac PNG in compatibility sign display ── */
.pg-compat-sign-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px;
    filter: drop-shadow(0 2px 8px rgba(212, 165, 116, 0.4));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pg-compat-sign-display:hover .pg-compat-sign-img {
    transform: scale(1.1);
}

/* --- Brand Logo Styling --- */
.brand-logo-img {
    height: 38px;
    width: 38px;
    max-width: 38px;
    max-height: 38px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(212,165,116,0.3));
    transition: transform 0.3s ease;
}
.pg-nav-logo:hover .brand-logo-img,
.intro-nav-logo:hover .brand-logo-img,
.logo:hover .brand-logo-img {
    transform: scale(1.05) rotate(3deg);
}
.brand-logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    font-family: 'Outfit', sans-serif;
    text-align: left;
    gap: 1px;
}
.brand-logo-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--pg-text, var(--intro-text, var(--text-primary, #fff)));
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.brand-logo-subtitle {
    font-size: 9px;
    font-weight: 600;
    color: var(--pg-accent, var(--intro-accent, var(--accent, #ffd700)));
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.95;
}
