/* ===== 树洞 App 样式 ===== */

:root {
  --green: #7BC67E;
  --green-dark: #5A9E5C;
  --green-light: #A8E6A8;
  --cream: #FFF5E6;
  --cream-dark: #F0E6D6;
  --brown: #8B6914;
  --brown-light: #C4956A;
  --text: #2C2C2C;
  --text2: #6B6B6B;
  --text3: #A0A0A0;
  --white: #FFFFFF;
  --dark: #1A1A2E;
  --dark2: #2D2D44;
  --red: #E74C3C;
  --red-light: #FF6B6B;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Screens ===== */
.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.screen.active { display: flex; flex-direction: column; }

.dark-screen { background: var(--dark); color: #E8E8E8; }
.crisis-screen {
  background: #1A1A2E;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999; max-width: none;
  justify-content: center; align-items: center;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-block; padding: 16px 40px; border-radius: 28px;
  background: var(--green); color: white; font-size: 17px; font-weight: 700;
  border: none; cursor: pointer; box-shadow: 0 4px 16px rgba(123,198,126,0.3);
  transition: transform 0.15s; width: 100%; max-width: 300px; text-align: center;
}
.btn-primary:active { transform: scale(0.97); }

.btn-text {
  background: none; border: none; color: var(--text2); font-size: 15px;
  cursor: pointer; padding: 12px; text-align: center; display: block; width: 100%;
}
.btn-text.light { color: rgba(255,255,255,0.7); }

.btn-small {
  padding: 10px 20px; border-radius: 20px; background: var(--green);
  color: white; font-size: 14px; font-weight: 600; border: none; cursor: pointer;
}

.btn-danger {
  padding: 14px; border-radius: var(--radius-sm); background: none;
  border: 1px solid var(--red); color: var(--red); font-size: 14px;
  cursor: pointer; width: 100%; margin-top: 24px;
}

.back-btn {
  position: absolute; top: 16px; left: 16px; background: none; border: none;
  font-size: 15px; color: var(--green-dark); cursor: pointer; z-index: 10; padding: 8px;
}
.back-btn.light { color: rgba(255,255,255,0.7); }

/* ===== Common ===== */
.section-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 24px; line-height: 1.5; }
.hint-text { font-size: 13px; color: var(--text3); text-align: center; margin-top: 16px; line-height: 1.6; }
.text-input {
  padding: 12px 16px; border-radius: var(--radius-sm); border: 2px solid #E0E0E0;
  font-size: 15px; background: white; width: 100%; outline: none;
  transition: border-color 0.2s;
}
.text-input:focus { border-color: var(--green); }

/* ===== Welcome ===== */
.welcome-wrap {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.welcome-tree { font-size: 72px; margin-bottom: 24px; animation: sway 3s ease-in-out infinite; }
@keyframes sway { 0%,100%{ transform:rotate(-3deg) } 50%{ transform:rotate(3deg) } }
.welcome-title { font-size: 32px; font-weight: 800; color: var(--green-dark); margin-bottom: 12px; }
.welcome-sub { font-size: 16px; color: var(--text2); margin-bottom: 48px; }

/* ===== Age Selection ===== */
.age-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 60px; }
.age-cards { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.age-card {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px;
  border-radius: var(--radius); background: white; border: 2px solid transparent;
  box-shadow: var(--shadow); cursor: pointer; transition: all 0.2s;
}
.age-card:active { border-color: var(--green); transform: scale(0.98); }
.age-emoji { font-size: 32px; }
.age-label { font-size: 18px; font-weight: 600; }

/* ===== Intro ===== */
.intro-wrap { flex: 1; display: flex; flex-direction: column; padding-top: 60px; }
.chat-bubbles { flex: 1; }
.chat-bubble {
  max-width: 85%; padding: 14px 18px; border-radius: 18px; margin-bottom: 12px;
  font-size: 15px; line-height: 1.6; animation: fadeUp 0.3s ease;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:translateY(0) } }
.bubble-ai { background: #E8F5E9; color: var(--text); border-bottom-left-radius: 4px; margin-right: auto; }
.bubble-user { background: var(--green); color: white; border-bottom-right-radius: 4px; margin-left: auto; }
.intro-actions { text-align: center; padding: 16px 0; }
.name-input-wrap { display: flex; gap: 8px; margin-bottom: 8px; }

/* ===== FAQ ===== */
.faq-wrap { padding-top: 60px; }
.faq-item { background: white; border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.faq-q { font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.faq-a { color: var(--text2); font-size: 14px; line-height: 1.6; }

/* ===== Home Scene ===== */
#screen-home { padding: 0; background: linear-gradient(180deg, #87CEEB 0%, #B5E8B5 40%, #8B6914 80%, #6B4F10 100%); }
.home-scene { 
  flex: 1; display: flex; flex-direction: column; position: relative; 
  min-height: 100vh; min-height: 100dvh;
  background: linear-gradient(180deg, #87CEEB 0%, #B8E6C8 60%, #7BC67E 100%);
  overflow: hidden;
}
.sky-area {
  flex: 0 0 25%; display: flex; flex-direction: column; justify-content: center; align-items: center;
  cursor: pointer; position: relative;
}
.sky-area::before {
  content: '☁️'; position: absolute; top: 20%; left: -10%;
  font-size: 28px; opacity: 0.5;
  animation: cloudDrift 20s linear infinite;
}
.sky-area::after {
  content: '☁️'; position: absolute; top: 40%; left: -15%;
  font-size: 20px; opacity: 0.3;
  animation: cloudDrift 28s linear infinite 8s;
}
@keyframes cloudDrift {
  0% { transform: translateX(-20px); }
  100% { transform: translateX(calc(100vw + 40px)); }
}
.sky-weather { font-size: 48px; transition: all 0.3s; z-index: 1; }
.sky-hint { font-size: 12px; color: rgba(255,255,255,0.9); margin-top: 4px; z-index: 1; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.tree-area {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
}
.tree-crown { 
  font-size: 120px; line-height: 1; 
  animation: treeSway 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.15));
}
@keyframes treeSway { 
  0%,100% { transform: rotate(0deg) scale(1); } 
  25% { transform: rotate(1.5deg) scale(1.01); } 
  75% { transform: rotate(-1.5deg) scale(1.01); } 
}
.tree-hole {
  width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, #1A1A2E 40%, #3D2B1F 100%);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  margin-top: -20px; position: relative; box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.hole-glow {
  position: absolute; width: 100%; height: 100%; border-radius: 50%;
  box-shadow: 0 0 20px rgba(123,198,126,0.4); animation: glow 2s ease-in-out infinite;
}
@keyframes glow { 
  0%,100% { opacity: 0.4; box-shadow: 0 0 20px rgba(123,198,126,0.4); } 
  50% { opacity: 1; box-shadow: 0 0 30px rgba(123,198,126,0.7), 0 0 60px rgba(123,198,126,0.2); } 
}
.hole-label { font-size: 14px; color: rgba(255,255,255,0.8); font-weight: 600; z-index: 1; }
.tree-bird {
  position: absolute; top: 10%; right: 20%; font-size: 32px; cursor: pointer;
  animation: birdFly 3s ease-in-out infinite;
  display: flex; flex-direction: column; align-items: center;
  z-index: 5;
}
.icon-tip {
  font-size: 13px; color: #fff; 
  text-shadow: 0 1px 3px rgba(0,0,0,0.6); margin-top: 6px; white-space: nowrap;
  font-weight: 600; background: rgba(0,0,0,0.45); padding: 3px 10px; border-radius: 12px;
  letter-spacing: 0.5px;
}
@keyframes birdFly { 
  0%,100% { transform: translateY(0) rotate(0deg); } 
  30% { transform: translateY(-8px) rotate(-3deg); } 
  60% { transform: translateY(-3px) rotate(2deg); } 
}
.tree-emergency {
  position: absolute; top: 5%; left: 15%; font-size: 28px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  z-index: 5;
}
.ground-area {
  flex: 0 0 15%; display: flex; align-items: center; justify-content: flex-end; padding: 0 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(76,135,60,0.3) 100%);
}
.home-settings { font-size: 24px; cursor: pointer; opacity: 0.7; display: flex; flex-direction: column; align-items: center; }
.home-greeting {
  position: absolute; bottom: 20px; left: 20px; right: 20px;
  background: rgba(255,255,255,0.95); border-radius: 16px; padding: 14px 18px;
  font-size: 14px; color: var(--text); text-align: center; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  animation: greetingPop 0.5s ease-out;
}
@keyframes greetingPop {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ===== Dump ===== */
.dump-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.dump-title { font-size: 20px; font-weight: 600; line-height: 1.6; margin-bottom: 40px; }
.dump-methods { display: flex; gap: 20px; margin-bottom: 24px; }
.dump-method {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 28px 32px; border-radius: var(--radius); background: var(--dark2);
  border: 2px solid rgba(255,255,255,0.1); cursor: pointer; transition: all 0.2s;
}
.dump-method:active { border-color: var(--green); transform: scale(0.97); }
.method-icon { font-size: 36px; }
.method-label { font-size: 16px; font-weight: 600; }
.dump-hint { font-size: 13px; color: rgba(255,255,255,0.5); }

.dump-text-wrap { flex: 1; display: flex; flex-direction: column; padding-top: 60px; }
.dump-text-hint { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 12px; font-style: italic; }
.dump-textarea {
  flex: 1; width: 100%; background: var(--dark2); color: #E8E8E8; border: none;
  border-radius: var(--radius-sm); padding: 16px; font-size: 16px; line-height: 1.8;
  resize: none; outline: none; min-height: 200px;
}
.dump-textarea::placeholder { color: rgba(255,255,255,0.3); }

/* Dump Voice */
.dump-voice-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 60px; }
.dump-voice-title { font-size: 16px; color: rgba(255,255,255,0.7); margin-bottom: 24px; }
.voice-recordings { width: 100%; margin-bottom: 24px; }
.voice-entry {
  background: var(--dark2); padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 8px; font-size: 14px; color: rgba(255,255,255,0.7);
}
.voice-btn {
  width: 120px; height: 120px; border-radius: 50%; background: var(--green);
  border: none; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 4px 24px rgba(123,198,126,0.4); transition: all 0.2s;
}
.voice-btn:active, .voice-btn.recording { transform: scale(1.1); background: var(--red-light); }
.voice-btn-icon { font-size: 36px; }
.voice-btn-text { font-size: 12px; color: white; }

/* Dump Ritual */
.ritual-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.ritual-title { font-size: 18px; font-weight: 600; line-height: 1.6; margin-bottom: 32px; }
.ritual-options { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; justify-content: center; }
.ritual-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px; border-radius: var(--radius); background: white;
  box-shadow: var(--shadow); cursor: pointer; transition: all 0.2s; min-width: 90px;
}
.ritual-card:active { transform: scale(0.95); }
.ritual-icon { font-size: 36px; }
.ritual-label { font-size: 15px; font-weight: 600; }

/* Dump Done */
.dump-done-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.dump-animation { font-size: 64px; margin-bottom: 24px; animation: fadeUp 0.5s ease; }
.dump-done-text { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.dump-done-msg { font-size: 14px; color: var(--text2); margin-bottom: 32px; }
.dump-done-actions { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }

/* ===== Weather ===== */
.weather-wrap { padding-top: 60px; }
.weather-grid {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 24px;
}
.weather-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 12px; border-radius: var(--radius-sm); background: white;
  box-shadow: var(--shadow); cursor: pointer; transition: all 0.2s;
  width: calc(25% - 9px); min-width: 76px;
}
.weather-item:active, .weather-item.selected { transform: scale(0.95); border: 2px solid var(--green); }
.weather-emoji { font-size: 28px; }
.weather-label { font-size: 11px; color: var(--text2); text-align: center; line-height: 1.3; }

.weather-note-area { text-align: center; margin-bottom: 32px; }
.weather-note-area .text-input { margin-bottom: 12px; }

/* Calendar */
.mood-calendar { margin-top: 32px; }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cal-nav { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text2); padding: 8px 16px; }
.cal-title { font-size: 16px; font-weight: 600; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center;
}
.cal-day-header { font-size: 12px; color: var(--text3); padding: 4px; }
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 18px; border-radius: 8px; cursor: pointer;
}
.cal-day.empty { cursor: default; }
.cal-day.today { background: rgba(123,198,126,0.15); }
.cal-day .day-num { font-size: 11px; color: var(--text3); }
.cal-stats { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text2); }

