/* ==============================================
   【了不起的修仙模拟器 · 天道终端】
   仙气缭绕 · 五行流转 · 灵气光晕 · 法宝悬浮
   新增：灵光浮动 · 卡片悬浮 · 按钮流光 · 呼吸光晕
         · 太极标记 · 金色光标 · 列表符箓标记
         · 引用块呼吸 · 代码块仙韵 · 表格金线
   背景为深邃星空，仙道威严
   聊天区域强制不透明，直接复制全部代码即可使用
============================================== */

:root {
  --bg-main: #0d1119;
  --bg-card: rgba(22, 28, 42, 0.94);
  --bg-input: #141c2b;
  --text-primary: #e8e0d0;
  --text-secondary: #b0a590;
  --neon-gold: #d4a843;
  --neon-cyan: #7eb8c9;
  --neon-purple: #9b8ec4;
  --neon-jade: #5f9b8a;
  --neon-red: #c4554d;
  --glow-soft: 0 0 14px rgba(212, 168, 67, 0.3);
  --glow-strong: 0 0 24px rgba(126, 184, 201, 0.35);
  --font-display: "STKaiti", "KaiTi", "SimSun", "Microsoft YaHei", serif;
  --font-mono: "Courier New", "SimSun", monospace;
  font-size: 17px;
}

* {
  scrollbar-width: thin !important;
  scrollbar-color: var(--neon-gold) #0d1119 !important;
}

/* ===== 全局文字渲染优化 ===== */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== 全局背景：深邃星空 + 太极图案 + 浮动灵气 ===== */
body {
  background: var(--bg-main) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-display) !important;
  font-size: 17px !important;
  line-height: 1.6 !important;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(212, 168, 67, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(126, 184, 201, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(155, 142, 196, 0.04) 0%, transparent 50%),
    radial-gradient(1px 1px at 20% 30%, rgba(212,168,67,0.3), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(126,184,201,0.25), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(155,142,196,0.2), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(95,155,138,0.2), transparent);
  position: relative;
  overflow-x: hidden;
}

/* 全局浮动灵气1 */
body::before {
  content: "";
  position: fixed;
  top: -8%;
  left: -8%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -2;
  pointer-events: none;
  animation: qiFloat1 20s ease-in-out infinite;
}

/* 全局浮动灵气2 */
body::after {
  content: "";
  position: fixed;
  bottom: -12%;
  right: -8%;
  width: 65vw;
  height: 65vw;
  background: radial-gradient(circle, rgba(126, 184, 201, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -2;
  pointer-events: none;
  animation: qiFloat2 24s ease-in-out infinite;
}

@keyframes qiFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(6vw, 4vh) scale(1.08); }
  50% { transform: translate(-2vw, 10vh) scale(0.92); }
  75% { transform: translate(-8vw, -3vh) scale(1.15); }
}

@keyframes qiFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-10vw, -6vh) scale(1.25); }
  66% { transform: translate(5vw, -12vh) scale(0.82); }
}

/* 全局字体大小继承 */
p, div, span, li, a, td, th, label, button,
input, select, textarea, .form-title, .regret-title,
.panel-title, .title, h1, h2, h3, h4, h5, h6,
.tab-btn, .event-content, .config-input, .config-select,
.chat-container, .container, .card, .box, .wrapper,
.content, .sidebar, .footer {
  font-size: inherit !important;
}

/* ===== 无序列表：符箓标记 ===== */
ul {
  list-style: none !important;
  padding-left: 1.5em !important;
}

ul li {
  position: relative;
  padding-left: 0.5em;
}

ul li::before {
  content: "◆";
  position: absolute;
  left: -1.3em;
  color: var(--neon-gold);
  font-size: 0.6em;
  text-shadow: 0 0 8px var(--neon-gold), 0 0 15px rgba(212,168,67,0.5);
  animation: talismanGlow 2.5s ease-in-out infinite;
  line-height: inherit;
}

@keyframes talismanGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* 有序列表 */
ol {
  padding-left: 1.8em !important;
}

ol li::marker {
  color: var(--neon-gold);
  text-shadow: 0 0 6px var(--neon-gold);
  font-weight: bold;
}

