/* ============================================
   神豪系统 - 至尊UI美化方案
   支持：四主题切换 | 打字机效果 | 3D卡片 | 时间轴动画
   作者：Kiro AI Engine
   ============================================ */

/* ========== 基础重置与全局配置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

god {
  display: block;
  min-height: 100vh;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 
               'Microsoft YaHei', '微软雅黑', sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: #e0e0e0;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a24 100%);
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* 全局背景纹理 */
god::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

god > * {
  position: relative;
  z-index: 1;
}

/* ========== 主题配色系统 ========== */
/* 默认主题：神豪金 */
god[theme="default"] {
  --primary: #d4af37;
  --primary-light: #ffd700;
  --primary-glow: rgba(212, 175, 55, 0.4);
  --accent: #e84393;
  --accent-glow: rgba(232, 67, 147, 0.3);
  --bg-card: rgba(26, 26, 36, 0.85);
  --bg-card-hover: rgba(35, 35, 48, 0.95);
  --text-primary: #f5f5f5;
  --text-secondary: #b8b8b8;
  --border: rgba(212, 175, 55, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glow-strong: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow);
}

/* 赛博朋克主题 */
god[theme="cyber"] {
  --primary: #00f0ff;
  --primary-light: #bd00ff;
  --primary-glow: rgba(0, 240, 255, 0.5);
  --accent: #ff006e;
  --accent-glow: rgba(255, 0, 110, 0.4);
  --bg-card: rgba(13, 2, 33, 0.9);
  --bg-card-hover: rgba(26, 11, 46, 0.95);
  --text-primary: #e0ffff;
  --text-secondary: #a0c4ff;
  --border: rgba(0, 240, 255, 0.3);
  --shadow: 0 8px 32px rgba(0, 240, 255, 0.2);
  --glow-strong: 0 0 20px var(--primary-glow), 0 0 40px var(--accent-glow);
  background: linear-gradient(135deg, #0d0221 0%, #1a0b2e 100%);
}

/* 血色修罗主题 */
god[theme="blood"] {
  --primary: #8b0000;
  --primary-light: #ff6347;
  --primary-glow: rgba(139, 0, 0, 0.6);
  --accent: #ffd700;
  --accent-glow: rgba(255, 215, 0, 0.4);
  --bg-card: rgba(26, 0, 0, 0.9);
  --bg-card-hover: rgba(51, 0, 0, 0.95);
  --text-primary: #ffebee;
  --text-secondary: #ffcdd2;
  --border: rgba(139, 0, 0, 0.4);
  --shadow: 0 8px 32px rgba(139, 0, 0, 0.3);
  --glow-strong: 0 0 20px var(--primary-glow), 0 0 40px rgba(255, 99, 71, 0.3);
  background: linear-gradient(135deg, #1a0000 0%, #330000 100%);
}

/* 冰冷商战主题 */
god[theme="ice"] {
  --primary: #4a90e2;
  --primary-light: #c0c0c0;
  --primary-glow: rgba(74, 144, 226, 0.5);
  --accent: #00bfff;
  --accent-glow: rgba(0, 191, 255, 0.4);
  --bg-card: rgba(15, 20, 25, 0.9);
  --bg-card-hover: rgba(26, 35, 50, 0.95);
  --text-primary: #e8f4f8;
  --text-secondary: #b0bec5;
  --border: rgba(74, 144, 226, 0.25);
  --shadow: 0 8px 32px rgba(0, 191, 255, 0.15);
  --glow-strong: 0 0 20px var(--primary-glow), 0 0 40px rgba(192, 192, 192, 0.2);
  background: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);
}

/* ========== 主题切换器 ========== */
theme-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

theme-switch b {
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 0 10px var(--primary-glow);
}

theme-switch btn {
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--bg-card-hover), rgba(0,0,0,0.3));
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

theme-switch btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--primary-glow);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

theme-switch btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  transform: translateY(-2px);
}

theme-switch btn:hover::before {
  width: 100%;
  height: 100%;
}

theme-switch btn:active {
  transform: scale(0.95);
}