/* ===== Chat Entry ===== */
.chat-entry-wrap { padding-top: 60px; }
.chat-entry-greeting {
  font-size: 18px; font-weight: 600; text-align: center; margin-bottom: 24px;
  color: var(--green-dark);
}
.scene-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.scene-card {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-radius: var(--radius-sm); background: white; box-shadow: var(--shadow);
  cursor: pointer; transition: all 0.2s; border: 2px solid transparent;
}
.scene-card:active { border-color: var(--green); transform: scale(0.98); }
.scene-emoji { font-size: 20px; }
.scene-label { font-size: 15px; }

/* ===== Chat ===== */
#screen-chat { padding: 0; display: flex; flex-direction: column; }
#screen-chat.active { display: flex; }
.chat-header {
  padding: 16px 20px; background: white; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex; align-items: center; gap: 12px; z-index: 5;
}
.chat-header .back-btn { position: static; padding: 4px; }
.chat-name { font-weight: 700; font-size: 16px; }
.chat-status { font-size: 12px; color: var(--text3); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.msg-bubble {
  max-width: 80%; padding: 12px 16px; border-radius: 18px;
  font-size: 15px; line-height: 1.6; animation: fadeUp 0.3s ease;
}
.msg-ai { background: #E8F5E9; color: var(--text); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg-user { background: var(--green); color: white; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg-typing { align-self: flex-start; }
.typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.typing-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text3);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,60%,100%{ transform:translateY(0) } 30%{ transform:translateY(-6px) } }

