/* =========================================
   ✨✨✨ 全局基础样式 ✨✨✨
   ========================================= */
/* 1. 字体栈优化 */
body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 500;
  background: #05070f;
  color: #fff;
  height: 100dvh; 
  overflow: hidden;
  display: flex;
  justify-content: center;
}

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

/* 动态背景 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(5,7,15,0.7), rgba(5,7,15,0.7)), url("大背景.jpg") no-repeat center center;
  background-size: cover;
  filter: blur(18px);
  transform: scale(1.1);
  z-index: -1;
}

/* === 页面容器 === */
.app-container {
  width: 100%;
  max-width: 420px;
  height: 100%;
  position: relative;
  background: linear-gradient(rgba(11,15,26,0.6), rgba(11,15,26,0.6)), url("聊天背景.jpg") no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 电脑端适配 */
@media (min-width: 450px) {
  .app-container {
    border-radius: 16px;
    max-height: 720px;
    margin-top: auto; 
    margin-bottom: auto;
  }
}

/* =========================================
   ✨✨✨ 1. 聊天界面 (Chat View) ✨✨✨
   ========================================= */
#view-chat {
  display: flex; 
  flex-direction: column;
  height: 100%;
}

.header {
  padding-top: max(10px, calc(env(safe-area-inset-top) - 10px));
  padding-bottom: 6px; 
  text-align: center;
  background: rgba(255,255,255,0.08); 
  backdrop-filter: blur(5px);
  z-index: 10;
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  padding-top: 20px; 
}

.header-status {
  font-size: 10px;
  font-weight: 400;
  color: #badc58;
  opacity: 0.9;
  margin-top: 5px; 
  letter-spacing: 0.5px;
}

/* 按钮组 */
.icon-btn {
  width: 40px; 
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn img { width: 24px; height: 24px; filter: invert(1); }

.btn-group-left {
  position: absolute; left: 4px; top: 0; height: 100%;
  padding-top: max(10px, calc(env(safe-area-inset-top) - 10px));
  display: flex; gap: 0; z-index: 20;
}

.btn-left { 
  position: absolute; left: 4px; top: 0;
  padding-top: max(40px, calc(env(safe-area-inset-top) - 10px)); 
}

.btn-right { 
  position: absolute; right: 4px; top: 0;
  padding-top: max(40px, calc(env(safe-area-inset-top) - 10px)); 
}

/* 消息列表 */
.messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
}
.messages::-webkit-scrollbar { display: none; }

.message { display: flex; align-items: flex-end; margin-bottom: 12px; }
.message.me { justify-content: flex-end; }

/* 气泡样式 */
.msg {
  max-width: 75%;
  padding: 8px 12px;
  line-height: 1.5;
  border-radius: 12px;
  word-wrap: break-word;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transition: filter 0.2s, transform 0.1s;
}
.message.me .msg {
  background: linear-gradient(135deg, rgba(255,179,122,0.45), rgba(255,159,90,0.35));
  backdrop-filter: blur(6px);
  border-bottom-right-radius: 4px;
  color: #271910;
}
.message.him .msg { background: rgba(255,255,255,0.15); border-bottom-left-radius: 4px; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; margin: 0 6px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.6); 
}
.message.me .avatar {
  box-shadow: 0 0 0 2px rgba(255, 179, 122, 0.6);
  filter: drop-shadow(0 2px 4px rgba(255, 159, 90, 0.3));
}

/* 底部输入区 */
.input-area {
  position: relative;
  display: flex;
  align-items: flex-end;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(5,7,15,0.95); 
  padding-bottom: max(10px, env(safe-area-inset-bottom)); 
  padding-top: 10px;
  padding-left: 5px;
  padding-right: 5px;
  flex-shrink: 0;
  min-height: 56px;
}

.input-area textarea {
  flex: 1; 
  height: 36px; max-height: 120px;
  padding: 8px 15px;
  border: 1px solid rgba(255,255,255,0.1); 
  background: rgba(255,255,255,0.08); 
  border-radius: 20px; 
  color: #fff; 
  font-size: 15px; 
  font-family: inherit;
  outline: none;
  margin: 0 8px; margin-bottom: 0px; 
  transition: background 0.3s;
  resize: none; overflow-y: auto; line-height: 20px;
}
.input-area textarea:focus { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); }

.input-area button {
  padding: 8px; 
  background: none; border: none;
  display: flex; align-items: center; justify-content: center;
  height: 36px; margin-bottom: 0px; 
}
.input-area button img { width: 26px; height: 26px; filter: invert(0.9); }

/* 录音中的呼吸动画 */
.recording-pulse img {
  animation: recPulse 1.5s infinite;
}
@keyframes recPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* 图片消息 */
.msg.has-image {
  padding: 5px !important;    
  background: rgba(255, 179, 122, 0.2) !important; 
  border: 1px solid rgba(255, 179, 122, 0.3);
  display: inline-block !important; 
  width: auto !important;
}
.chat-image-bubble {
  max-width: 140px !important; 
  width: auto !important;      
  height: auto !important;     
  border-radius: 10px;         
  display: block;              
  margin: 0;
}
.message.preview .msg { opacity: 0.7; }

