/* ========================================= */
/* 文件：tab3-status.css                        */
/* 功能：Evol终端 → Evol能量监控                */
/*       ——能量主卡片、圆环进度、站点切换菜单、   */
/*        中电量黄色预警、低电量红色警报、        */
/*        呼吸动画、滑块、能源周期小字            */
/* ========================================= */

/* =========================================
   ✨✨✨ [重点优化 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-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.energy-title {
  font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8), 0 0 15px rgba(255, 255, 255, 0.4);
}

.energy-site-wrap {
  position: relative;
}

.energy-site-trigger {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 2px 4px;
  transition: opacity 0.15s;
}
.energy-site-trigger:active { opacity: 0.6; }

.energy-site-arrow {
  font-size: 14px;
  transition: transform 0.2s;
  display: inline-block;
  padding: 2px 4px;
}

.energy-site-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 60px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.energy-site-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.energy-site-opt {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.energy-site-opt:active { background: rgba(255,255,255,0.06); }
.energy-site-opt.active {
  background: rgba(162, 155, 254, 0.15);
  color: #a29bfe;
}

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

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

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