/* ===== 妈妈的声音小窝 - 全局样式 ===== */

/* --- CSS Variables --- */
:root {
  --pink: #FF6B8A;
  --pink-dark: #E85575;
  --pink-light: #FFE4EB;
  --warm: #FFA07A;
  --warm-light: #FFF0E8;
  --gold: #FFB347;
  --bg: #FFF5F5;
  --card: #FFFFFF;
  --text: #4A3728;
  --text-light: #8B7355;
  --text-white: #FFFFFF;
  --shadow: 0 4px 20px rgba(255, 107, 138, 0.15);
  --shadow-lg: 0 8px 40px rgba(255, 107, 138, 0.2);
  --radius: 24px;
  --radius-sm: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

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

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- App Container --- */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  position: relative;
}

/* --- Header --- */
.app-header {
  text-align: center;
  padding: 20px 0 12px;
}

.app-header .title {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

.app-header .subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* --- Mode Indicator --- */
.mode-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--card);
  border-radius: 50px;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--pink);
  font-weight: 600;
}

.mode-indicator .mode-icon {
  font-size: 18px;
}

/* --- Main Content Area --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 10px 0 20px;
}

/* --- The Big Record Button --- */
.record-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.record-btn {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--pink), var(--warm));
  color: var(--text-white);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.record-btn:active {
  transform: scale(0.94);
  box-shadow: 0 4px 14px rgba(255, 107, 138, 0.3);
}

.record-btn .btn-icon {
  font-size: 48px;
  line-height: 1;
}

.record-btn .btn-text {
  font-size: 18px;
  letter-spacing: 2px;
}

/* Breathing ring animation */
.breathing-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid var(--pink);
  opacity: 0;
  pointer-events: none;
}

.breathing-ring.active {
  animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
  0%   { transform: scale(1);    opacity: 0.6; }
  50%  { transform: scale(1.18); opacity: 0.15; }
  100% { transform: scale(1);    opacity: 0.6; }
}

/* Recording state */
.record-btn.recording {
  background: linear-gradient(135deg, #FF4444, #FF6B6B);
  animation: pulse-recording 1.2s ease-in-out infinite;
}

@keyframes pulse-recording {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.5); }
  50%      { box-shadow: 0 0 0 24px rgba(255, 68, 68, 0); }
}

.record-btn.recording .btn-icon {
  animation: mic-bounce 0.6s ease-in-out infinite;
}

@keyframes mic-bounce {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

.record-hint {
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
}

/* --- Response Area --- */
.response-area {
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  display: none;
  position: relative;
}

.response-area.visible {
  display: block;
  animation: slideUp 0.35s ease-out;
}

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

.response-area .response-text {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text);
  letter-spacing: 1px;
}

.response-area .response-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Speaking indicator */
.speaking-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  margin-right: 4px;
  animation: blink 1s ease-in-out infinite;
}

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

/* --- Bottom Tab Bar --- */
.tab-bar {
  display: flex;
  justify-content: space-around;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 10px 8px var(--safe-bottom);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  position: sticky;
  bottom: 0;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  color: var(--text-light);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  min-width: 64px;
}

.tab-item .tab-icon {
  font-size: 26px;
  transition: transform 0.2s ease;
}

.tab-item.active {
  color: var(--pink);
  background: var(--pink-light);
}

.tab-item.active .tab-icon {
  transform: scale(1.12);
}

.tab-item:active {
  transform: scale(0.95);
}

/* --- Mode-specific Content Areas --- */
.mode-content {
  display: none;
  width: 100%;
}

.mode-content.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* --- Diary Mode --- */
.diary-list {
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diary-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}

.diary-card .diary-date {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.diary-card .diary-content {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.diary-card .diary-mood {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 22px;
}

.diary-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
  padding: 40px 20px;
}

/* --- Goodnight Mode --- */
.goodnight-screen {
  text-align: center;
  padding: 20px;
}

.goodnight-screen .moon-icon {
  font-size: 80px;
  display: block;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.goodnight-screen .goodnight-message {
  font-size: 22px;
  line-height: 1.8;
  color: var(--text);
  margin: 16px 0;
}

.goodnight-screen .message-source {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
}

.goodnight-btn {
  padding: 14px 36px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #7B68EE, #6A5ACD);
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

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

/* --- Health Mode --- */
.health-reminder {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  width: 100%;
}

.health-reminder .health-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 12px;
}

.health-reminder .health-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}

.stretch-animation {
  width: 140px;
  height: 140px;
  margin: 12px auto;
}

.stretch-animation svg {
  width: 100%;
  height: 100%;
}

.health-next-btn {
  padding: 12px 28px;
  border-radius: 50px;
  border: none;
  background: var(--pink);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  margin-top: 8px;
}

/* --- Loading & Status --- */
.loading-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 15px;
}

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

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  animation: dotBounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.error-message {
  color: #E74C3C;
  font-size: 15px;
  text-align: center;
  padding: 12px;
  background: #FFF0F0;
  border-radius: var(--radius-sm);
}