.chat-quick {
  padding: 8px 20px; display: flex; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.quick-btn {
  padding: 8px 16px; border-radius: 20px; background: #E8F5E9;
  border: 1px solid var(--green-light); font-size: 13px; color: var(--green-dark);
  cursor: pointer; transition: all 0.2s;
}
.quick-btn:active { background: var(--green); color: white; }

.crisis-banner {
  padding: 10px 20px; background: var(--red); color: white; text-align: center;
  font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.crisis-phone { color: white; font-weight: 700; text-decoration: underline; }

.chat-input-bar {
  padding: 12px 16px; background: white; display: flex; gap: 8px; align-items: center;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.06); padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.chat-text-input {
  flex: 1; padding: 10px 16px; border-radius: 20px; border: 1px solid #E0E0E0;
  font-size: 15px; outline: none; background: #F8F8F8;
}
.chat-text-input:focus { border-color: var(--green); background: white; }
.chat-send-btn {
  padding: 10px 20px; border-radius: 20px; background: var(--green);
  color: white; font-size: 14px; font-weight: 600; border: none; cursor: pointer;
  white-space: nowrap;
}

/* ===== Emergency ===== */
.emergency-wrap { padding-top: 60px; }
.emergency-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.emergency-card {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  border-radius: var(--radius); background: white; box-shadow: var(--shadow);
  cursor: pointer; transition: all 0.2s; border: 2px solid transparent;
}
.emergency-card:active { border-color: var(--green); }
.em-icon { font-size: 32px; }
.em-label { font-size: 17px; font-weight: 700; }
.em-desc { font-size: 13px; color: var(--text2); }
.emergency-hotline { display: flex; flex-direction: column; gap: 10px; }
.hotline-title { font-size: 14px; color: var(--text2); margin-bottom: 4px; }
.hotline-btn {
  display: block; padding: 14px; border-radius: var(--radius-sm); text-align: center;
  text-decoration: none; font-size: 15px; font-weight: 600;
  background: #FFF3F0; color: var(--red); border: 1px solid rgba(231,76,60,0.2);
}
.emergency-110 { background: var(--red); color: white; border-color: var(--red); }

.hotline-link {
  display: block; padding: 10px 0; text-decoration: none; color: var(--text2); font-size: 14px;
}

/* ===== Breathing ===== */
.breathing-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.breath-round { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 32px; }
.bubble-container { width: 160px; height: 160px; display: flex; align-items: center; justify-content: center; margin-bottom: 32px; }
.bubble {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(123,198,126,0.6), rgba(123,198,126,0.2));
  border: 2px solid rgba(123,198,126,0.4);
  transition: width 0.5s, height 0.5s;
}
.bubble.inhale { width: 140px; height: 140px; transition-duration: 4s; }
.bubble.hold { width: 140px; height: 140px; }
.bubble.exhale { width: 40px; height: 40px; transition-duration: 6s; }
.breath-text { font-size: 24px; font-weight: 600; color: rgba(255,255,255,0.9); margin-bottom: 32px; min-height: 36px; }

/* ===== Grounding ===== */
.grounding-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 60px; }
.ground-card { background: white; border-radius: 20px; padding: 32px 24px; text-align: center; box-shadow: var(--shadow); width: 100%; max-width: 360px; }
.ground-sense { font-size: 28px; margin-bottom: 12px; }
.ground-instruction { font-size: 15px; color: var(--text2); line-height: 1.6; margin-bottom: 24px; }
.ground-circles { display: flex; justify-content: center; gap: 12px; }
.ground-circle {
  width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--green-light);
  cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.ground-circle.filled { background: var(--green); border-color: var(--green); }
