/* ========== 全局字体与基础色系 ========== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&display=swap');

/* ========== 流光动画定义 ========== */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(212,175,55,0.3), 0 0 20px rgba(212,175,55,0.1); }
  50% { box-shadow: 0 0 16px rgba(212,175,55,0.6), 0 0 40px rgba(212,175,55,0.2); }
}
@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes scanline {
  0% { top: -10%; }
  100% { top: 110%; }
}

/* ========== 正文容器 text ========== */
text {
  display: block;
  position: relative;
  font-family: 'Noto Serif SC', 'Source Han Serif CN', Georgia, serif;
  font-size: 15.5px;
  line-height: 2.0;
  color: #e8dfc8;
  background: linear-gradient(160deg, #1a1a1f 0%, #141418 40%, #1c1a14 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
  border-radius: 12px;
  padding: 28px 30px;
  margin: 14px 0;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  animation: fadeInUp 0.5s ease both, glowPulse 4s ease-in-out infinite;
  overflow: hidden;
}
text::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1.5px;
  background: linear-gradient(135deg, #b8960c, #d4af37, #f5e17a, #b8960c, #8a6f1e, #d4af37);
  background-size: 300% 300%;
  animation: borderFlow 6s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}
text::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.6), rgba(245,225,122,0.9), rgba(212,175,55,0.6), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  top: 0;
  border-radius: 12px 12px 0 0;
}
text p {
  margin: 0 0 1.1em 0;
  text-indent: 2em;
}