/* --- Toast --- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 15px;
  z-index: 9999;
  animation: toastIn 0.3s ease-out;
  pointer-events: none;
}

.toast.success { background: #27AE60; }
.toast.error   { background: #E74C3C; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pink-light); border-radius: 4px; }

/* --- Admin Page Specific --- */
.admin-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-size: 22px;
  color: var(--text);
}

.admin-header .logout-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--pink);
  background: none;
  color: var(--pink);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* Login screen */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
}

.login-screen h2 {
  font-size: 24px;
  color: var(--pink);
}

.login-screen input {
  width: 240px;
  padding: 14px 18px;
  border-radius: 50px;
  border: 2px solid var(--pink-light);
  font-size: 16px;
  text-align: center;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.login-screen input:focus {
  border-color: var(--pink);
}

.login-screen .login-btn {
  padding: 14px 48px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, var(--pink), var(--warm));
  color: white;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Admin sections */
.admin-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.admin-section .section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Calendar grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  cursor: default;
}

.calendar-day.has-diary {
  background: var(--pink-light);
  color: var(--pink);
  font-weight: 700;
}

.calendar-day.today {
  border: 2px solid var(--pink);
}

/* Message input */
.message-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-input-wrap textarea {
  width: 100%;
  height: 100px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--pink-light);
  font-size: 16px;
  font-family: inherit;
  resize: none;
  outline: none;
}

.message-input-wrap textarea:focus {
  border-color: var(--pink);
}

.message-input-wrap .send-btn {
  align-self: flex-end;
  padding: 10px 28px;
  border-radius: 50px;
  border: none;
  background: var(--pink);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Voice message card */
.voice-msg-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--warm-light);
  margin-bottom: 8px;
}

.voice-msg-card .msg-text {
  font-size: 15px;
  color: var(--text);
  flex: 1;
}

.voice-msg-card .msg-delete {
  padding: 6px 12px;
  border-radius: 14px;
  border: none;
  background: #FFE0E0;
  color: #E74C3C;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* Time select */
.time-select {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.time-select select {
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid var(--pink-light);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

/* Admin tab nav (inside admin) */
.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.admin-tab {
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--pink-light);
  background: none;
  white-space: nowrap;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-light);
  transition: all 0.2s;
}

.admin-tab.active {
  background: var(--pink);
  color: white;
  border-color: var(--pink);
}

/* ===== Virtual Life Mode ===== */
.vl-intro {
  text-align: center;
  padding: 30px 20px;
}

.vl-intro .vl-intro-icon {
  font-size: 72px;
  display: block;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.vl-intro .vl-intro-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.vl-intro .vl-intro-subtitle {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 24px;
}

.vl-start-btn {
  padding: 16px 48px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #9B59B6, #8E44AD);
  color: white;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 24px rgba(155, 89, 182, 0.3);
  transition: transform 0.15s;
}

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

/* Scenario card */
.vl-scenario-card {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: slideUp 0.4s ease-out;
}

.vl-scenario-card .vl-scene-label {
  font-size: 12px;
  color: #9B59B6;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.vl-scenario-card .vl-scene-text {
  font-size: 19px;
  line-height: 2;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* Option buttons */
.vl-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.vl-option-btn {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--pink-light);
  background: white;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--text);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vl-option-btn:active {
  transform: scale(0.97);
  background: var(--pink-light);
  border-color: var(--pink);
}

.vl-option-btn .vl-option-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.vl-option-btn:nth-child(1) .vl-option-num { background: #9B59B6; }
.vl-option-btn:nth-child(2) .vl-option-num { background: #E67E22; }
.vl-option-btn:nth-child(3) .vl-option-num { background: #3498DB; }

/* Story history */
.vl-history {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
}

.vl-history-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  border-left: 4px solid #9B59B6;
}

.vl-history-item.vl-choice {
  border-left-color: var(--pink);
  background: var(--pink-light);
  font-weight: 600;
}

.vl-restart-btn {
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid #9B59B6;
  background: none;
  color: #9B59B6;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  align-self: center;
}

/* ===== Admin Voice Recording ===== */
.voice-record-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--warm-light);
  border-radius: var(--radius-sm);
}

.voice-record-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FF6B8A, #FF4444);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  font-family: inherit;
}

.voice-record-btn:active {
  transform: scale(0.92);
}

.voice-record-btn.recording {
  animation: pulse-recording 1.2s ease-in-out infinite;
}

.voice-record-hint {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
}

.voice-record-timer {
  font-size: 20px;
  font-weight: 700;
  color: #FF4444;
  font-variant-numeric: tabular-nums;
}

/* Audio message card in admin */
.voice-msg-card.has-audio {
  background: #FFF0F5;
}

.voice-msg-card .msg-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  background: #FFE4EB;
  color: var(--pink);
  margin-left: 8px;
}