/* ========== 折叠栏通用样式 ========== */
details {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

details:hover {
  border-color: var(--primary);
  box-shadow: var(--glow-strong), var(--shadow);
}

details[open] {
  border-color: var(--primary);
}

summary {
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, var(--primary-glow) 0%, transparent 100%);
  position: relative;
  transition: all 0.3s ease;
}

summary::before {
  content: '▶';
  font-size: 12px;
  transition: transform 0.3s ease;
  color: var(--primary);
}

details[open] summary::before {
  transform: rotate(90deg);
}

summary:hover {
  background: linear-gradient(90deg, var(--primary-glow) 0%, var(--accent-glow) 100%);
  text-shadow: 0 0 10px var(--primary-glow);
}

summary::marker,
summary::-webkit-details-marker {
  display: none;
}

/* 标题属性装饰 */
summary[t]::after {
  content: '';
  position: absolute;
  right: 24px;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

/* ========== 思维链模块 ========== */
think {
  display: block;
  padding: 20px 24px;
}

think > div {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
}

think > div:last-child {
  margin-bottom: 0;
}

think h {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

think p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

think p::before {
  content: '•';
  position: absolute;
  left: 8px;
  color: var(--primary);
}

think p:last-child {
  margin-bottom: 0;
}

think b {
  color: var(--primary-light);
  font-weight: 600;
}

/* 元信息栏 */
think div[c="meta"] {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(232, 67, 147, 0.05));
  border-left-color: var(--accent);
  font-size: 14px;
  padding: 12px 16px;
}

/* 打字机效果 */
think div[typing] p {
  overflow: hidden;
  border-right: 2px solid var(--primary);
  white-space: nowrap;
  animation: typing 2s steps(60) forwards, blink 0.75s step-end infinite;
  animation-delay: calc(var(--index, 0) * 0.5s);
  width: 0;
}

think div[typing] p:nth-child(1) { --index: 0; }
think div[typing] p:nth-child(2) { --index: 1; }
think div[typing] p:nth-child(3) { --index: 2; }
think div[typing] p:nth-child(4) { --index: 3; }
think div[typing] p:nth-child(5) { --index: 4; }

@keyframes typing {
  from { width: 0; }
  to { width: 100%; border-right: none; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* ========== 正文模块 ========== */
article {
  display: block;
  padding: 32px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 2;
  text-align: justify;
  position: relative;
}

article::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 80px;
  color: var(--primary);
  opacity: 0.1;
  font-family: Georgia, serif;
}

article::after {
  content: '"';
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 80px;
  color: var(--primary);
  opacity: 0.1;
  font-family: Georgia, serif;
}

/* ========== 场景时间卡片 ========== */
scene {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

scene > div {
  flex: 1;
  min-width: 280px;
  padding: 16px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

scene > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

scene > div:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--primary-glow), var(--shadow);
}

scene s {
  font-size: 24px;
  text-decoration: none;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

scene > div:last-child {
  color: var(--text-secondary);
}

/* ========== 记忆回廊 ========== */
mem {
  display: block;
  padding: 20px 24px;
}

mem > h {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin: 24px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

mem > h:first-of-type {
  margin-top: 0;
}

mem div[c="mech"] {
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.1), rgba(212, 175, 55, 0.05));
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

/* 时间轴容器 */
timeline {
  display: block;
  position: relative;
  overflow-x: auto;
  padding-bottom: 10px;
}

timeline::-webkit-scrollbar {
  height: 8px;
}

timeline::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

timeline::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

timeline::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table thead {
  background: linear-gradient(135deg, var(--primary-glow), var(--accent-glow));
  position: sticky;
  top: 0;
  z-index: 10;
}

table thead th {
  padding: 12px 16px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid var(--primary);
  white-space: nowrap;
}

table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

table tbody tr:hover {
  background: rgba(212, 175, 55, 0.05);
  transform: scale(1.01);
}

table tbody td {
  padding: 14px 16px;
  color: var(--text-secondary);
  vertical-align: top;
}

table tbody td:first-child {
  color: var(--primary);
  font-weight: 600;
  font-size: 16px;
}

/* 长期记忆表格 */
table[c="ltm"] tbody td:last-child {
  max-width: 600px;
  line-height: 1.8;
  text-align: justify;
}

/* 短期记忆表格 */
table[c="stm"] tbody td:last-child {
  max-width: 400px;
}

/* 时间轴滚入动画 */
tr[scroll-in] {
  opacity: 0;
  transform: translateX(-30px);
  animation: scrollIn 0.6s ease forwards;
  animation-delay: calc(var(--row-index, 0) * 0.15s);
}

table tbody tr:nth-child(1) { --row-index: 0; }
table tbody tr:nth-child(2) { --row-index: 1; }
table tbody tr:nth-child(3) { --row-index: 2; }
table tbody tr:nth-child(4) { --row-index: 3; }
table tbody tr:nth-child(5) { --row-index: 4; }
table tbody tr:nth-child(6) { --row-index: 5; }

@keyframes scrollIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== 系统模块 ========== */
sys {
  display: block;
  padding: 20px 24px;
}

sys > div {
  margin-bottom: 24px;
}

sys > div:last-child {
  margin-bottom: 0;
}

sys h {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 神豪商城 */
div[c="mall"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* 3D悬浮卡片 */
card3d {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--bg-card-hover), rgba(0, 0, 0, 0.4));
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}

card3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-glow), var(--accent-glow));
  opacity: 0;
  border-radius: 12px;
  transition: opacity 0.4s ease;
}

