/* 战术终端 Valkyrie UI 核心变量 */
ww2 {
  --term-bg: #070907;       /* 终端黑底 */
  --term-green: #33ff33;    /* 荧光绿字 */
  --term-dark-green: #113311; /* 边框/背景暗绿 */
  --term-alert: #ff2222;    /* 战损/警报红 */
  --term-dim: #1a551a;      /* 弱化字 */
  
  display: block;
  background: var(--term-bg);
  color: var(--term-green);
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px;
  border: 1px solid var(--term-dark-green);
  border-radius: 4px;
  margin-bottom: 10px;
  /* 模拟老式CRT屏幕扫描线 */
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(51, 255, 51, 0.03) 2px, rgba(51, 255, 51, 0.03) 4px);
  box-shadow: inset 0 0 15px rgba(51,255,51,0.1);
}

/* 隐藏所有details自带的小三角 */
ww2 details > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
ww2 details > summary::-webkit-details-marker {
  display: none;
}

/* 一级主菜单样式 */
ww2 > details {
  margin-bottom: 6px;
  border-left: 2px solid var(--term-green);
  padding-left: 8px;
  background: rgba(17, 51, 17, 0.3);
}
ww2 > details > summary {
  font-weight: bold;
  font-size: 14px;
  padding: 4px 0;
  text-shadow: 0 0 3px var(--term-green);
}
ww2 > details > summary::before {
  content: "[+] ";
  color: var(--term-green);
}
ww2 > details[open] > summary::before {
  content: "[-] ";
}
ww2 > details[open] > summary {
  border-bottom: 1px dashed var(--term-dim);
  margin-bottom: 4px;
}

/* 二级/三级折叠菜单 (用于点击名字展开详情) */
ww2 details.sub, ww2 details.micro {
  margin: 4px 0 4px 10px;
  border-left: 1px dotted var(--term-dim);
  padding-left: 6px;
}
ww2 details.sub > summary, ww2 details.micro > summary {
  color: #b3ffb3;
  font-size: 12px;
}
ww2 details.sub > summary::before {
  content: "▶ ";
  font-size: 10px;
  color: var(--term-dim);
}
ww2 details.sub[open] > summary::before {
  content: "▼ ";
}
ww2 details.micro > summary::before {
  content: ">> ";
  color: var(--term-dim);
}

/* 数据网格布局 (节约垂直空间) */
ww2 g {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 2px;
  padding-left: 12px;
}
ww2 d {
  color: var(--term-dim); /* 标签名用暗绿色 */
}
ww2 v {
  color: #fff; /* 数据值用亮白色突出 */
  text-shadow: 0 0 2px rgba(255,255,255,0.4);
}

/* 标题块与列表 */
ww2 t {
  display: block;
  margin: 6px 0 2px 10px;
  color: var(--term-bg);
  background: var(--term-green);
  padding: 0 4px;
  font-weight: bold;
  width: fit-content;
}
ww2 ul {
  margin: 2px 0 6px 0;
  padding-left: 24px;
}
ww2 li {
  margin-bottom: 2px;
  color: #ccffcc;
}
ww2 li::marker {
  content: "▪ ";
  color: var(--term-dim);
}

/* 警报与特效 */
ww2 hr {
  border: none;
  border-top: 1px solid var(--term-dark-green);
  margin: 6px 0;
}
ww2 .alert {
  color: var(--term-alert);
  text-shadow: 0 0 4px var(--term-alert);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 选项区域特化 */
ww2 details:last-child g {
  padding-left: 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--term-dark-green);
  padding-bottom: 2px;
}