/* 引用预览条 */
#quote-bar {
  position: absolute;
  bottom: 100%; left: 0; width: 100%; height: 35px;
  background: rgba(20, 22, 30, 0.4); backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.15); border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex; align-items: center; justify-content: space-between; padding: 0 12px; z-index: 50; 
  animation: slideUp 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#quote-bar::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; background: #ffb37a; border-radius: 0 4px 4px 0;
  box-shadow: 2px 0 8px rgba(255, 179, 122, 0.4);
}
.quote-content {
  flex: 1; font-size: 13px; color: rgba(255, 255, 255, 0.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
  margin-right: 10px; padding-left: 6px; display: flex; align-items: center;
}
.quote-label { color: #ffb37a; font-weight: 700; margin-right: 6px; opacity: 0.9; }
.quote-close {
  width: 32px; height: 100%; background: transparent; 
  color: rgba(255, 255, 255, 0.4); display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 300; cursor: pointer; transition: all 0.2s; margin-right: -8px;
}
.quote-close:active { color: #fff; transform: scale(1.1); }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.msg-quote {
  font-size: 12px; margin-bottom: 6px; padding: 6px 10px; border-radius: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;
}
.message.me .msg-quote { background: rgba(39, 25, 16, 0.08); border-left: 3px solid rgba(39, 25, 16, 0.3); color: rgba(39, 25, 16, 0.7); }
.message.him .msg-quote { background: rgba(255, 255, 255, 0.1); border-left: 3px solid rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.7); }

/* =========================================
   ✨✨✨ 2. 设置/档案界面 (Settings View) ✨✨✨
   ========================================= */
#view-settings {
  display: none; 
  flex-direction: column;
  height: 100%;
  background: rgba(0,0,0,0.6);
}

.tabs { display: flex; background: rgba(0,0,0,0.2); padding: 4px; flex-shrink: 0; }
.tab-btn {
  flex: 1; text-align: center; padding: 12px 0; font-size: 14px;
  color: rgba(255,255,255,0.5); position: relative; transition: all 0.3s;
}
.tab-btn.active { color: #fff; font-weight: 700; }
.tab-btn.active::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; background: #ffb37a; border-radius: 2px;
}

.content-area {
  flex: 1; padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.memory-card {
  background: rgba(255, 255, 255, 0.08); padding: 16px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 12px;
  transition: all 0.3s ease;
}

/* =========================================
   ✨✨✨ [重点优化 V3] Evol 能量监控卡片 (呼吸增强版) ✨✨✨
   ========================================= */
.status-main-card {
  display: flex;
  align-items: center;
  justify-content: center; /* 内容整体水平居中 */
  padding: 24px 20px;
  cursor: pointer;
  position: relative;
  overflow: visible; /* ✨ 允许光晕溢出，呼吸感更强 */
  gap: 20px;
  border-radius: 16px; /* 圆角稍微加大一点 */
  background: rgba(255, 255, 255, 0.08); /* 极淡的背景衬托 */
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.status-main-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.05);
}

/* 能量圆环容器 */
.energy-ring-container {
  width: 64px; height: 64px; position: relative; flex-shrink: 0;
}

/* 能量圆环 SVG */
.energy-ring { transform: rotate(-90deg); width: 100%; height: 100%; overflow: visible; /* ✨ 允许 SVG 光晕溢出 */ }
.energy-ring circle { fill: transparent; stroke-width: 5; stroke-linecap: round; }
.ring-bg { stroke: rgba(255, 255, 255, 0.1); }

/* 默认状态（绿色健康） */
.ring-progress {
  stroke: #badc58; 
  stroke-dasharray: 176; stroke-dashoffset: 0; 
  transition: stroke-dashoffset 1s ease, stroke 0.5s ease, filter 0.5s ease;
  /* 默认绿色微光 */
  filter: drop-shadow(0 0 6px rgba(186, 220, 88, 0.5));
}

/* 能量数值 */
.energy-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 15px; font-weight: 700; color: #fff; font-family: monospace;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* 卡片右侧信息 */
.energy-info { display: flex; flex-direction: column; justify-content: center; }

/* ✨ 标题：增加科技感白色外发光 ✨ */
.energy-title {
  font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 6px; letter-spacing: 1px;
  /* 双层发光：一层紧实，一层扩散 */
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8), 0 0 15px rgba(255, 255, 255, 0.4);
}

.energy-sub {
  font-size: 12px; color: rgba(255, 255, 255, 0.5); font-family: monospace;
}

/* =========================================
   ✨✨✨ 新增：中电量黄色预警 (20% - 50%) ✨✨✨
   ========================================= */