card3d:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 
              0 0 30px var(--primary-glow);
}

card3d:hover::before {
  opacity: 0.15;
}

card3d i {
  font-size: 36px;
  font-style: normal;
  filter: drop-shadow(0 0 10px var(--primary-glow));
  transform: translateZ(20px);
  transition: transform 0.4s ease;
}

card3d:hover i {
  transform: translateZ(40px) scale(1.1);
}

card3d b {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
  transform: translateZ(10px);
}

card3d span {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  padding: 4px 12px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 20px;
  transform: translateZ(5px);
}

/* 系统公告 */
div[c="notice"] {
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.1), rgba(212, 175, 55, 0.05));
  padding: 16px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

div[c="notice"] p {
  padding: 8px 0;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  padding-left: 24px;
}

div[c="notice"] p::before {
  position: absolute;
  left: 0;
  font-size: 16px;
}

/* 当前任务 */
div[c="task"] p {
  padding: 12px 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

div[c="task"] b {
  color: var(--primary);
  min-width: 80px;
}

/* 进度条 */
prog {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

prog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--v, 0);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  box-shadow: 0 0 10px var(--primary-glow);
  animation: progressFill 1.5s ease forwards;
}

prog[v="80"]::before { --v: 80%; }
prog[v="25"]::before { --v: 25%; }

@keyframes progressFill {
  from {
    width: 0;
  }
}