.ground-done { text-align: center; margin-top: 32px; }
.ground-done h2 { font-size: 24px; margin-bottom: 8px; color: var(--green-dark); }
.ground-done p { font-size: 15px; color: var(--text2); margin-bottom: 24px; }

/* ===== Settings ===== */
.settings-wrap { padding-top: 60px; padding-bottom: 40px; }
.setting-item { margin-bottom: 14px; }
.setting-item label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.setting-select {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 2px solid #E0E0E0; font-size: 15px; background: white;
}
.setting-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #E8E8E8; }
.setting-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }

/* ===== Crisis Full Screen ===== */
.crisis-wrap { text-align: center; padding: 40px 24px; max-width: 400px; }
.crisis-title { font-size: 28px; font-weight: 800; color: white; margin-bottom: 40px; line-height: 1.4; }
.crisis-btn {
  display: block; padding: 18px; border-radius: var(--radius); text-align: center;
  text-decoration: none; font-size: 18px; font-weight: 700; margin-bottom: 16px;
  background: rgba(255,255,255,0.15); color: white; border: 2px solid rgba(255,255,255,0.3);
}
.crisis-btn-110 { background: var(--red); border-color: var(--red); }

/* ===== Awareness Level Bar ===== */
.level-bar {
  margin: 8px 20px 16px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.7);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
