/* ═══════════════════════════════════════════════
   SAO/ALO 全息科幻UI · v3.0 性能优化版
   动画精简：128→12  保留核心视觉
   ═══════════════════════════════════════════════ */

/* ── 字体·sao-wrapper统一声明 ── */
.sao-wrapper,
.sao-wrapper div,
.sao-wrapper p,
.sao-wrapper span,
.sao-wrapper b,
.sao-wrapper i,
.sao-wrapper em,
.sao-wrapper strong,
.sao-wrapper a,
.sao-wrapper summary,
.sao-wrapper details,
.sao-wrapper table,
.sao-wrapper th,
.sao-wrapper td,
.sao-wrapper tr,
.sao-wrapper h1,
.sao-wrapper h2,
.sao-wrapper h3,
.sao-wrapper h4,
.sao-wrapper h5,
.sao-wrapper h6,
.sao-wrapper li,
.sao-wrapper ul,
.sao-wrapper ol,
.sao-wrapper blockquote,
.sao-wrapper label,
.sao-wrapper caption {
  font-family:
    'KaiTi', '楷体', 'Kaiti SC', 'STKaiti', 'BiauKai',
    'AR PL KaitiM GB', 'Noto Serif SC', 'Source Han Serif SC',
    'Songti SC', 'STSong', 'SimSun', 'PingFang SC', serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.sao-wrapper .think-panel p {
  font-family: 'Consolas', 'Courier New', 'Source Code Pro', 'Menlo', monospace !important;
}

/* ── 所有键名/标签名·蓝色 ── */
.sao-panel b,
.battle-panel b,
.memory-corridor b,
.status-top-panel b {
  color: #55ccff;
  text-shadow: 0 0 4px rgba(0, 180, 255, 0.3);
  font-weight: bold;
}

/* ═══ 外层容器 ═══ */
.sao-wrapper {
  background: linear-gradient(160deg,
    rgba(3, 6, 18, 0.97) 0%,
    rgba(8, 14, 35, 0.95) 30%,
    rgba(12, 20, 45, 0.93) 60%,
    rgba(6, 10, 28, 0.96) 100%);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 16px;
  padding: 14px;
  margin: -6px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 12px rgba(0, 212, 255, 0.15),
    0 0 30px rgba(0, 212, 255, 0.05),
    inset 0 0 20px rgba(0, 212, 255, 0.02);
  min-height: 100px;
}

/* 顶部流光（保留） */
.sao-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: -70%;
  width: 70%; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(0,212,255,0.1) 15%, rgba(0,212,255,0.8) 40%,
    rgba(119,238,255,1) 50%, rgba(0,212,255,0.8) 60%,
    rgba(0,212,255,0.1) 85%, transparent 100%);
  animation: wrapper-scan-top 3.5s linear infinite;
  z-index: 10; pointer-events: none;
  will-change: transform;
}
@keyframes wrapper-scan-top {
  0% { left: -70%; }
  100% { left: 100%; }
}

/* 底部反向流光（保留） */
.sao-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0; right: -50%;
  width: 50%; height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(102,68,255,0.6), rgba(170,136,255,0.9),
    rgba(102,68,255,0.6), transparent);
  animation: wrapper-scan-bottom 5s linear infinite;
  z-index: 10; pointer-events: none;
  will-change: transform;
}
@keyframes wrapper-scan-bottom {
  0% { right: -50%; }
  100% { right: 100%; }
}

/* 左侧竖向流光（保留） */
.sao-deco-left {
  position: absolute;
  top: -35%; left: 0;
  width: 2px; height: 35%;
  background: linear-gradient(180deg,
    transparent, rgba(0,212,255,0.6), rgba(0,212,255,0.9),
    rgba(0,212,255,0.6), transparent);
  animation: wrapper-scan-left 4s linear infinite;
  z-index: 10; pointer-events: none;
  will-change: transform;
}
@keyframes wrapper-scan-left {
  0% { top: -35%; }
  100% { top: 100%; }
}