/* Audio playback on mom's side */
.audio-playing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--pink-light);
  border-radius: 50px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--pink);
  justify-content: center;
}

.audio-playing-indicator .wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.audio-playing-indicator .wave-bars span {
  width: 4px;
  background: var(--pink);
  border-radius: 2px;
  animation: wave 0.8s ease-in-out infinite;
}

.audio-playing-indicator .wave-bars span:nth-child(1) { height: 10px; animation-delay: 0s; }
.audio-playing-indicator .wave-bars span:nth-child(2) { height: 18px; animation-delay: 0.1s; }
.audio-playing-indicator .wave-bars span:nth-child(3) { height: 12px; animation-delay: 0.2s; }
.audio-playing-indicator .wave-bars span:nth-child(4) { height: 16px; animation-delay: 0.3s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

/* ===== Text Input Fallback ===== */
.text-input-area {
  width: 100%;
  padding: 8px 0;
}

.text-input-area textarea {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--pink-light);
  font-size: 17px;
  font-family: inherit;
  resize: none;
  outline: none;
  background: white;
}

.text-input-area textarea:focus {
  border-color: var(--pink);
}

.text-input-area .send-btn {
  padding: 12px 0;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, var(--pink), var(--warm));
  color: white;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ===== TTS status indicator ===== */
.tts-status {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  margin-top: 6px;
  display: none;
}

.tts-status.visible {
  display: block;
}

/* ===== Health Sub-tabs ===== */
.health-subtabs {
  display: flex;
  gap: 8px;
  background: var(--card);
  border-radius: 50px;
  padding: 4px;
  box-shadow: var(--shadow);
}

.health-subtab {
  padding: 10px 20px;
  border-radius: 50px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-light);
  transition: all 0.2s;
}

.health-subtab.active {
  background: linear-gradient(135deg, var(--pink), var(--warm));
  color: white;
}

/* ===== Health Panel ===== */
.health-panel {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 16px;
}

.health-panel.active {
  display: flex;
}

/* ===== Health Advisor ===== */
.health-advisor-area {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.health-advisor-intro {
  text-align: center;
  padding: 10px 0;
}

.health-advisor-icon {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}

.health-advisor-desc {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.8;
}

.health-advisor-response {
  background: var(--pink-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  animation: slideUp 0.35s ease-out;
}

.health-advisor-response .response-label {
  font-size: 12px;
  color: var(--pink);
  margin-bottom: 8px;
  font-weight: 600;
}

.health-advisor-response .response-text {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-line;
}

/* Health ask input */
.ha-input-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ha-input-area textarea {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--pink-light);
  font-size: 16px;
  font-family: inherit;
  resize: none;
  outline: none;
  background: white;
}

.ha-input-area textarea:focus {
  border-color: var(--pink);
}

.ha-send-btn {
  padding: 14px 0;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #27AE60, #2ECC71);
  color: white;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

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

/* ===== Health Timeline ===== */
.health-timeline-section {
  width: 100%;
}

.health-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.health-record-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-left: 4px solid #27AE60;
}

.health-record-date {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.health-record-symptom {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 6px;
}

.health-record-advice {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  background: #F0FFF4;
  border-radius: 10px;
  padding: 10px 12px;
}

/* Responsive */
@media (min-width: 481px) {
  body {
    background: linear-gradient(135deg, #FFE4EB, #FFF0E8, #FFF5F5);
  }
  .app-container {
    background: var(--bg);
    min-height: 100dvh;
    box-shadow: 0 0 60px rgba(0,0,0,0.05);
  }
}