.level-info {
  font-size: 14px;
  font-weight: 600;
  color: #33691e;
  margin-bottom: 6px;
}
.level-progress {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
.level-fill {
  height: 100%;
  background: linear-gradient(90deg, #66bb6a, #43a047);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.level-xp {
  font-size: 11px;
  color: #757575;
}

/* ===== Level Up Overlay ===== */
.levelup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}
.levelup-content {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9, #a5d6a7);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  max-width: 280px;
  animation: cardAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 40px rgba(76, 175, 80, 0.4);
}
.levelup-emoji {
  font-size: 56px;
  margin-bottom: 8px;
  animation: starPulse 1.5s ease-in-out infinite;
}
.levelup-title {
  font-size: 22px;
  font-weight: 700;
  color: #1b5e20;
  margin-bottom: 4px;
}
.levelup-name {
  font-size: 18px;
  font-weight: 600;
  color: #2e7d32;
  margin-bottom: 8px;
}
.levelup-desc {
  font-size: 15px;
  color: #33691e;
  font-weight: 500;
  margin-bottom: 4px;
}
.levelup-subdesc {
  font-size: 13px;
  color: #558b2f;
  margin-bottom: 20px;
}
.levelup-btn {
  background: #43a047;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ===== Superpower Card ===== */
.superpower-card {
  margin: 16px auto;
  max-width: 280px;
  animation: cardAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sp-card-inner {
  background: linear-gradient(135deg, #fff8e1, #fff3c4, #ffe082);
  border: 2px solid #ffd54f;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(255, 193, 7, 0.3), 0 0 40px rgba(255, 193, 7, 0.1);
  position: relative;
  overflow: hidden;
}
.sp-card-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255,215,0,0.1), transparent, rgba(255,215,0,0.1), transparent);
  animation: cardShimmer 3s linear infinite;
}
.sp-card-star {
  font-size: 36px;
  margin-bottom: 8px;
  animation: starPulse 2s ease-in-out infinite;
}
.sp-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #e65100;
  margin-bottom: 6px;
  position: relative;
}
.sp-card-desc {
  font-size: 13px;
  color: #5d4037;
  line-height: 1.5;
  position: relative;
}
.sp-card-footer {
  margin-top: 12px;
  font-size: 11px;
  color: #bf360c;
  opacity: 0.7;
  position: relative;
}

@keyframes cardAppear {
  0% { opacity: 0; transform: scale(0.3) rotate(-10deg); }
  60% { opacity: 1; transform: scale(1.05) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes cardShimmer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes starPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ===== Donate ===== */
.btn-donate {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}
.donate-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.donate-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  max-width: 300px;
  width: 85%;
  animation: cardAppear 0.5s ease;
}
.donate-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}
.donate-desc {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}
.donate-qr {
  width: 220px;
  height: auto;
  border-radius: 12px;
}

/* ===== Chat Voice Button ===== */
.chat-voice-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  border-radius: 50%;
  transition: background 0.2s;
}
.chat-voice-btn.voice-active {
  background: #ef5350;
  animation: voicePulse 1.2s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,83,80,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239,83,80,0); }
}

/* ===== Voice Preview ===== */
.voice-preview {
  min-height: 20px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  text-align: center;
  margin-bottom: 12px;
  font-style: italic;
}
.voice-entry {
  padding: 8px 12px;
  margin: 6px 0;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #eee;
  font-size: 14px;
  line-height: 1.5;
}
.voice-icon { margin-right: 6px; }
.voice-text { opacity: 0.9; }

/* ===== Animations ===== */
.fade-in { animation: fadeUp 0.3s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
