/* Google Fonts - 在聊天平台中，如果平台支持，可以预加载这些字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Oswald:wght@500;700&display=swap');

/* ----- 容器与变量定义 ----- */
ai {
  /* 变量定义 */
  --bg: #101012;
  --panel: #1a1a1e;
  --text: #dcdcdc;
  --text-dim: #888;
  --red: #c70014;
  --glow-red: rgba(229, 9, 20, 0.7);
  --blue: #00aaff;
  --glow-blue: rgba(0, 170, 255, 0.6);
  --gold: #ffc107;
  --border: #333;
  --font-title: 'Oswald', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;

  /* 基础样式 */
  display: block;
  background-color: var(--panel);
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjMTExIj48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDVMNSAwWk02IDRMNCA2Wk0tMSAxSDEgLTFaIiBzdHJva2U9IiMyODI4MjgiIHN0cm9rZS13aWR0aD0iMSI+PC9wYXRoPgo8L3N2Zz4=');
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  padding: 15px;
  font-family: var(--font-body);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  position: relative;
  overflow: hidden;
}

/* ----- 动态辉光动画 ----- */
@keyframes neon-pulse {
  0%, 100% { box-shadow: 0 0 5px var(--glow-red), 0 0 10px var(--glow-red); }
  50% { box-shadow: 0 0 15px var(--glow-red), 0 0 25px var(--glow-red); }
}

@keyframes text-flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow: 0 0 4px var(--gold), 0 0 8px var(--gold), 0 0 12px var(--red);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

/* ----- 装饰性元素 ----- */
ai::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background-color: var(--red);
  animation: neon-pulse 2.5s infinite ease-in-out;
}

/* ----- 结构与内容排版 ----- */
ai hd {
  display: block;
  font-size: 0.85em;
  color: var(--text-dim);
  font-style: italic;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

ai article p {
  margin-bottom: 1em;
}
ai article p:last-child {
  margin-bottom: 0;
}

ai details {
  margin-top: 15px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

ai summary {
  font-family: var(--font-title);
  font-size: 1.2em;
  color: var(--red);
  cursor: pointer;
  list-style: none; /* 隐藏默认三角 */
  padding-bottom: 5px;
}
ai summary::-webkit-details-marker {
  display: none; /* 兼容 Safari */
}

ai .s-con {
  display: grid;
  gap: 15px;
  padding-top: 10px;
}

/* ----- 状态面板分区样式 ----- */
ai .s-con p {
  background-color: rgba(0,0,0,0.2);
  padding: 25px 15px 15px 15px;
  position: relative;
  border-top: 2px solid var(--border);
}

ai .s-con p::before {
  content: attr(t); /* 从't'属性获取标题 */
  position: absolute;
  top: 0;
  left: 0;
  padding: 2px 10px;
  background-color: var(--border);
  color: var(--text);
  font-family: var(--font-title);
  font-size: 0.9em;
  letter-spacing: 1px;
}

/* ----- 状态面板内元素样式 ----- */
ai d { display: block; margin-bottom: 4px; }
ai f {
  display: block;
  font-family: var(--font-title);
  font-size: 1.8em;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 10px;
  animation: text-flicker 3s infinite linear; /* 应用辉光动画 */
}

ai .s-con p[t="人间绘卷"] d,
ai .s-con p[t="行动选项"] d {
  position: relative;
}

ai[identity="yakuza"] { --red: #e60012; }
ai[identity="police"] { --red: #0077b6; }
ai[identity="oumi"] { --red: #e8b340; }

/* 关系状态 */
ai span[r="bad"] { color: var(--red); font-weight: bold; }
ai span[r="good"] { color: var(--blue); }
ai span[r="neu"] { color: var(--text-dim); }

/* 世界动态 */
ai val { color: var(--blue); font-weight: bold; }

/* 行动选项 */
ai p[t="行动选项"] { counter-reset: actions; }
ai p[t="行动选项"] d {
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
ai p[t="行动选项"] d:not(:last-child)::before {
  counter-increment: actions;
  content: counter(actions) ". ";
  color: var(--text-dim);
  margin-right: 5px;
}
ai p[t="行动选项"] d:hover {
  color: var(--red);
  transform: translateX(5px);
}
ai p[t="行动选项"] d:last-child {
  font-style: italic;
  color: var(--text-dim);
}


/* ----- 高级交互：Tooltip ----- */
ai p[t="人间绘卷"] d:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background-color: #000;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--red);
  font-size: 0.9em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}
ai p[t="人间绘卷"] d::after { /* 初始隐藏 */
  content: attr(data-tooltip);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}