/* 右侧竖向流光（保留） */
.sao-deco-right {
  position: absolute;
  bottom: -35%; right: 0;
  width: 2px; height: 35%;
  background: linear-gradient(0deg,
    transparent, rgba(153,102,255,0.6), rgba(153,102,255,0.9),
    rgba(153,102,255,0.6), transparent);
  animation: wrapper-scan-right 4.5s linear infinite;
  z-index: 10; pointer-events: none;
  will-change: transform;
}
@keyframes wrapper-scan-right {
  0% { bottom: -35%; }
  100% { bottom: 100%; }
}

/* 四角光点（简化：慢速opacity，去掉filter） */
.sao-corner-tl, .sao-corner-tr, .sao-corner-bl, .sao-corner-br {
  position: absolute;
  width: 5px; height: 5px;
  z-index: 11; pointer-events: none;
}
.sao-corner-tl::before, .sao-corner-tr::before,
.sao-corner-bl::before, .sao-corner-br::before {
  content: '';
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #00d4ff;
  box-shadow: 0 0 6px rgba(0,212,255,0.5);
  animation: corner-blink 4s ease-in-out infinite;
  will-change: opacity;
}
.sao-corner-tl { top: 8px; left: 8px; }
.sao-corner-tr { top: 8px; right: 8px; }
.sao-corner-bl { bottom: 8px; left: 8px; }
.sao-corner-br { bottom: 8px; right: 8px; }
.sao-corner-tr::before { animation-delay: 1s; }
.sao-corner-bl::before { animation-delay: 2s; }
.sao-corner-br::before { animation-delay: 3s; }
@keyframes corner-blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* 四角L型边框（静态，不动画） */
.sao-corner-tl::after, .sao-corner-tr::after,
.sao-corner-bl::after, .sao-corner-br::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
}
.sao-corner-tl::after { top: -3px; left: -3px; border-top: 2px solid rgba(0,212,255,0.4); border-left: 2px solid rgba(0,212,255,0.4); border-radius: 4px 0 0 0; }
.sao-corner-tr::after { top: -3px; right: -3px; border-top: 2px solid rgba(0,212,255,0.4); border-right: 2px solid rgba(0,212,255,0.4); border-radius: 0 4px 0 0; }
.sao-corner-bl::after { bottom: -3px; left: -3px; border-bottom: 2px solid rgba(0,212,255,0.4); border-left: 2px solid rgba(0,212,255,0.4); border-radius: 0 0 0 4px; }
.sao-corner-br::after { bottom: -3px; right: -3px; border-bottom: 2px solid rgba(0,212,255,0.4); border-right: 2px solid rgba(0,212,255,0.4); border-radius: 0 0 4px 0; }

/* 背景网格 */
.sao-bg-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: 0; pointer-events: none; opacity: 0.6;
}

/* 内部面板层级 */
.sao-wrapper .sao-panel,
.sao-wrapper .status-top-panel,
.sao-wrapper .sao-text,
.sao-wrapper .think-panel,
.sao-wrapper .battle-panel,
.sao-wrapper .memory-corridor {
  position: relative;
  z-index: 1;
  margin: 8px 0;
}

/* ═══ 主面板（静态发光，无动画） ═══ */
.sao-panel {
  background: linear-gradient(135deg, rgba(8,12,28,0.92), rgba(15,25,50,0.88));
  border: 1px solid rgba(0,212,255,0.4);
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
  position: relative;
  overflow: hidden;
  color: #e0f0ff;
  font-size: 14px;
  line-height: 1.7;
  box-shadow: 0 0 10px rgba(0,212,255,0.15), 0 0 25px rgba(0,212,255,0.06), inset 0 0 15px rgba(0,212,255,0.03);
}

/* ── 面板标题 ── */
.sao-title {
  font-size: 15px;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 8px rgba(0,212,255,0.6);
  border-bottom: 1px solid rgba(0,212,255,0.3);
  padding-bottom: 8px;
  margin-bottom: 12px;
  letter-spacing: 3px;
}