/* ===== 引用块 ===== */
blockquote {
  border-left: 3px solid var(--neon-gold) !important;
  background: rgba(212, 168, 67, 0.05) !important;
  margin: 1em 0 !important;
  padding: 0.8em 1.2em !important;
  border-radius: 0 8px 8px 0 !important;
  color: var(--text-secondary) !important;
  font-style: italic;
  box-shadow: inset 0 0 15px rgba(212, 168, 67, 0.08);
  animation: quoteBreath 4s ease-in-out infinite;
}

@keyframes quoteBreath {
  0%, 100% { box-shadow: inset 0 0 15px rgba(212, 168, 67, 0.04); }
  50% { box-shadow: inset 0 0 25px rgba(212, 168, 67, 0.12); }
}

/* ===== 代码块 & 行内代码 ===== */
code {
  background: rgba(155, 142, 196, 0.12) !important;
  color: var(--neon-purple) !important;
  padding: 0.2em 0.5em !important;
  border-radius: 4px !important;
  font-family: var(--font-mono) !important;
  font-size: 0.9em;
  border: 1px solid rgba(155, 142, 196, 0.2);
}

pre {
  background: rgba(13, 17, 25, 0.95) !important;
  border: 1px solid var(--neon-gold) !important;
  border-radius: 10px !important;
  padding: 1em !important;
  box-shadow: var(--glow-soft), inset 0 0 20px rgba(212, 168, 67, 0.04);
  overflow-x: auto;
}

pre code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: var(--text-primary) !important;
}

/* ===== 表格 ===== */
table {
  border-collapse: collapse !important;
  width: 100%;
  margin: 1em 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--glow-soft);
}

th {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.25), rgba(126, 184, 201, 0.15)) !important;
  color: var(--neon-gold) !important;
  padding: 10px 14px !important;
  text-align: left;
  font-weight: bold;
  text-shadow: 0 0 8px var(--neon-gold);
  border-bottom: 2px solid var(--neon-gold) !important;
}

td {
  background: rgba(13, 17, 25, 0.6) !important;
  padding: 8px 14px !important;
  border-bottom: 1px solid rgba(212, 168, 67, 0.15) !important;
  color: var(--text-primary) !important;
}

tr:hover td {
  background: rgba(212, 168, 67, 0.08) !important;
  box-shadow: inset 0 0 15px rgba(212, 168, 67, 0.06);
}

/* ===== 容器与卡片：悬浮 + 流光边框 ===== */
div[class*="container"],
div[class*="panel"],
div[class*="card"] {
  background: var(--bg-card) !important;
  border: 1px solid transparent !important;
  background-image: linear-gradient(var(--bg-card), var(--bg-card)),
                    linear-gradient(135deg, var(--neon-gold), var(--neon-cyan), var(--neon-purple)) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  border-radius: 14px !important;
  box-shadow: var(--glow-soft), 0 0 3px rgba(212,168,67,0.4) !important;
  position: relative;
  animation: cardFloat 8s ease-in-out infinite;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  30% { transform: translateY(-5px); }
  60% { transform: translateY(-1px); }
}

/* 仙器流光 */
@keyframes immortalPulse {
  0%   { opacity: 0.1; transform: scale(1); }
  35%  { opacity: 0.25; transform: scale(1.006); }
  70%  { opacity: 0.14; transform: scale(1.001); }
  100% { opacity: 0.1; transform: scale(1); }
}

div[class*="container"]::before,
div[class*="card"]::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 16px;
  background: linear-gradient(45deg, transparent, var(--neon-gold), var(--neon-cyan), transparent);
  z-index: -1;
  opacity: 0.14;
  animation: immortalPulse 4.2s infinite alternate;
}

/* 悬停增强 */
div[class*="container"]:hover,
div[class*="card"]:hover {
  animation-play-state: paused;
  transform: translateY(-5px) !important;
  border-color: var(--neon-gold) !important;
  box-shadow: 0 0 30px rgba(212,168,67,0.6), 0 0 15px rgba(126,184,201,0.4) !important;
}

/* ===== 按钮与交互元素 ===== */
button.active,
.tab-btn.active,
div[class*="active"] {
  color: var(--neon-gold) !important;
  background: linear-gradient(135deg, rgba(212,168,67,0.18), rgba(126,184,201,0.15)) !important;
  font-weight: bold !important;
  text-shadow: 0 0 12px var(--neon-gold) !important;
  border-bottom: 2px solid var(--neon-gold) !important;
  box-shadow: 0 2px 18px rgba(212,168,67,0.4) !important;
}