/* 女主情报 */
div[c="intel"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

div[c="girl-intel"] {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

div[c="girl-intel"]:hover {
  background: rgba(232, 67, 147, 0.1);
  border-left-color: var(--primary);
  transform: translateX(5px);
}

div[c="girl-intel"] b {
  color: var(--primary-light);
  font-size: 15px;
}

/* ========== 舆情风暴 ========== */
rumor {
  display: block;
  padding: 20px 24px;
}

rumor > div {
  margin-bottom: 24px;
}

rumor > div:last-child {
  margin-bottom: 0;
}

rumor h {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

rumor p {
  padding: 10px 16px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  color: var(--text-secondary);
  line-height: 1.8;
  transition: all 0.3s ease;
}

rumor p:hover {
  background: rgba(212, 175, 55, 0.05);
  transform: translateX(5px);
}

rumor p b {
  color: var(--primary-light);
}

rumor p[c="hot"] {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(232, 67, 147, 0.1), transparent);
}

rumor p[c="weibo"],
rumor p[c="zhihu"],
rumor p[c="douyin"] {
  border-left: 3px solid var(--primary);
}

/* 暗线情报 */
div[c="shadow"] {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(26, 26, 36, 0.3));
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

div[c="shadow"] p {
  position: relative;
  padding-left: 24px;
}

div[c="shadow"] p::before {
  content: '🔹';
  position: absolute;
  left: 0;
}

/* ========== 主角面板 ========== */
mc {
  display: block;
  padding: 20px 24px;
}

mc > div {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

mc > div:last-child {
  margin-bottom: 0;
}

mc p {
  padding: 8px 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

mc b {
  color: var(--primary);
  min-width: 100px;
  display: inline-block;
}

mc div[c="info"] {
  border-left: 3px solid var(--primary);
}

mc div[c="asset"] {
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.05), transparent);
}

mc div[c="body"] {
  border-left: 3px solid var(--primary-light);
}

mc div[c="skill"] {
  border-left: 3px solid var(--accent);
}

/* NPC关系雷达 */
mc div[c="radar"] {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(26, 26, 36, 0.3));
  border: 1px solid var(--border);
  padding: 20px;
}

mc div[c="radar"] h {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

wave {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

wave > div {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: all 0.3s ease;
}

wave > div:hover {
  transform: translateX(5px);
}

/* 脉冲点 */
dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

div[pulse] dot {
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

/* 仇恨脉冲 */
div[c="hate"] dot {
  background: #ff0000;
  box-shadow: 0 0 10px #ff0000;
}

div[c="hate"] dot::before {
  background: rgba(255, 0, 0, 0.3);
  animation: wavePulse 2s ease infinite;
}

div[c="hate"] {
  border-left: 3px solid #ff0000;
}

/* 好感脉冲 */
div[c="love"] dot {
  background: #ff69b4;
  box-shadow: 0 0 10px #ff69b4;
}

div[c="love"] dot::before {
  background: rgba(255, 105, 180, 0.3);
  animation: wavePulse 2s ease infinite;
}

div[c="love"] {
  border-left: 3px solid #ff69b4;
}

/* 悔恨脉冲 */
div[c="regret"] dot {
  background: #ffa500;
  box-shadow: 0 0 10px #ffa500;
}

div[c="regret"] dot::before {
  background: rgba(255, 165, 0, 0.3);
  animation: wavePulse 2s ease infinite;
}

div[c="regret"] {
  border-left: 3px solid #ffa500;
}

/* 商业脉冲 */
div[c="biz"] dot {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

div[c="biz"] dot::before {
  background: var(--primary-glow);
  animation: wavePulse 2s ease infinite;
}

div[c="biz"] {
  border-left: 3px solid var(--primary);
}

@keyframes wavePulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

wave > div b {
  color: var(--primary-light);
  flex-shrink: 0;
}

/* ========== 女性面板 ========== */
girl {
  display: block;
  padding: 20px 24px;
}

girl > div {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

girl > div:last-child {
  margin-bottom: 0;
}

girl div[c="base"] {
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.05), transparent);
}

girl p {
  padding: 8px 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

girl b {
  color: var(--primary);
  min-width: 100px;
  display: inline-block;
}

/* 好感度进度条 */
p[c="favor"],
p[c="regret"] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

fbar {
  height: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

fbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: calc(var(--v, 0) / var(--max, 100) * 100%);
  background: linear-gradient(90deg, #ff69b4, #ff1493);
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(255, 105, 180, 0.6);
  animation: barFill 2s ease forwards;
}

fbar[type="regret"]::before {
  background: linear-gradient(90deg, #ffa500, #ff6347);
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.6);
}

fbar[v="25"] { --v: 25; }
fbar[v="5"] { --v: 5; }
fbar[v="88"] { --v: 88; }

@keyframes barFill {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 极品躯体 */
girl div[c="body"] {
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.1), rgba(139, 0, 0, 0.05));
  border-left: 3px solid var(--accent);
}

girl div[c="body"] h {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

girl div[c="body"] p {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

girl div[c="body"] i {
  font-size: 18px;
  font-style: normal;
  flex-shrink: 0;
}

/* 仪态 */
girl div[c="look"] {
  border-left: 3px solid var(--primary-light);
}

/* 心声透视 */
girl div[c="voice"],
man div[c="voice"] {
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(0, 191, 255, 0.05));
  border-left: 3px solid var(--accent);
  position: relative;
}

girl div[c="voice"] h,
man div[c="voice"] h {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

girl div[c="voice"] p,
man div[c="voice"] p {
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.8;
  padding-left: 24px;
  position: relative;
}

girl div[c="voice"] p::before,
man div[c="voice"] p::before {
  content: '💭';
  position: absolute;
  left: 0;
  font-size: 18px;
}

/* ========== 男性NPC面板 ========== */
man {
  display: block;
  padding: 20px 24px;
}

man p {
  padding: 10px 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

man b {
  color: var(--primary);
  min-width: 100px;
  display: inline-block;
}

/* ========== 行动选项 ========== */
act {
  display: block;
  padding: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

act h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* 倒计时提示 */
timer {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.2), rgba(255, 0, 0, 0.1));
  border-radius: 20px;
  border: 1px solid var(--accent);
  animation: timerPulse 2s ease infinite;
}

@keyframes timerPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(232, 67, 147, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(232, 67, 147, 0.6);
  }
}

act > div {
  padding: 16px 20px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--bg-card-hover), rgba(0, 0, 0, 0.4));
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

act > div:last-child {
  margin-bottom: 0;
}

act > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

act > div:hover {
  border-color: var(--primary);
  transform: translateX(8px);
  box-shadow: 0 0 20px var(--primary-glow);
}

act > div:hover::before {
  width: 100%;
  opacity: 0.1;
}

/* 紧迫感等级 */
act > div[urgent="low"]::before {
  background: linear-gradient(180deg, #4a90e2, #00bfff);
}

act > div[urgent="mid"]::before {
  background: linear-gradient(180deg, #ffa500, #ff6347);
}

act > div[urgent="high"]::before {
  background: linear-gradient(180deg, #ff0000, #8b0000);
  animation: urgentFlash 1.5s ease infinite;
}

@keyframes urgentFlash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

act > div[urgent="high"] {
  border-color: rgba(255, 0, 0, 0.4);
  animation: urgentShake 2s ease infinite;
}

@keyframes urgentShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  75% {
    transform: translateX(2px);
  }
}

act > div[c="custom"] {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(232, 67, 147, 0.05));
  border-style: dashed;
  border-color: var(--primary);
}

act > div[c="custom"]:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(232, 67, 147, 0.1));
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
  god {
    padding: 12px;
    font-size: 14px;
  }

  theme-switch {
    padding: 12px 16px;
  }

  theme-switch btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  summary {
    padding: 14px 16px;
    font-size: 15px;
  }

  article {
    padding: 20px;
    font-size: 15px;
  }

  scene {
    flex-direction: column;
  }

  scene > div {
    min-width: 100%;
  }

  div[c="mall"] {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  card3d {
    padding: 16px 12px;
  }

  card3d i {
    font-size: 28px;
  }

  card3d b {
    font-size: 13px;
  }

  table {
    font-size: 13px;
  }

  table thead th,
  table tbody td {
    padding: 10px 12px;
  }

  act h {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  timer {
    font-size: 13px;
    padding: 5px 12px;
  }
}

@media (max-width: 480px) {
  god {
    font-size: 13px;
  }

  summary {
    font-size: 14px;
  }

  article {
    font-size: 14px;
  }

  div[c="mall"] {
    grid-template-columns: 1fr 1fr;
  }

  wave > div {
    font-size: 13px;
  }
}

/* ========== 打印样式 ========== */
@media print {
  god {
    background: white;
    color: black;
  }

  god::before {
    display: none;
  }

  details {
    border: 1px solid #ccc;
  }

  summary::before {
    display: none;
  }

  details[open] summary::before {
    display: none;
  }

  card3d,
  act > div,
  wave > div {
    break-inside: avoid;
  }
}

/* ========== 辅助功能 ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  god {
    --border: rgba(255, 255, 255, 0.5);
  }

  details {
    border-width: 2px;
  }

  summary {
    font-weight: 700;
  }
}

/* ========== 附加装饰效果 ========== */
/* 顶部光晕 */
god::after {
  content: '';
  position: fixed;
  top: -50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.15;
  z-index: 0;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* 选中文本样式 */
::selection {
  background: var(--primary-glow);
  color: var(--text-primary);
}

::-moz-selection {
  background: var(--primary-glow);
  color: var(--text-primary);
}