/* 1. 圆环：金黄色 + 静态微光 (无呼吸) */
.status-main-card.medium-power .ring-progress {
  stroke: #ffcc00; /* 明亮的金黄色 */
  filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.6)); /* 黄色光晕 */
  animation: none; /* 🚫 确保没有呼吸动画 */
}

/* 2. 文字：金黄色 */
.status-main-card.medium-power .energy-text {
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

/* 3. 标题和边框：保持默认 (和绿色一致) */
.status-main-card.medium-power .energy-title {
  color: #fff; /* 标题保持白色 */
}
.status-main-card.medium-power {
  border-color: rgba(255, 255, 255, 0.05); /* 边框保持默认的微白 */
  box-shadow: none; /* 无特殊阴影 */
}

/* 3. 文字：变黄 */
.status-main-card.medium-power .energy-text {
  color: #ffce56;
  text-shadow: 0 0 8px rgba(255, 206, 86, 0.4);
}
/* 🔴🔴🔴 低电量红色警报模式 (核能呼吸版) 🔴🔴🔴 */
/* 1. 卡片边框：跟随呼吸 */
.status-main-card.low-power {
  border-color: rgba(255, 71, 87, 0.6);
  animation: borderPulse 2s infinite ease-in-out; /* 边框也跟着闪 */
}

/* 2. 圆环：变红 + 亮度/粗细双重呼吸 */
.status-main-card.low-power .ring-progress {
  stroke: #ff4757; 
  /* 移除默认滤镜，完全交给动画控制 */
  filter: none; 
  animation: ringPulseHard 1.5s infinite ease-in-out; /* 节奏加快到1.5秒 */
}

/* 3. 文字：保持常亮红 */
.status-main-card.low-power .energy-text {
  color: #ff4757; 
  text-shadow: 0 0 10px rgba(255, 71, 87, 0.8);
}

/* ✨ 动画A：圆环强力脉冲 (颜色变亮 + 阴影炸开 + 线条微变粗) */
@keyframes ringPulseHard {
  0% {
    stroke: #ff4757; /* 普通红 */
    stroke-width: 5; /* 正常粗细 */
    filter: drop-shadow(0 0 2px rgba(255, 71, 87, 0.3)); /* 黯淡 */
    opacity: 0.7;
  }
  50% {
    stroke: #ff7e90; /* ✨ 高亮粉红 (看起来像发光核心) */
    stroke-width: 6; /* ✨ 微微变粗，模拟膨胀感 */
    filter: drop-shadow(0 0 18px rgba(255, 71, 87, 1)); /* ✨ 强光晕 */
    opacity: 1;
  }
  100% {
    stroke: #ff4757;
    stroke-width: 5;
    filter: drop-shadow(0 0 2px rgba(255, 71, 87, 0.3));
    opacity: 0.7;
  }
}

/* ✨ 动画B：边框微弱呼应 */
@keyframes borderPulse {
  0%, 100% { box-shadow: inset 0 0 5px rgba(255, 71, 87, 0); }
  50% { box-shadow: inset 0 0 20px rgba(255, 71, 87, 0.2); }
}

/* ✨ 呼吸动画定义 */
@keyframes ringBreathe {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 71, 87, 0.5)); stroke-opacity: 0.8; }
  50% { filter: drop-shadow(0 0 15px rgba(255, 71, 87, 1)); stroke-opacity: 1; }
}

/* --- 滑块部分 --- */
.card-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; /* 关键：垂直居中 */
  margin-bottom: 12px; 
}

.tag { font-size: 10px; padding: 2px 8px; border-radius: 20px; background: rgba(255,179,122,0.2); color: #ffb37a; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card-desc { font-size: 13px; color: rgba(255,255,255,0.7); outline: none; padding: 2px; }

.slider-container {
  display: flex; align-items: center; gap: 10px; margin-top: 15px; margin-bottom: 5px;
}
.slider-label { font-size: 11px; color: rgba(255,255,255,0.4); width: 30px; text-align: center; }

.evol-slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 6px; background: rgba(0,0,0,0.3);
  border-radius: 3px; outline: none; position: relative;
}
.evol-slider::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #a29bfe, #ffb37a); 
}
.evol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  margin-top: -7px; border: 2px solid rgba(162, 155, 254, 0.5);
}

@keyframes breathe { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } }
.typing { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.7); margin-left: 42px; margin-bottom: 8px; animation: breathe 1.4s infinite; }
.typing-star { width: 14px; fill: #C0C0C0; }

.tab-page { display: none; flex-direction: column; gap: 12px; }
.tab-page.active { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   ✨✨✨ 3. 主页 (Home View) ✨✨✨
   ========================================= */
#view-home {
  width: 100%; height: 100%; position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); 
}