/* ═══ 子类目标签（静态） ═══ */
.section-label {
  display: inline-block;
  padding: 2px 10px;
  margin: 10px 0 6px 0;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.35);
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
  color: #66ccee;
  text-shadow: 0 0 4px rgba(0,212,255,0.4);
  letter-spacing: 2px;
}

/* ── 分隔线 ── */
.section-line {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(0,212,255,0.25) 30%, rgba(0,212,255,0.25) 70%, transparent 95%);
  margin: 10px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* ═══ 顶部状态栏（静态发光） ═══ */
.status-top-panel {
  background: linear-gradient(135deg, rgba(8,12,28,0.95), rgba(20,30,60,0.9));
  border: 1px solid rgba(0,212,255,0.5);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 6px 0;
  color: #e0f0ff;
  font-size: 13px;
  line-height: 1.8;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,212,255,0.12), inset 0 0 10px rgba(0,212,255,0.03);
}
.status-top-panel p { margin: 2px 0; }

/* ═══ HP/MP 血条系统 ═══ */
.bar-container {
  width: 100%;
  margin: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-label {
  font-size: 12px;
  font-weight: bold;
  min-width: 30px;
  text-shadow: 0 0 4px currentColor;
}
.bar-label-hp { color: #00ff88; }
.bar-label-mp { color: #6699ff; }
.bar-label-exp { color: #ffcc00; }
.bar-label-fly { color: #aa88ff; }

.bar-track {
  flex: 1;
  height: 18px;
  background: rgba(0,0,0,0.6);
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s ease;
}
.bar-fill-hp {
  background: linear-gradient(90deg, #00cc66, #00ff88);
  box-shadow: 0 0 10px rgba(0,255,136,0.5), inset 0 0 5px rgba(255,255,255,0.2);
}
.bar-fill-hp-mid {
  background: linear-gradient(90deg, #cc8800, #ffcc00);
  box-shadow: 0 0 10px rgba(255,204,0,0.5), inset 0 0 5px rgba(255,255,255,0.2);
}
.bar-fill-hp-low {
  background: linear-gradient(90deg, #cc0000, #ff4444);
  box-shadow: 0 0 10px rgba(255,68,68,0.5), inset 0 0 5px rgba(255,255,255,0.2);
  animation: hp-pulse 1s ease-in-out infinite;
  will-change: opacity;
}
@keyframes hp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.bar-fill-mp {
  background: linear-gradient(90deg, #4488ff, #7766ee);
  box-shadow: 0 0 10px rgba(68,136,255,0.5), inset 0 0 5px rgba(255,255,255,0.2);
}
.bar-fill-exp {
  background: linear-gradient(90deg, #cc9900, #ffdd44);
  box-shadow: 0 0 8px rgba(255,204,0,0.4), inset 0 0 5px rgba(255,255,255,0.2);
}
.bar-fill-fly {
  background: linear-gradient(90deg, #8855dd, #bb88ff);
  box-shadow: 0 0 10px rgba(170,136,255,0.5), inset 0 0 5px rgba(255,255,255,0.2);
}
.bar-value {
  font-size: 11px;
  min-width: 80px;
  text-align: right;
  color: #aaccee;
}

/* ═══ 雷达图系统 ═══ */
.radar-container {
  width: 200px; height: 200px;
  margin: 12px auto;
  position: relative;
}
.radar-bg {
  width: 100%; height: 100%;
  position: relative;
}
.radar-bg::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 160px; height: 160px;
  transform: translate(-50%,-50%);
  background: repeating-conic-gradient(rgba(0,212,255,0.08) 0deg 72deg, rgba(0,212,255,0.03) 72deg 144deg);
  clip-path: polygon(50% 0%, 97.5% 34.5%, 79.4% 90.5%, 20.6% 90.5%, 2.5% 34.5%);
}
.radar-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  clip-path: polygon(50% 0%, 97.5% 34.5%, 79.4% 90.5%, 20.6% 90.5%, 2.5% 34.5%);
  border: 1px solid rgba(0,212,255,0.2);
}
.radar-ring-1 { width: 160px; height: 160px; }
.radar-ring-2 { width: 120px; height: 120px; }
.radar-ring-3 { width: 80px; height: 80px; }
.radar-ring-4 { width: 40px; height: 40px; }

.radar-shape {
  position: absolute;
  top: 50%; left: 50%;
  width: 160px; height: 160px;
  transform: translate(-50%,-50%);
  background: rgba(0,212,255,0.15);
  border: 2px solid rgba(0,212,255,0.8);
  box-shadow: 0 0 10px rgba(0,212,255,0.3);
}
.radar-axis {
  position: absolute;
  top: 50%; left: 50%;
  width: 1px; height: 80px;
  background: rgba(0,212,255,0.2);
  transform-origin: top center;
}
.radar-axis-1 { transform: translate(-50%,0) rotate(0deg); }
.radar-axis-2 { transform: translate(-50%,0) rotate(72deg); }
.radar-axis-3 { transform: translate(-50%,0) rotate(144deg); }
.radar-axis-4 { transform: translate(-50%,0) rotate(216deg); }
.radar-axis-5 { transform: translate(-50%,0) rotate(288deg); }

.radar-label {
  position: absolute;
  font-size: 11px;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 6px rgba(0,212,255,0.8);
}
.radar-label-str { top: 2px; left: 50%; transform: translateX(-50%); }
.radar-label-agi { top: 30%; right: 2px; }
.radar-label-vit { bottom: 8%; right: 12%; }
.radar-label-dex { bottom: 8%; left: 12%; }
.radar-label-int { top: 30%; left: 2px; }
.radar-value { font-size: 10px; color: #aaccee; }

/* ═══ 折叠式技能/道具卡 ═══ */
.skill-fold {
  display: inline-block;
  vertical-align: top;
  margin: 3px 4px;
  max-width: 100%;
}
.skill-fold > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 6px;
  cursor: pointer;
  color: #e0f0ff;
  font-size: 13px;
  transition: all 0.3s ease;
  list-style: none;
}
.skill-fold > summary::-webkit-details-marker { display: none; }
.skill-fold > summary:hover {
  background: rgba(0,212,255,0.18);
  border-color: rgba(0,212,255,0.7);
  box-shadow: 0 0 10px rgba(0,212,255,0.25);
}
.skill-fold[open] > summary {
  background: rgba(0,212,255,0.15);
  border-color: rgba(0,212,255,0.6);
  border-radius: 6px 6px 0 0;
}

.skill-detail {
  background: linear-gradient(135deg, rgba(8,15,35,0.97), rgba(15,25,55,0.95));
  border: 1px solid rgba(0,212,255,0.5);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 10px 12px;
  margin-top: -1px;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.skill-detail p { margin: 3px 0; }

.detail-title {
  font-size: 13px;
  font-weight: bold;
  color: #00d4ff;
  text-shadow: 0 0 6px rgba(0,212,255,0.5);
  margin-bottom: 5px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(0,212,255,0.25);
}
.detail-stat { color: #88ccaa; font-size: 12px; line-height: 1.5; }
.detail-effect { color: #ffcc66; font-size: 11px; font-style: italic; margin-top: 4px; line-height: 1.5; }
.detail-desc { color: #8899bb; font-size: 11px; margin-top: 5px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 4px; line-height: 1.5; }

/* ── 正文内·内联折叠 ── */
.inline-fold { display: inline; }
.inline-fold > summary {
  display: inline;
  cursor: pointer;
  padding: 1px 6px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.35);
  border-radius: 4px;
  color: #55ddff;
  font-size: inherit;
  text-shadow: 0 0 4px rgba(0,212,255,0.4);
  list-style: none;
  transition: all 0.2s ease;
}
.inline-fold > summary::-webkit-details-marker { display: none; }
.inline-fold > summary:hover {
  background: rgba(0,212,255,0.2);
  border-color: rgba(0,212,255,0.6);
}
.inline-fold[open] > summary {
  background: rgba(0,212,255,0.15);
  color: #88eeff;
}
.inline-detail {
  display: block;
  margin: 6px 0 6px 1.5em;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(8,15,35,0.97), rgba(15,25,55,0.95));
  border: 1px solid rgba(0,212,255,0.4);
  border-left: 3px solid rgba(0,212,255,0.7);
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: #b8d0e8;
  line-height: 1.6;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.inline-detail p { margin: 3px 0; }
.inline-detail .detail-title { font-size: 12px; font-weight: bold; color: #77ddff; margin-bottom: 3px; padding-bottom: 2px; border-bottom: 1px solid rgba(0,212,255,0.2); }
.inline-detail .detail-stat { color: #88ccaa; font-size: 11px; }
.inline-detail .detail-effect { color: #ffcc66; font-size: 11px; font-style: italic; margin-top: 3px; }
.inline-detail .detail-desc { color: #8899bb; font-size: 11px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 3px; }

/* ── 技能类型标签 ── */
.skill-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  margin-right: 3px;
  font-weight: bold;
}
.stag-sword { background: rgba(255,100,100,0.2); border: 1px solid rgba(255,100,100,0.5); color: #ff8888; }
.stag-magic { background: rgba(100,100,255,0.2); border: 1px solid rgba(100,100,255,0.5); color: #8888ff; }
.stag-buff { background: rgba(100,255,100,0.2); border: 1px solid rgba(100,255,100,0.5); color: #88ff88; }
.stag-heal { background: rgba(255,200,100,0.2); border: 1px solid rgba(255,200,100,0.5); color: #ffcc88; }

/* ═══ 装备品级 ═══ */
.equip-common { color: #cccccc; }
.equip-fine { color: #44cc44; text-shadow: 0 0 4px rgba(68,204,68,0.3); }
.equip-rare { color: #4488ff; text-shadow: 0 0 6px rgba(68,136,255,0.4); }
.equip-epic { color: #aa44ff; text-shadow: 0 0 8px rgba(170,68,255,0.5); }
.equip-legend {
  color: #ffaa00;
  text-shadow: 0 0 10px rgba(255,170,0,0.6);
  animation: legend-glow 2s ease-in-out infinite;
  will-change: text-shadow;
}
@keyframes legend-glow {
  0%, 100% { text-shadow: 0 0 10px rgba(255,170,0,0.6); }
  50% { text-shadow: 0 0 20px rgba(255,170,0,0.9), 0 0 30px rgba(255,170,0,0.4); }
}

/* ═══ 台词·金色 ═══ */
.dialogue {
  color: #ffd866;
  text-shadow: 0 0 3px rgba(255,216,102,0.3);
}
.dialogue::before { content: '「'; color: #ffcc44; }
.dialogue::after { content: '」'; color: #ffcc44; }

/* ═══ Details/Summary 美化（静态+hover，无持续动画） ═══ */
.sao-panel details { margin: 6px 0; }

/* 一级summary */
.sao-panel > details > summary,
.battle-panel > details > summary,
.memory-corridor > details > summary {
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(0,212,255,0.05);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 6px;
  color: #00d4ff;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 1.5px;
  transition: all 0.3s ease;
  list-style: none;
  box-shadow: 0 0 4px rgba(0,212,255,0.08);
}
.sao-panel > details > summary::-webkit-details-marker,
.battle-panel > details > summary::-webkit-details-marker,
.memory-corridor > details > summary::-webkit-details-marker { display: none; }

.sao-panel > details > summary::before,
.battle-panel > details > summary::before,
.memory-corridor > details > summary::before {
  content: '▸ ';
  color: #00d4ff;
  display: inline-block;
}
.sao-panel > details[open] > summary::before,
.battle-panel > details[open] > summary::before,
.memory-corridor > details[open] > summary::before {
  content: '▾ ';
}

.sao-panel > details > summary:hover,
.battle-panel > details > summary:hover,
.memory-corridor > details > summary:hover {
  background: rgba(0,212,255,0.12);
  border-color: rgba(0,212,255,0.6);
  box-shadow: 0 0 12px rgba(0,212,255,0.25);
}
.sao-panel > details[open] > summary,
.battle-panel > details[open] > summary,
.memory-corridor > details[open] > summary {
  border-color: rgba(0,212,255,0.5);
  background: rgba(0,212,255,0.1);
}

/* 二级summary */
.sao-panel details details > summary {
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 1px;
  border-radius: 8px;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.25);
  color: #66ddff;
  margin: 4px 0;
  transition: all 0.3s ease;
  list-style: none;
}
.sao-panel details details > summary::-webkit-details-marker { display: none; }
.sao-panel details details > summary:hover {
  background: rgba(0,212,255,0.14);
  border-color: rgba(0,212,255,0.5);
  box-shadow: 0 0 6px rgba(0,212,255,0.2);
}
.sao-panel details details[open] > summary {
  background: rgba(0,212,255,0.12);
  border-color: rgba(0,212,255,0.45);
}

/* ═══ 正文区（静态发光） ═══ */
.sao-text {
  background: linear-gradient(135deg, rgba(8,12,28,0.92), rgba(15,25,50,0.88));
  border: 1px solid rgba(0,212,255,0.4);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 10px 0;
  color: #d8e8f8;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,212,255,0.15), 0 0 25px rgba(0,212,255,0.06), inset 0 0 15px rgba(0,212,255,0.03);
}
.sao-text p {
  margin: 0 0 8px 0;
  text-indent: 2em;
}

/* ═══ 思维链 ═══ */
.think-panel {
  background: rgba(5,15,25,0.75);
  border: 1px solid rgba(0,180,160,0.35);
  border-radius: 8px;
  padding: 10px;
  margin: 6px 0;
  font-size: 12px;
  color: #44ddbb;
  line-height: 1.55;
  overflow: hidden;
}
.think-panel summary {
  color: #33ccaa;
  font-size: 13px;
  font-weight: bold;
  border: none;
  background: none;
  padding: 4px;
  cursor: pointer;
  list-style: none;
  text-shadow: 0 0 4px rgba(0,200,160,0.4);
}
.think-panel summary::-webkit-details-marker { display: none; }
.think-panel p {
  margin: 2px 0;
  color: #55eebb;
}

/* ═══ 战场态势面板（静态红色发光） ═══ */
.battle-panel {
  background: linear-gradient(135deg, rgba(40,5,5,0.9), rgba(20,10,30,0.9));
  border: 1px solid rgba(255,60,60,0.4);
  border-radius: 10px;
  padding: 14px;
  margin: 8px 0;
  color: #e0f0ff;
  font-size: 14px;
  line-height: 1.7;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(255,60,60,0.15), 0 0 25px rgba(255,60,60,0.06);
}
.battle-panel .sao-title {
  color: #ff6644;
  text-shadow: 0 0 8px rgba(255,102,68,0.6);
  border-bottom-color: rgba(255,60,60,0.3);
}
/* 战场summary红色覆盖 */
.battle-panel > details > summary {
  border-color: rgba(255,60,60,0.3);
  color: #ff6644;
}
.battle-panel > details > summary:hover {
  border-color: rgba(255,60,60,0.6);
  box-shadow: 0 0 10px rgba(255,60,60,0.25);
}
.battle-panel > details[open] > summary {
  border-color: rgba(255,60,60,0.5);
  background: rgba(255,60,60,0.08);
}

/* ═══ 记忆回廊（静态紫色发光） ═══ */
.memory-corridor {
  background: linear-gradient(135deg, rgba(10,8,25,0.93), rgba(20,15,40,0.9));
  border: 1px solid rgba(170,136,255,0.4);
  border-radius: 10px;
  padding: 14px;
  margin: 8px 0;
  color: #e0f0ff;
  font-size: 14px;
  line-height: 1.7;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(170,136,255,0.15), 0 0 25px rgba(170,136,255,0.06);
}
.memory-corridor .sao-title {
  color: #bb99ff;
  text-shadow: 0 0 8px rgba(170,136,255,0.6);
  border-bottom-color: rgba(170,136,255,0.3);
}
.memory-corridor > details > summary {
  border-color: rgba(170,136,255,0.3);
  color: #bb99ff;
}
.memory-corridor > details > summary:hover {
  border-color: rgba(170,136,255,0.6);
  box-shadow: 0 0 8px rgba(170,136,255,0.2);
}
.memory-corridor > details[open] > summary {
  border-color: rgba(170,136,255,0.5);
  background: rgba(170,136,255,0.08);
}

/* ── LTM/STM 区域标记 ── */
.mem-ltm-zone {
  border-left: 3px solid rgba(255,170,0,0.5);
  padding-left: 10px;
  margin: 8px 0;
  overflow-x: auto;
}
.mem-stm-zone {
  border-left: 3px solid rgba(0,212,255,0.5);
  padding-left: 10px;
  margin: 8px 0;
  overflow-x: auto;
}

/* ── 记忆表格 ── */
.mem-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
  margin: 6px 0;
}
.mem-table th {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 5px 6px;
  color: #99bbdd;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
}
.mem-table td {
  border: 1px solid rgba(255,255,255,0.06);
  padding: 4px 6px;
  color: #bbd0e8;
  vertical-align: top;
  word-break: break-all;
  overflow-wrap: break-word;
}
.mem-table-ltm th { background: rgba(255,170,0,0.08); color: #eebb77; }
.mem-table-stm th { background: rgba(0,212,255,0.08); color: #77ccdd; }

.mem-table-ltm col:nth-child(1) { width: 8%; }
.mem-table-ltm col:nth-child(2) { width: 20%; }
.mem-table-ltm col:nth-child(3) { width: 22%; }
.mem-table-ltm col:nth-child(4) { width: 50%; }

.mem-table-stm col:nth-child(1) { width: 8%; }
.mem-table-stm col:nth-child(2) { width: 22%; }
.mem-table-stm col:nth-child(3) { width: 18%; }
.mem-table-stm col:nth-child(4) { width: 52%; }

/* ═══ 行动推荐 ═══ */
.action-option {
  display: block;
  padding: 8px 12px;
  margin: 4px 0;
  background: rgba(0,212,255,0.05);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 6px;
  color: #c8e0f0;
  font-size: 13px;
  transition: all 0.3s ease;
}
.action-option:hover {
  background: rgba(0,212,255,0.12);
  border-color: rgba(0,212,255,0.5);
  box-shadow: 0 0 8px rgba(0,212,255,0.2);
  transform: translateX(4px);
}
.action-key {
  display: inline-block;
  width: 22px; height: 22px;
  line-height: 22px;
  text-align: center;
  background: rgba(0,212,255,0.2);
  border: 1px solid rgba(0,212,255,0.5);
  border-radius: 4px;
  color: #00d4ff;
  font-weight: bold;
  font-size: 12px;
  margin-right: 8px;
}

/* ═══ 羁绊关系 ═══ */
.bond-item {
  padding: 6px 10px;
  margin: 4px 0;
  border-left: 3px solid;
  border-radius: 0 4px 4px 0;
  background: rgba(0,0,0,0.2);
}
.bond-friend { border-left-color: #44cc88; }
.bond-enemy { border-left-color: #ff4444; }
.bond-love { border-left-color: #ff66aa; }
.bond-guild { border-left-color: #ffaa44; }

/* ═══ 模式状态色（保留动画·数量少） ═══ */
.mode-normal {
  color: #44ff88;
  text-shadow: 0 0 6px rgba(68,255,136,0.5);
  font-weight: bold;
}
.mode-battle {
  color: #ff4444;
  text-shadow: 0 0 8px rgba(255,68,68,0.6);
  font-weight: bold;
  animation: mode-battle-pulse 1.5s ease-in-out infinite;
  will-change: text-shadow;
}
@keyframes mode-battle-pulse {
  0%, 100% { text-shadow: 0 0 6px rgba(255,68,68,0.5); }
  50% { text-shadow: 0 0 14px rgba(255,68,68,0.9), 0 0 24px rgba(255,68,68,0.4); }
}
.mode-erotic {
  color: #ff66bb;
  text-shadow: 0 0 8px rgba(255,102,187,0.6);
  font-weight: bold;
  animation: mode-erotic-pulse 2s ease-in-out infinite;
  will-change: text-shadow;
}
@keyframes mode-erotic-pulse {
  0%, 100% { text-shadow: 0 0 6px rgba(255,102,187,0.4); }
  50% { text-shadow: 0 0 12px rgba(255,102,187,0.8), 0 0 20px rgba(255,102,187,0.3); }
}
.mode-on {
  color: #44ff88;
  text-shadow: 0 0 6px rgba(68,255,136,0.5);
  font-weight: bold;
}
.mode-off {
  color: #ff4444;
  text-shadow: 0 0 6px rgba(255,68,68,0.5);
  font-weight: bold;
}

/* ═══ 响应式适配 ═══ */
@media (max-width: 480px) {
  .sao-panel, .battle-panel, .memory-corridor { padding: 10px; font-size: 12px; }
  .sao-text { padding: 12px 14px; font-size: 13px; }
  .radar-container { width: 160px; height: 160px; }
  .radar-ring-1 { width: 130px; height: 130px; }
  .radar-ring-2 { width: 97px; height: 97px; }
  .radar-ring-3 { width: 65px; height: 65px; }
  .radar-ring-4 { width: 32px; height: 32px; }
  .bar-track { height: 14px; }
  .bar-value { font-size: 10px; min-width: 60px; }
  .mem-table { font-size: 10px; }
  .mem-table th, .mem-table td { padding: 3px 4px; }
  .skill-fold > summary { font-size: 11px; padding: 2px 7px; }
  .skill-detail { padding: 6px 8px; font-size: 11px; }
  .inline-detail { font-size: 11px; padding: 6px 8px; }
  .sao-wrapper { padding: 8px; margin: -4px; border-radius: 12px; }
  .sao-corner-tl::after, .sao-corner-tr::after,
  .sao-corner-bl::after, .sao-corner-br::after { width: 12px; height: 12px; }
  .sao-corner-tl { top: 5px; left: 5px; }
  .sao-corner-tr { top: 5px; right: 5px; }
  .sao-corner-bl { bottom: 5px; left: 5px; }
  .sao-corner-br { bottom: 5px; right: 5px; }
  .sao-bg-grid { background-size: 20px 20px; opacity: 0.4; }
  .sao-deco-left, .sao-deco-right { width: 1px; height: 25%; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .sao-wrapper { padding: 10px; margin: -5px; border-radius: 14px; }
}

/* 手机端字体 */
@media (max-width: 768px) {
  .sao-wrapper,
  .sao-wrapper div, .sao-wrapper p, .sao-wrapper span,
  .sao-wrapper b, .sao-wrapper i, .sao-wrapper em,
  .sao-wrapper strong, .sao-wrapper a, .sao-wrapper summary,
  .sao-wrapper details, .sao-wrapper table, .sao-wrapper th,
  .sao-wrapper td, .sao-wrapper tr, .sao-wrapper h1,
  .sao-wrapper h2, .sao-wrapper h3, .sao-wrapper h4,
  .sao-wrapper h5, .sao-wrapper h6, .sao-wrapper li,
  .sao-wrapper ul, .sao-wrapper ol, .sao-wrapper blockquote,
  .sao-wrapper label, .sao-wrapper caption {
    font-family:
      'Noto Serif SC', 'Source Han Serif SC', 'Source Han Serif CN',
      'Songti SC', 'STSong', 'PingFang SC', 'Hiragino Sans GB',
      'Microsoft YaHei', 'WenQuanYi Micro Hei', serif !important;
    letter-spacing: 0.3px !important;
  }
  .sao-wrapper .think-panel p {
    font-family: 'Menlo', 'Courier New', 'Consolas', monospace !important;
  }
}

/* iOS安全区 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sao-wrapper { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}