button:hover,
.tab-btn:hover {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 25px rgba(126,184,201,0.6), 0 0 12px rgba(212,168,67,0.4) !important;
  transform: translateY(-2px) !important;
}

/* ===== 输入框 ===== */
input,
select,
textarea,
.config-input {
  background: var(--bg-input) !important;
  border: 1px solid rgba(212,168,67,0.35) !important;
  color: var(--text-primary) !important;
  border-radius: 8px !important;
  padding: 10px !important;
  transition: all 0.4s ease;
  caret-color: var(--neon-gold) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--neon-gold) !important;
  box-shadow: 0 0 18px rgba(212,168,67,0.7), inset 0 0 12px rgba(126,184,201,0.2) !important;
  animation: inputBreath 2.5s ease-in-out infinite;
  caret-color: var(--neon-cyan) !important;
}

@keyframes inputBreath {
  0%, 100% { box-shadow: 0 0 18px rgba(212,168,67,0.5), inset 0 0 12px rgba(126,184,201,0.15); }
  50% { box-shadow: 0 0 28px rgba(212,168,67,0.9), inset 0 0 18px rgba(126,184,201,0.3); }
}

select option {
  background: #0d1119 !important;
  color: #e8e0d0 !important;
}

/* ===== 提交按钮：灵气流光 ===== */
button[type="submit"],
button[class*="submit"],
.config-submit,
.send-btn {
  background: linear-gradient(135deg, #1a2030, #1f2a3a) !important;
  border: 1px solid var(--neon-gold) !important;
  color: var(--neon-gold) !important;
  font-weight: bold !important;
  letter-spacing: 3px !important;
  text-shadow: 0 0 8px var(--neon-gold), 0 0 15px rgba(212,168,67,0.6) !important;
  border-radius: 8px !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease !important;
  z-index: 1;
}

/* 按钮灵气流光 */
button[type="submit"]::after,
.send-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 300%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(212,168,67,0.25) 30%, 
    rgba(126,184,201,0.4) 50%, 
    rgba(212,168,67,0.25) 70%, 
    transparent 100%);
  transform: skewX(-25deg);
  transition: 0.5s;
  z-index: -1;
  animation: btnShimmer 5s linear infinite;
}

@keyframes btnShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