.home-core { display: flex; flex-direction: column; align-items: center; margin-bottom: 80px; }
.breathing-circle {
  width: 120px; height: 120px; border-radius: 50%; padding: 6px;
  border: 1px solid rgba(255, 179, 122, 0.3);
  box-shadow: 0 0 20px rgba(255, 179, 122, 0.2);
  animation: core-breathe 3s infinite ease-in-out;
  display: flex; justify-content: center; align-items: center;
}
.core-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; opacity: 0.9; }
.core-text { margin-top: 20px; font-family: monospace; font-size: 12px; color: rgba(255,255,255,0.5); letter-spacing: 2px; text-transform: uppercase; }
@keyframes core-breathe {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 179, 122, 0.1); border-color: rgba(255, 179, 122, 0.2); transform: scale(1); }
  50% { box-shadow: 0 0 35px rgba(255, 179, 122, 0.5); border-color: rgba(255, 179, 122, 0.6); transform: scale(1.02); }
}

/* 扇形菜单 */
.fan-menu-container {
  position: absolute; left: 60px;
  bottom: max(50px, env(safe-area-inset-bottom));
  width: 50px; height: 50px; z-index: 100;
}
.fan-trigger {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; cursor: pointer;
  position: relative; z-index: 2;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fan-menu-active .fan-trigger { transform: rotate(45deg); background: rgba(255, 179, 122, 0.2); border-color: #ffb37a; }
.fan-item {
  position: absolute; left: 5px; top: 5px;
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent !important; border: none !important; box-shadow: none !important;        
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.fan-item img { width: 60px !important; height: 60px !important; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.fan-menu-active .item-1 { transform: translateY(-100px) scale(1); opacity: 0.6; pointer-events: auto; }
.fan-menu-active .item-2 { transform: translate(80px, -80px) scale(1); opacity: 0.6; pointer-events: auto; }
.fan-menu-active .item-3 { transform: translateX(100px) scale(1); opacity: 0.6; pointer-events: auto; }

/* 聊天入口 */
.chat-entry-btn {
  position: absolute; right: 45px;
  bottom: max(40px, env(safe-area-inset-bottom));
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #ffb37a, #ff9f43);
  box-shadow: 0 8px 20px rgba(255, 159, 67, 0.4);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  animation: heartbeat 3s infinite;
}
.chat-entry-btn img { width: 32px; height: 32px; filter: brightness(0) invert(1); }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); box-shadow: 0 12px 25px rgba(255, 159, 67, 0.6); } }

/* =========================================
   ✨✨✨ 猎人档案 (World Book) ✨✨✨
   ========================================= */
#worldbook-container { display: flex; flex-direction: column; gap: 12px; }
.wb-card {
  background: rgba(255, 255, 255, 0.08); 
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; padding: 16px; position: relative;
  transition: all 0.2s; cursor: pointer; overflow: hidden;
}
.wb-card:active { background: rgba(255, 255, 255, 0.12); transform: scale(0.98); }
.wb-card::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; background: #ffb37a; border-radius: 0 4px 4px 0;
  box-shadow: 2px 0 8px rgba(255, 179, 122, 0.4);
}
.wb-header { display: flex; align-items: center; gap: 10px; }
.wb-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }
.wb-pin-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; transition: all 0.2s;
}
.wb-pin-btn img { width: 20px; height: 20px; filter: invert(1) opacity(0.2); transition: all 0.3s; }
.wb-pin-btn.active img {
  filter: invert(86%) sepia(18%) saturate(1149%) hue-rotate(323deg) brightness(101%) contrast(101%) opacity(1) drop-shadow(0 0 5px rgba(255, 179, 122, 0.6));
  transform: rotate(-45deg) scale(1.15);
}
.wb-card.pinned {
  border-color: rgba(255, 179, 122, 0.5); 
  background: linear-gradient(145deg, rgba(255, 179, 122, 0.1), rgba(255, 255, 255, 0.05));
  order: -1; 
}
.wb-card.pinned::before { box-shadow: 2px 0 12px rgba(255, 179, 122, 0.8); }
.wb-content {
  font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.5; padding-left: 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.add-card-btn {
  margin-top: 15px; border: 1px dashed rgba(255, 255, 255, 0.3); border-radius: 12px;
  padding: 14px; text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 14px;
  cursor: pointer; background: rgba(0,0,0,0.1); transition: all 0.2s;
}
.add-card-btn:active { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.5); color: #fff; }

/* =========================================
   ✨✨✨ 通用弹窗 (Modal) ✨✨✨
   ========================================= */
.modal {
  position: fixed; inset: 0; z-index: 2000; 
  background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(8px);      
  display: flex; justify-content: center; align-items: center; 
  padding: 20px; animation: fadeIn 0.2s ease-out;
}
.modal-content {
  width: 100%; max-width: 340px; height: auto; max-height: 70vh; 
  background: rgba(20, 22, 31, 0.95); border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  display: flex; flex-direction: column; animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); 
}
.modal-header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
.modal-title { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }
.modal-close {
  font-size: 18px; color: rgba(255,255,255,0.4); width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,0.05); cursor: pointer; transition: all 0.2s;
}
.modal-close:active { background: rgba(255,255,255,0.15); color: #fff; }
.modal-body { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-body label { font-size: 13px; color: #ffb37a; margin-bottom: -8px; font-weight: 600; margin-left: 4px; }
.modal-body input, .modal-body textarea {
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  padding: 14px; color: #fff; font-family: inherit; font-size: 15px; outline: none; transition: all 0.3s;
}
.modal-body input:focus, .modal-body textarea:focus { border-color: rgba(255, 179, 122, 0.5); background: rgba(0,0,0,0.4); }
.modal-body textarea { min-height: 120px; resize: none; line-height: 1.6; }
.modal-footer { padding: 20px 24px; display: flex; justify-content: space-between; gap: 15px; }
.btn-delete {
  color: rgba(255, 107, 107, 0.8); background: rgba(255, 107, 107, 0.1);
  border: none; font-size: 14px; padding: 12px 20px; border-radius: 12px; font-weight: 600;
}
.btn-save {
  flex: 1; background: linear-gradient(135deg, #ffb37a, #ff9f43);
  color: #271910; border: none; border-radius: 12px; padding: 12px 24px;
  font-weight: 700; font-size: 15px; box-shadow: 0 4px 15px rgba(255, 159, 67, 0.25);
}
.btn-save:active { transform: scale(0.98); }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.9) translateY(20px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }

/* =========================================
   ✨✨✨ 气泡长按菜单 ✨✨✨
   ========================================= */
#bubble-menu {
  position: fixed; z-index: 9999;
  background: rgba(20, 22, 30, 0.75); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 0; display: none; flex-direction: row; overflow: hidden;
  animation: menuPopScale 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.menu-option {
  padding: 8px 14px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.9);
  white-space: nowrap; cursor: pointer; border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; gap: 6px; transition: all 0.2s;
}
.menu-option:last-child { border-right: none; }
.menu-option:active { background: rgba(255, 179, 122, 0.15); color: #ffb37a; }
#bubble-menu::after {
  content: ""; position: absolute; width: 8px; height: 8px;
  background: rgba(20, 22, 30, 0.95); 
  border-right: 1px solid rgba(255, 255, 255, 0.12); border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  left: 50%; margin-left: -4px; bottom: -4px; transform: rotate(45deg); z-index: -1; 
}
#bubble-menu.arrow-up::after { top: -4px; bottom: auto; border-bottom: none; border-right: none; border-top: 1px solid rgba(255, 255, 255, 0.12); border-left: 1px solid rgba(255, 255, 255, 0.12); }
.msg.active-press { filter: brightness(0.9); transform: scale(0.97); }
@keyframes menuPopScale { 0% { opacity: 0; transform: scale(0.8) translateY(10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }

/* =========================================
   ✨✨✨ 星之频段 (Mind Card) ✨✨✨
   ========================================= */
#mind-modal {
  background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(10px);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
}

.mind-card {
  width: 85%; height: 65vh; max-height: 800px;
  background: rgba(20, 22, 35, 0.7); 
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(162, 155, 254, 0.25); border-radius: 24px;
  padding: 24px; position: relative;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(108, 92, 231, 0.2); 
  animation: mindPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mind-header {
  flex-shrink: 0; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 12px;
}
.mind-title-group { display: flex; align-items: center; gap: 8px; }
.mind-icon { color: #a29bfe; font-size: 18px; animation: starTwinkle 2s infinite; }
.mind-title-text { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 2px; text-shadow: 0 0 15px rgba(162, 155, 254, 0.6); }
.mind-signal { font-size: 11px; color: #a29bfe; font-family: monospace; background: rgba(162, 155, 254, 0.15); padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(162, 155, 254, 0.2); }
.mind-label { font-size: 12px; color: #a29bfe; margin-bottom: 8px; font-weight: 600; letter-spacing: 1px; opacity: 0.8; }

/* 滚动优化：心声部分 */
.voice-section {
  flex: 2; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: flex-start; /* 顶部对齐 */
  overflow: hidden; 
  padding: 0 10px;
}

.mind-section .mind-label { 
  flex-shrink: 0; 
  margin-top: 5px; 
  margin-bottom: 15px; 
  width: 100%;
  text-align: center;
}

#mind-voice-text {
  margin: 0; width: 100%; flex: 1;
  font-size: 14px; font-weight: 500; 
  color: #fff; line-height: 1.8; 
  font-style: italic; text-align: center; 
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6); 
  overflow-y: auto; display: block; white-space: pre-wrap; 
  scrollbar-width: none;
}
#mind-voice-text::-webkit-scrollbar { display: none; }

.mind-divider-container { flex-shrink: 0; height: 40px; display: flex; align-items: center; justify-content: center; opacity: 0.9; margin: 5px 0; }
.frequency-wave { display: flex; align-items: center; gap: 5px; height: 100%; }
.frequency-wave span { display: block; width: 4px; height: 10px; background: #a29bfe; border-radius: 4px; animation: waveJump 1.2s infinite ease-in-out; box-shadow: 0 0 10px rgba(162, 155, 254, 0.8); }
.frequency-wave span:nth-child(odd) { animation-duration: 0.8s; background: #6c5ce7; }
.frequency-wave span:nth-child(2n) { animation-duration: 1.1s; }
.frequency-wave span:nth-child(3n) { animation-duration: 1.4s; }
.frequency-wave span:nth-child(4n) { animation-duration: 0.9s; }

.note-section {
  flex: 3; background: rgba(0, 0, 0, 0.25); border-radius: 16px; padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; overflow: hidden;
}
#mind-note-text { flex: 1; font-size: 13px; color: rgba(255, 255, 255, 0.7); line-height: 1.6; overflow-y: auto; white-space: pre-wrap; }

@keyframes mindPop { 0% { opacity: 0; transform: scale(0.95) translateY(30px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes starTwinkle { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); text-shadow: 0 0 8px #a29bfe; } }
@keyframes waveJump { 0%, 100% { height: 6px; opacity: 0.5; } 50% { height: 35px; opacity: 1; } }

/* =========================================
   📖 航行日志 (Voyage Log) UI ✨✨✨
   ========================================= */
.log-book {
  width: 85%; height: 60vh; max-height: 600px;
  background: rgba(67, 63, 83, 0.2); 
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(162, 155, 254, 0.3); 
  box-shadow: 0 0 30px rgba(162, 155, 254, 0.15), inset 0 0 60px rgba(53, 47, 65, 0.5); 
  border-radius: 16px;
  display: flex; flex-direction: column; padding: 24px;
  position: relative; overflow: hidden;
  animation: bookOpen 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.log-book::before {
  content: ""; position: absolute; top: 0; left: 24px; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}
.log-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-left: 16px; 
}
.log-date-group { display: flex; align-items: center; gap: 10px; }
.log-day { font-size: 36px; font-weight: 700; color: #a29bfe; font-family: sans-serif; line-height: 1; text-shadow: 0 0 10px rgba(162, 155, 254, 0.3); }
.log-meta { display: flex; flex-direction: column; justify-content: center; }
.log-month { font-size: 12px; color: rgba(255,255,255,0.8); letter-spacing: 2px; font-weight: 700; }
.log-weather { font-size: 10px; color: rgba(255,255,255,0.4); }

.log-nav { display: flex; gap: 8px; }
.nav-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05);
  color: #cfbcef; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.nav-btn:active { background: rgba(255,255,255,0.2); transform: scale(0.95); }

.log-content-area {
  flex: 1; background: rgba(255, 255, 255, 0.03);
  border-radius: 8px; padding: 16px; margin-left: 16px; 
  display: flex; flex-direction: column; overflow: hidden;
}
.log-title { font-size: 16px; color: #fff; font-weight: 600; margin-bottom: 10px; }
.log-divider { height: 1px; background: rgba(255,255,255,0.1); margin-bottom: 12px; width: 100%; }
.log-text {
  flex: 1; font-size: 14px; color: rgba(255,255,255,0.75); line-height: 1.8;
  overflow-y: auto; white-space: pre-wrap; text-align: justify;
}
.log-footer {
  margin-top: 16px; text-align: right;
  font-family: cursive, serif; 
  font-size: 14px; color: rgba(255,255,255,0.3); font-style: italic;
}
@keyframes bookOpen {
  from { opacity: 0; transform: scale(0.9) rotateY(-10deg); }
  to { opacity: 1; transform: scale(1) rotateY(0); }
}

.log-stars {
  position: absolute; left: 24px; bottom: 20px; 
  display: flex; gap: 4px; z-index: 5; pointer-events: none; 
}
.log-stars span {
  color: #a29bfe; font-size: 16px; 
  animation: starGlow 3s infinite ease-in-out;
  text-shadow: 0 0 8px rgba(162, 155, 254, 0.6); 
}
.log-stars span:nth-child(1) { animation-delay: 0s; transform: scale(1); }
.log-stars span:nth-child(2) { animation-delay: 1s; transform: scale(0.7); opacity: 0.8; } 
.log-stars span:nth-child(3) { animation-delay: 2s; transform: scale(0.9); }
@keyframes starGlow {
  0%, 100% { opacity: 0.4; transform: scale(0.9); text-shadow: 0 0 5px rgba(162, 155, 254, 0.4); }
  50% { opacity: 1; transform: scale(1.1); text-shadow: 0 0 12px rgba(162, 155, 254, 0.9); }
}

/* =========================================
   ✨✨✨ 待办日程 (To-Do) UI (优化版) ✨✨✨
   ========================================= */

/* 日期导航头 (去框去背景版) */
.todo-header-nav {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  background: transparent; 
  border: none;
  padding: 10px 16px; 
  margin-bottom: 15px;
}

.todo-date-display { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
}

#todo-date-day { 
  font-size: 20px; 
  font-weight: 700; 
  color: #ffb37a; 
  font-family: sans-serif; 
}

#todo-date-month { 
  font-size: 11px; 
  color: rgba(255,255,255,0.6); 
  letter-spacing: 2px; 
  font-weight: 600;
}

.nav-arrow {
  background: none; 
  border: none; 
  color: rgba(255,255,255,0.6);
  font-size: 20px; 
  padding: 5px 10px; 
  cursor: pointer; 
  transition: all 0.2s;
}
.nav-arrow:active { color: #fff; transform: scale(1.2); }

/* 待办列表 */
.todo-list { display: flex; flex-direction: column; gap: 10px; }

/* 1. 列表条目：紧凑高度 + 弹性对齐 */
.todo-item {
  display: flex; /* 确保整体是Flex容器 */
  align-items: center;
  /* 你要求的紧凑高度：上下4px，左右6px */
  padding: 4px 6px !important; 
  min-height: 36px; /* 给一个最小高度，保证手指能点到 */
  margin-bottom: 6px;
  background: rgba(20, 22, 30, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}
.todo-item:active { background: rgba(255, 255, 255, 0.1); }

/* 2. 内部内容层：确保文字和框垂直居中 */
.todo-content {
  padding: 0 !important; /* 去掉多余内边距 */
  width: 100%;
  display: flex;
  align-items: center; /* 垂直居中核心 */
}

.todo-inner-row {
  display: flex;
  align-items: center; /* 双重保险：垂直居中 */
  width: 100%;
}

/* 3. ✨✨✨ 重点修复：复选框与对钩 ✨✨✨ */
.todo-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  margin: 0 10px 0 0; 
  width: 18px; /* 框的大小 */
  height: 18px;
  border: 1px solid rgba(255, 179, 122, 0.5); /* 金色边框 */
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  cursor: pointer;
  
  /* ✨ 核心修复：用 Grid 布局让对钩死死居中 */
  display: grid;
  place-content: center; 
}

/* 选中状态 */
.todo-item input[type="checkbox"]:checked {
  background: #ffb37a; 
  border-color: #ffb37a;
}

/* 对钩符号 ✔ */
.todo-item input[type="checkbox"]:checked::after {
  content: "✔"; 
  /* 之前的 absolute 定位全部删掉，改用下面的 */
  position: static; 
  transform: none;
  
  color: #2a2a2a; /* 深色对钩 */
  font-size: 12px; /* 控制对钩大小 */
  font-weight: 800;
  line-height: 1; /* 防止行高撑开 */
  display: block;
}

/* 4. 文字样式微调 */
.todo-item label {
  font-size: 13px; /* 字体大小适配紧凑高度 */
  line-height: 1.4;
  margin-top: 2px; /* 微调：视觉上让文字和框中心对齐 */
  color: #fff;
  flex: 1;
}

.todo-item.checked { opacity: 0.6; }
.todo-item.checked label { text-decoration: line-through; color: rgba(255,255,255,0.5); }
.todo-empty { text-align: center; padding: 40px 0; color: rgba(255,255,255,0.3); font-size: 13px; font-style: italic; }

/* 3. 删除按钮层 (底层) */
.delete-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 60px; 
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  z-index: 1; 
  opacity: 0; 
  transition: opacity 0.2s ease;
}

/* SVG 图标样式 */
.delete-icon-svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.5); 
  transition: all 0.2s ease;
}

.delete-btn:active .delete-icon-svg {
  fill: #ff4d4d;
  transform: scale(1.1);
}

/* ============ 堆叠模式 (已完成任务) ============ */

.todo-archive-container {
  margin-top: 15px;
  position: relative;
}

/* 第一条已完成 (开关) */
.todo-item.stack-trigger {
  opacity: 0.6;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  background: transparent; /* 堆叠的第一条可以透一点 */
}

.todo-item.stack-trigger label {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.5);
}

/* 展开时的角标变化 */
.todo-item.stack-trigger.expanded .stack-badge {
  color: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) rotate(180deg); 
}

/* 折叠容器 */
.archive-list-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  margin-left: 15px; 
  border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.archive-list-wrapper.open {
  max-height: 1000px;
  opacity: 1;
  padding-top: 5px;
}

/* 隐藏的已完成项 */
.todo-item.completed-hidden-item {
  opacity: 0.4;
  background: transparent;
  border: none;
}
.todo-item.completed-hidden-item label {
  text-decoration: line-through;
  font-size: 13px;
}

/* =========================================
   ✨✨✨ 历史消息分割线 ✨✨✨
   ========================================= */
.history-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  letter-spacing: 1px;
}

.history-divider::before,
.history-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 12px;
}

/* =========================================
   ✨✨✨ 外观设置弹窗样式 (V15 加固版) ✨✨✨
   ========================================= */

/* 1. 弹窗身体：强制横向排列 */
#avatar-modal .modal-body {
  display: flex !important;
  flex-direction: row !important; /* 横向 */
  justify-content: space-evenly !important; /* 均匀分布 */
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  padding: 30px 10px !important;
  overflow: visible !important; /* 防止阴影被切 */
}

/* 2. 单个设置项 (垂直排列：文字在上，图在下) */
.avatar-setting-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1; /* 平分宽度 */
}

.avatar-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap; /* 不换行 */
}