/* ========== 顶部状态栏 hd ========== */
hd {
  display: block;
  background: linear-gradient(135deg, #1e1c16 0%, #2a2618 50%, #1e1c16 100%);
  border: 1px solid #5a4a1a;
  border-radius: 10px;
  padding: 12px 18px;
  margin: 10px 0;
  position: relative;
  overflow: hidden;
}
hd::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.07), transparent);
  animation: shimmer 4s linear infinite;
}
hd t {
  display: block;
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(90deg, #8a6f1e, #d4af37, #f5e17a, #d4af37, #8a6f1e);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
  text-shadow: none;
}
hd r {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: center;
}
hd d {
  display: inline-block;
  font-size: 12.5px;
  color: #c9a84c;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 20px;
  padding: 3px 12px;
  letter-spacing: 0.05em;
}

/* ========== details 通用折叠块 ========== */
details {
  background: linear-gradient(160deg, #18171b 0%, #141318 100%);
  border: 1px solid #3d3520;
  border-radius: 10px;
  margin: 10px 0;
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
  transition: box-shadow 0.3s ease;
}
details:hover {
  box-shadow: 0 4px 24px rgba(212,175,55,0.12);
}
details summary {
  font-family: 'Noto Serif SC', serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #d4af37;
  background: linear-gradient(90deg, #1f1d15, #272312, #1f1d15);
  padding: 11px 18px;
  cursor: pointer;
  list-style: none;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #3d3520;
  position: relative;
  transition: background 0.3s, color 0.3s;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: '▶';
  display: inline-block;
  font-size: 10px;
  margin-right: 8px;
  transition: transform 0.3s ease;
  color: #b8960c;
}
details[open] summary::before {
  transform: rotate(90deg);
}
details summary::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
}
details[open] summary {
  color: #f5e17a;
  background: linear-gradient(90deg, #211f16, #2e2b1a, #211f16);
}
details > *:not(summary) {
  padding: 14px 18px;
}

/* ========== grid 网格布局 ========== */
grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
grid g {
  display: block;
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  color: #d6c99a;
  line-height: 1.6;
  transition: background 0.3s, border-color 0.3s;
}
grid g:hover {
  background: rgba(212,175,55,0.1);
  border-color: rgba(212,175,55,0.35);
}
grid g b {
  color: #d4af37;
  font-weight: 600;
  font-size: 12px;
}

/* ========== 分隔线 line ========== */
line {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, #5a4a1a, #d4af37, #5a4a1a, transparent);
  margin: 12px 0;
}

/* ========== subtitle 小标题 ========== */
subtitle {
  display: block;
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  font-weight: 700;
  color: #c9a84c;
  letter-spacing: 0.12em;
  margin: 10px 0 8px 0;
  padding-left: 10px;
  border-left: 3px solid #d4af37;
}

/* ========== NPC 私密状态栏 secret ========== */
secret {
  display: block;
  background: linear-gradient(135deg, #1a1218 0%, #1e1520 100%);
  border: 1px solid #5c3060;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 10px 0 0 0;
}
secret subtitle {
  color: #c084d4;
  border-left-color: #a855c8;
}
secret grid g {
  background: rgba(168,85,200,0.06);
  border-color: rgba(168,85,200,0.2);
  color: #d4b8e0;
}
secret grid g b {
  color: #c084d4;
}
secret grid g:hover {
  background: rgba(168,85,200,0.12);
  border-color: rgba(168,85,200,0.4);
}

/* ========== NPC 外貌与内心 ========== */
desc {
  display: block;
  font-size: 13px;
  color: #c9b87a;
  background: rgba(212,175,55,0.05);
  border-left: 3px solid #8a6f1e;
  border-radius: 0 6px 6px 0;
  padding: 8px 14px;
  margin: 8px 0;
  font-style: italic;
  line-height: 1.7;
}
mind {
  display: block;
  font-size: 13px;
  color: #a89060;
  background: rgba(100,80,20,0.12);
  border: 1px dashed #5a4a20;
  border-radius: 6px;
  padding: 8px 14px;
  margin: 8px 0;
  font-style: italic;
  line-height: 1.7;
}
mind::before {
  content: '💭 ';
}

/* ========== NPC面板 女性 ========== */
details.npc-panel-f {
  border-color: #5c3060;
}
details.npc-panel-f summary {
  background: linear-gradient(90deg, #1e1520, #261a28, #1e1520);
  color: #e0a0e8;
  border-bottom-color: #5c3060;
}
details.npc-panel-f summary::before { color: #c084d4; }
details.npc-panel-f summary::after {
  background: linear-gradient(90deg, transparent, #c084d4, transparent);
}
details.npc-panel-f:hover {
  box-shadow: 0 4px 24px rgba(192,132,212,0.12);
}

/* ========== NPC面板 男性 ========== */
details.npc-panel-m {
  border-color: #1a3a5c;
}
details.npc-panel-m summary {
  background: linear-gradient(90deg, #141e2a, #1a2a3a, #141e2a);
  color: #7ab8e0;
  border-bottom-color: #1a3a5c;
}
details.npc-panel-m summary::before { color: #4a90c0; }
details.npc-panel-m summary::after {
  background: linear-gradient(90deg, transparent, #4a90c0, transparent);
}
details.npc-panel-m:hover {
  box-shadow: 0 4px 24px rgba(74,144,192,0.12);
}

/* ========== NPC核心关系图谱 npc ========== */
npc {
  display: block;
  font-size: 13px;
  color: #c4b080;
  line-height: 2.0;
  background: rgba(212,175,55,0.04);
  border-radius: 6px;
  padding: 8px 14px;
}

/* ========== 地图区域 mapbox ========== */
mapbox {
  display: block;
  background: #0e0e0e;
  border: 1px solid #3d3520;
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
}
mapbox pre {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 12.5px;
  color: #c9a84c;
  line-height: 1.7;
  margin: 0;
  white-space: pre;
}

/* ========== 记忆档案 scroll / section / label / item ========== */
scroll {
  display: block;
}
section {
  display: block;
  margin-bottom: 14px;
}
label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #b8960c;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #3d3520;
}
item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(212,175,55,0.04);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #c9b87a;
  line-height: 1.7;
  transition: background 0.3s;
}
item:hover {
  background: rgba(212,175,55,0.09);
}
item[t="LTM"] {
  border-color: rgba(212,175,55,0.25);
  background: rgba(212,175,55,0.07);
}
item[t="STM"] {
  border-color: rgba(180,160,80,0.15);
}
item i {
  font-style: normal;
  color: #8a7030;
  font-size: 11.5px;
  white-space: nowrap;
  min-width: 60px;
  padding-top: 2px;
}
item span {
  flex: 1;
}

/* ========== 情报站 c 标签（全球/国内/同城） ========== */
c {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: #1a1600;
  background: linear-gradient(135deg, #c9a030, #d4af37, #f0d060);
  border-radius: 4px;
  padding: 1px 8px;
  margin-right: 6px;
  letter-spacing: 0.06em;
}

/* ========== 手机卡片 phone ========== */
phone {
  display: block;
  background: linear-gradient(160deg, #111318 0%, #0e1016 100%);
  border: 1px solid #2a3040;
  border-radius: 14px;
  padding: 0 0 14px 0;
  margin: 10px 0;
  overflow: hidden;
}
phone bar {
  display: block;
  background: linear-gradient(90deg, #1a2030, #222840, #1a2030);
  color: #7ab8e0;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  letter-spacing: 0.1em;
  border-bottom: 1px solid #2a3a50;
}
phone msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 18px 4px 18px;
}
phone ava {
  display: block;
  font-size: 11px;
  color: #7ab8e0;
  background: rgba(74,144,192,0.15);
  border: 1px solid rgba(74,144,192,0.3);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  margin-top: 2px;
}
phone bubble {
  display: block;
  background: rgba(74,144,192,0.12);
  border: 1px solid rgba(74,144,192,0.2);
  border-radius: 4px 12px 12px 12px;
  padding: 8px 14px;
  font-size: 13.5px;
  color: #c8d8f0;
  line-height: 1.7;
  flex: 1;
}
phone sys {
  display: block;
  font-size: 11.5px;
  color: #607090;
  text-align: center;
  padding: 6px 18px 0;
  font-style: italic;
}

/* ========== 存档系统 ========== */
details:has(> summary:first-child) p {
  font-size: 12.5px;
  color: #8a7a50;
  text-align: center;
  padding: 6px 0 0 0;
  font-style: italic;
}

/* ========== 行动选项 opts ========== */
opts {
  display: block;
  background: linear-gradient(160deg, #161410 0%, #1a1810 100%);
  border: 1px solid #4a3a10;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 10px 0;
}
opts tip {
  display: block;
  font-size: 13px;
  color: #d4af37;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  padding-bottom: 8px;
  border-bottom: 1px solid #3d3010;
}
opts btn {
  display: block;
  background: linear-gradient(135deg, #1e1c10, #28240e);
  border: 1px solid #5a4a18;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: #c9b060;
  cursor: pointer;
  letter-spacing: 0.04em;
  line-height: 1.6;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
opts btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.08), transparent);
  transition: left 0.4s ease;
}
opts btn:hover {
  background: linear-gradient(135deg, #2a2614, #342e12);
  border-color: #d4af37;
  color: #f5e17a;
  box-shadow: 0 2px 16px rgba(212,175,55,0.2);
  transform: translateX(3px);
}
opts btn:hover::before {
  left: 150%;
}

/* ========== think 思维链隐藏 ========== */
think {
  display: none;
}