button[type="submit"]:hover,
.send-btn:hover {
  background: linear-gradient(135deg, #2a3040, #3a4058) !important;
  border-color: var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
  box-shadow: 0 0 30px rgba(126,184,201,0.8), 0 0 15px rgba(212,168,67,0.5) !important;
  text-shadow: 0 0 15px var(--neon-cyan) !important;
}

/* ===== 信息展示区 ===== */
.event-content,
div[class*="content"] {
  background: rgba(13,17,25,0.92) !important;
  border: 1px dashed rgba(212,168,67,0.35) !important;
  border-radius: 10px !important;
  color: #d8d0c0 !important;
  font-family: var(--font-mono) !important;
  box-shadow: inset 0 0 20px rgba(212,168,67,0.06) !important;
  padding: 14px !important;
  line-height: 1.8 !important;
}

/* ===== 标题：金光灵韵 ===== */
h1, h2, h3,
.form-title, .regret-title, .panel-title, .title {
  color: var(--neon-gold) !important;
  text-shadow: 0 0 12px var(--neon-gold), 0 0 24px rgba(212,168,67,0.6) !important;
  letter-spacing: 4px !important;
  background: linear-gradient(90deg, var(--neon-gold), var(--neon-cyan), var(--neon-gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
  animation: titleShine 4s linear infinite;
}

@keyframes titleShine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ===== 底部/侧边栏 ===== */
.regret-wrap,
div[class*="sidebar"],
div[class*="footer"] {
  border-top: 1px solid rgba(212,168,67,0.35) !important;
  background: rgba(0, 0, 0, 0.3) !important;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0d1119; }
::-webkit-scrollbar-thumb {
  background: var(--neon-gold);
  border-radius: 4px;
  box-shadow: 0 0 12px var(--neon-gold);
  animation: scrollGlow 2.5s ease-in-out infinite;
}

@keyframes scrollGlow {
  0%, 100% { box-shadow: 0 0 8px var(--neon-gold); }
  50% { box-shadow: 0 0 20px var(--neon-cyan), 0 0 8px var(--neon-gold); }
}

/* ===== 强制聊天背景不透明 ===== */
[class*="chat"],
[class*="message"],
[class*="conversation"],
[class*="dialog"],
[class*="talk"],
[class*="chat-container"] {
  background: var(--bg-card) !important;
  background-image: none !important;
}

/* ===== 全局选中文字 ===== */
::selection {
  background: var(--neon-gold);
  color: #0d1119;
  text-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
}
::-moz-selection {
  background: var(--neon-gold);
  color: #0d1119;
  text-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
}

/* ==============================================
   【天道终端 · 光标美化系统】
   飞剑光标 · 符笔输入 · 太极点击 · 八卦加载
============================================== */

/* 普通状态：飞剑光标 */
body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 3l6 18 2-7 7-2L3 3z' fill='%23d4a843' stroke='%237eb8c9' stroke-width='1' stroke-linejoin='round'/%3E%3Ccircle cx='3' cy='3' r='2' fill='%23d4a843' opacity='0.8'/%3E%3C/svg%3E") 3 3, auto;
}

/* 可点击元素：太极光标 */
:where(
  a, button, [role="button"],
  input[type="submit"], input[type="button"], input[type="reset"],
  .config-submit, .send-btn,
  .tab-btn, .panel-title, .form-title, .title,
  .btn, .button, [onclick], label, select, summary,
  [tabindex]:not([tabindex="-1"]),
  .link, .nav-link, .menu-item
):not(
  input[type="text"], input[type="search"], input[type="password"],
  input[type="email"], input[type="number"], textarea,
  [contenteditable="true"], .config-input
) {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12' fill='none' stroke='%23d4a843' stroke-width='2'/%3E%3Cpath d='M14 2 A12 12 0 0 1 26 14 A12 12 0 0 1 14 26' fill='none' stroke='%237eb8c9' stroke-width='3'/%3E%3Ccircle cx='14' cy='14' r='3' fill='%23d4a843' opacity='0.7'/%3E%3Ccircle cx='14' cy='14' r='1.5' fill='%237eb8c9' opacity='0.6'/%3E%3C/svg%3E") 14 14, pointer;
}

/* 文本输入区：符笔光标 */
input[type="text"], input[type="search"], input[type="password"], input[type="email"],
input[type="number"], textarea, [contenteditable="true"], .config-input {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='24' viewBox='0 0 14 24'%3E%3Crect x='5' y='1' width='2' height='18' fill='%23d4a843' rx='1'/%3E%3Cpath d='M1 22 L6 18 L7 22 L6 19 Z' fill='%237eb8c9'/%3E%3Ccircle cx='6' cy='3' r='2' fill='%23d4a843' opacity='0.7'/%3E%3C/svg%3E") 7 22, text !important;
}

/* 加载状态：八卦旋转 */
@keyframes baguaSpin {
  0%   { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='%23d4a843' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='10' fill='none' stroke='%237eb8c9' stroke-width='1.5' stroke-dasharray='5 15'/%3E%3Ccircle cx='16' cy='16' r='3' fill='%23d4a843' opacity='0.8'/%3E%3C/svg%3E") 16 16, progress; }
  50%  { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='%237eb8c9' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='10' fill='none' stroke='%23d4a843' stroke-width='1.5' stroke-dasharray='8 12'/%3E%3Ccircle cx='16' cy='16' r='3' fill='%237eb8c9' opacity='0.8'/%3E%3C/svg%3E") 16 16, progress; }
  100% { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='%23d4a843' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='10' fill='none' stroke='%237eb8c9' stroke-width='1.5' stroke-dasharray='5 15'/%3E%3Ccircle cx='16' cy='16' r='3' fill='%23d4a843' opacity='0.8'/%3E%3C/svg%3E") 16 16, progress; }
}

.wait, .loading, [aria-busy="true"] {
  animation: baguaSpin 1.5s linear infinite;
}

/* 禁用状态：封印光标 */
:disabled, [disabled], .disabled, [aria-disabled="true"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12' fill='none' stroke='%23c4554d' stroke-width='2' opacity='0.6'/%3E%3Cline x1='6' y1='6' x2='22' y2='22' stroke='%23c4554d' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, not-allowed;
}