/* 3. 头像容器 (锁死大小，做成圆形) */
.avatar-upload-box {
  width: 70px !important;  /* 锁死宽度 */
  height: 70px !important; /* 锁死高度 */
  border-radius: 50% !important; /* 强制圆形 */
  
  position: relative;
  cursor: pointer;
  border: 2px solid rgba(255, 179, 122, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden; /* 裁剪图片 */
  transition: all 0.3s ease;
  background: #000; /* 默认黑底 */
}

.avatar-upload-box:active {
  transform: scale(0.95);
  border-color: #ffb37a;
}

/* 4. 图片本身 (完美填充) */
.avatar-preview {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* 关键：保持比例填满 */
  display: block;
}

/* 5. 覆盖层 (加号图标) */
.upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.avatar-upload-box:hover .upload-overlay {
  opacity: 1;
}

/* 隐藏那条多余的分割线，因为我们现在是横排 */
.setting-divider {
  display: none;
}

/* =========================================
   ✨✨✨ 新增：能源周期 & 深色弹窗样式 ✨✨✨
   ========================================= */

/* 1. 能源周期小字样式 */
.energy-runtime {
  font-size: 10px; /* 字体极小，精致感 */
  color: rgba(255, 255, 255, 0.35); /* 很淡的颜色，不抢视觉 */
  font-family: monospace; /* 等宽字体，数字对齐好看 */
  margin-top: 6px; /* 和上面拉开一点距离 */
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* 2. 微调能量卡片文字间距，让整体更紧凑 */
.energy-title {
  margin-bottom: 4px !important; /* 缩小标题下方的间距 */
}
.energy-sub {
  font-size: 12px;
  opacity: 0.8;
}

/* =========================================
   ✨✨✨ [UI终极微调] 通用深色弹窗 (水晶玻璃版) ✨✨✨
   ========================================= */

/* 1. 全屏遮罩：极低存在感，不模糊，微弱压暗 */
#global-confirm-modal {
  background: rgba(0, 0, 0, 0.2) !important; /* 稍微加深一点点点，为了衬托水晶质感 */
  backdrop-filter: none !important; /* 🚫 严禁模糊全屏背景 */
}

/* 2. 弹窗盒子：高通透玻璃感 */
#global-confirm-modal .modal-content {
  /* 背景极淡，依靠局部模糊来保证文字可读性 */
  background: rgba(20, 22, 30, 0.6) !important; 
  backdrop-filter: blur(15px) !important; /* 模糊度加高，质感更强 */
  
  /* 边框更细更淡，模拟玻璃切面 */
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5); 
  animation: popInSmall 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 3. 按钮特调：水晶玻璃态 (Glassmorphism) */

