:root {
  --eclips: #462377;
  --lavendel: #B39DDB;
  --lavendel-text: #6b5a8d;
  --amethyste: #936DA4;
  --shore: #1F1FC9;
  --leaf: #B8DD7B;
  --coral: #E1231C;
  --bg: #faf9fc;
  --card-bg: #fff;
  --text: #372D43;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-bg);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, #6b4a9e 0%, #7d5cb0 100%);
  color: white;
  flex-shrink: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-family: 'Ovo', serif;
  font-size: 1.4rem;
  font-weight: 400;
}

.tagline {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-top: 2px;
}

.nav-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 8px 12px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-btn:hover { background: rgba(255,255,255,0.25); }

.nav-menu {
  position: fixed;
  top: 60px;
  right: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(70,35,119,0.2);
  min-width: 220px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.nav-menu.open { display: block; }

.nav-menu-item {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f0ecf5;
}

.nav-menu-item:last-child { border-bottom: none; }
.nav-menu-item:hover { background: #f7f4fb; }

.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.screen.active { display: flex; }

.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message { display: flex; max-width: 85%; }
.message.user { margin-left: auto; }
.message.assistant { margin-right: auto; }

.bubble {
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message.user .bubble {
  background: linear-gradient(135deg, var(--eclips), var(--amethyste));
  color: white;
  border-bottom-right-radius: 6px;
}

.message.assistant .bubble {
  background: #f3effa;
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.typing-indicator {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--lavendel-text);
  font-size: 0.85rem;
}

.typing-indicator.show { display: flex; }

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lavendel);
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.input-area {
  padding: 12px 16px 16px;
  background: white;
  border-top: 1px solid #ede7f6;
  flex-shrink: 0;
}

.input-group {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.input-field {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e0d8eb;
  border-radius: 24px;
  font-size: 1rem;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  max-height: 120px;
}

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

.send-btn {
  background: var(--eclips);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.2s;
  flex-shrink: 0;
}

.send-btn:hover { background: #5a3a8a; }
.send-btn:active { transform: scale(0.95); }

.info-screen {
  padding: 20px;
  overflow-y: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--eclips);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 16px;
  cursor: pointer;
}

.info-screen h2 {
  font-family: 'Ovo', serif;
  color: var(--eclips);
  margin: 0 0 16px;
}

.card {
  background: white;
  border: 1px solid #ede7f6;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 12px;
  color: var(--eclips);
  font-size: 1.1rem;
}

.card p { margin: 0 0 10px; }
.card ul { margin: 8px 0; padding-left: 20px; }
.card li { margin-bottom: 6px; }

.crisis-banner {
  background: linear-gradient(135deg, #fff5f5, #fff0f0);
  border: 1px solid #f5d0d0;
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}

.crisis-banner h3 {
  color: var(--coral);
  margin: 0 0 8px;
  font-size: 1rem;
}

.crisis-banner p { margin: 4px 0; font-size: 0.9rem; }

.welcome-card {
  background: linear-gradient(135deg, #f7f4fb, #ede7f6);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 8px;
}

.welcome-card h3 {
  font-family: 'Ovo', serif;
  color: var(--eclips);
  margin: 0 0 10px;
}

.welcome-card p { margin: 0; font-size: 0.95rem; color: var(--lavendel-text); }

.profile-header {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #f7f4fb, #ede7f6);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--eclips), var(--amethyste));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 2rem;
}

.profile-name {
  font-family: 'Ovo', serif;
  font-size: 1.3rem;
  color: var(--eclips);
  margin: 0 0 4px;
}

.profile-status {
  font-size: 0.85rem;
  color: var(--lavendel-text);
}

.life-area-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.life-area-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid #ede7f6;
}

.life-area-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.life-area-icon {
  font-size: 1.2rem;
}

.life-area-value {
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: #f7f4fb;
  color: var(--lavendel-text);
}

.life-area-value.positive {
  background: #e8f5e9;
  color: #2e7d32;
}

.life-area-value.challenging {
  background: #fff3e0;
  color: #e65100;
}

.life-area-value.unknown {
  background: #f5f5f5;
  color: #9e9e9e;
  font-style: italic;
}

.hormonal-card {
  background: linear-gradient(135deg, #fce4ec, #f3e5f5);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.hormonal-card h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--eclips);
}

.hormonal-info {
  font-size: 0.95rem;
  color: var(--text);
}

.cycle-visual {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cycle-day {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--eclips);
}

.cycle-phase {
  font-size: 0.85rem;
  color: var(--lavendel-text);
}

.settings-section {
  margin-bottom: 20px;
}

.settings-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--lavendel-text);
  margin: 0 0 12px;
  padding: 0 4px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid #ede7f6;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.settings-item:hover {
  background: #f7f4fb;
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-item-icon {
  font-size: 1.2rem;
}

.settings-item-label {
  font-size: 0.95rem;
}

.settings-item-arrow {
  color: var(--lavendel);
}

.action-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--eclips), var(--amethyste));
  color: white;
}

.action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(70, 35, 119, 0.3);
}

.action-btn.secondary {
  background: #f7f4fb;
  color: var(--eclips);
  border: 1px solid #ede7f6;
}

.action-btn.secondary:hover {
  background: #ede7f6;
}

.action-btn.danger {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.action-btn.danger:hover {
  background: #ffcdd2;
}

.last-updated {
  text-align: center;
  font-size: 0.8rem;
  color: var(--lavendel-text);
  margin-top: 16px;
}

.profile-notification {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--eclips), var(--amethyste));
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(70, 35, 119, 0.3);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.profile-notification.show {
  opacity: 1;
}

.organic-section {
  margin-bottom: 20px;
}

.organic-section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--lavendel-text);
  margin: 0 0 12px 4px;
}

.organic-core {
  background: linear-gradient(135deg, #f7f4fb, #ede7f6);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.organic-now {
  background: white;
  border: 2px solid var(--lavendel);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.organic-now-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--lavendel-text);
  margin-bottom: 6px;
}

.organic-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.organic-list li {
  padding: 12px 16px;
  background: white;
  border: 1px solid #ede7f6;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.organic-list li:last-child {
  margin-bottom: 0;
}

.organic-person {
  padding: 14px 16px;
  background: white;
  border: 1px solid #ede7f6;
  border-radius: 12px;
  margin-bottom: 10px;
}

.organic-person-name {
  font-weight: 600;
  color: var(--eclips);
  margin-bottom: 4px;
}

.organic-person-note {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.organic-exploring {
  padding: 14px 16px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  margin-bottom: 10px;
}

.organic-exploring-topic {
  font-weight: 500;
  color: var(--eclips);
  margin-bottom: 4px;
}

.organic-exploring-note {
  font-size: 0.9rem;
  color: var(--text);
}

.organic-session {
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.organic-session-date {
  color: var(--lavendel-text);
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.organic-session-gist {
  color: var(--text);
}

@media (max-width: 480px) {
  .app-header { padding: 10px 12px; }
  .logo-text { font-size: 1.2rem; }
  .tagline { display: none; }
  .chat-area { padding: 12px; }
  .input-area { padding: 10px 12px 14px; }
}