/* 通用按钮基础：去平面化，加玻璃质感 */
#global-confirm-modal button {
  backdrop-filter: blur(8px); /* 按钮内部也带模糊，叠加由于 */
  transition: all 0.3s ease;
  border-radius: 12px; /* 圆角一致 */
  letter-spacing: 1px; /* 增加一点呼吸感 */
}

/* 取消按钮：冰霜玻璃 (冷色调透明) */
#global-confirm-modal .btn-delete {
  background: rgba(255, 255, 255, 0.03) !important; 
  color: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.02); /* 内发光增加厚度感 */
}

/* 确认按钮：琥珀玻璃 (暖色调通透) */
#global-confirm-modal .btn-save {
  background: rgba(255, 179, 122, 0.15) !important; /* ✨ 关键：不再是实心，而是透明橙 */
  color: #ffb37a !important; /* 文字变亮色，自带发光感 */
  border: 1px solid rgba(255, 179, 122, 0.3); /* 边框提亮，模拟晶体边缘 */
  
  /* ✨ 注入灵魂：双重光晕 (外发光 + 内反光) */
  box-shadow: 0 0 15px rgba(255, 179, 122, 0.1), inset 0 0 15px rgba(255, 179, 122, 0.05) !important;
}

/* 按钮按下/激活反馈 */
#global-confirm-modal .btn-delete:active { 
  background: rgba(255, 255, 255, 0.1) !important; 
  border-color: rgba(255,255,255,0.2);
}

#global-confirm-modal .btn-save:active { 
  background: rgba(255, 179, 122, 0.25) !important; /* 按下变亮一点 */
  border-color: rgba(255, 179, 122, 0.6);
  box-shadow: 0 0 25px rgba(255, 179, 122, 0.3) !important; /* 按下光晕炸开 */
  transform: scale(0.98); 
}