/* ============================================================
   core/common.css — 公共样式表
   ============================================================ */

/* ---------- 自定义字体 ---------- */
@font-face {
  font-family: 'GenshinUI';
  src: url('https://www.gensri.wiki/dmg_fm/fonts/zh-cn_0.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- CSS 设计变量 ---------- */
:root {
  /* 颜色系统 */
  --bg-primary: #0a0a10;
  --bg-secondary: #0e0e1a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-table: rgba(255, 255, 255, 0.1);
  --text-primary: #e4e4f0;
  --text-secondary: #a0a0b8;
  --text-muted: #707088;
  --accent: #7eb8ff;
  --accent-soft: rgba(126, 184, 255, 0.12);
  --accent-glow: rgba(126, 184, 255, 0.06);
  --tag-bg: rgba(126, 184, 255, 0.15);
  --tag-text: #a0ceff;
  --note-accent: #f0c060;
  --note-border: rgba(240, 192, 96, 0.5);

  /* 圆角 */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;

  /* 阴影 */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* 字体 */
  --font-main: 'GenshinUI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'GenshinUI', 'Cascadia Code', 'JetBrains Mono', monospace;

  /* 布局 */
  --max-width: 1400px;
}

/* KaTeX 全局字体覆盖（使用较轻字重） */
.katex { font-family: var(--font-main) !important; font-weight: 200 !important; }
.katex .mathrm, .katex .textrm, .katex .text, .katex .mbox { font-family: var(--font-main) !important; font-weight: 200 !important; }
.katex .mathit, .katex .textit { font-family: var(--font-main) !important; font-weight: 200 !important; }
.katex .mathbf, .katex .textbf { font-family: var(--font-main) !important; font-weight: normal !important; }
.katex .mathsf, .katex .textsf, .katex .mathtt, .katex .texttt, .katex .mathcal { font-family: var(--font-main) !important; font-weight: 200 !important; }

/* ---------- 全局重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
strong, b, h1, h2, h3, h4, h5, h6, th { font-weight: normal; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 背景光晕纹理 */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(126, 184, 255, 0.04), transparent),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(160, 140, 220, 0.03), transparent);
  pointer-events: none; z-index: 0;
}

/* ---------- 鼠标光照覆盖层 ---------- */
.lighting-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity 0.4s ease;
}
.lighting-overlay.active { opacity: 1; }

/* ---------- 左侧导航栏（仅桌面端） ---------- */
.sidebar {
  position: fixed; left: 0; top: 0; height: 100vh; z-index: 50;
  width: 170px;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sidebar.collapsed { width: 44px; }

.sidebar-toggle {
  flex-shrink: 0; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--text-secondary); font-size: 1.2rem;
  cursor: pointer; transition: color 0.2s ease; padding: 0;
}
.sidebar-toggle:hover { color: var(--accent); }

.sidebar-inner {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 0 14px 20px; opacity: 1;
  transition: opacity 0.25s ease;
}
.sidebar.collapsed .sidebar-inner { opacity: 0; pointer-events: none; }

.sidebar-group { margin-bottom: 16px; }

.sidebar-label {
  font-size: 0.72rem; font-weight: normal; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 10px 0 6px; padding-left: 4px;
}

.sidebar-link {
  display: block; padding: 6px 10px; margin: 1px 0;
  font-size: 0.82rem; color: var(--text-secondary);
  text-decoration: none; border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-link:hover { background: rgba(126, 184, 255, 0.1); color: var(--accent); }
.sidebar-link.active {
  background: rgba(126, 184, 255, 0.15); color: var(--accent); font-weight: normal;
}

/* 内容包裹层 — 随侧边栏展收平移 */
.content-wrapper {
  transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
body.sidebar-open .content-wrapper { margin-left: 170px; }
body.sidebar-closed .content-wrapper { margin-left: 44px; }

/* ---------- 头部 ---------- */
.header { position: relative; z-index: 2; padding: 28px 20px 10px; text-align: center; }

.header-glass {
  display: inline-block;
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px 40px; box-shadow: var(--shadow-card);
  max-width: var(--max-width); width: 100%;
}

.header-top { margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }

.title {
  font-size: 1.75rem; font-weight: normal; letter-spacing: 0.04em;
  color: var(--text-primary); margin-bottom: 10px;
}

.header-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }

.badge {
  display: inline-block; padding: 4px 14px; border-radius: 20px;
  font-size: 0.85rem; font-weight: normal; letter-spacing: 0.03em;
}
.badge-version {
  background: var(--accent-soft); color: var(--tag-text);
  border: 1px solid rgba(126, 184, 255, 0.25);
}
.badge-game {
  background: rgba(255, 255, 255, 0.05); color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-meta {
  font-size: 0.88rem; color: var(--text-secondary);
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; align-items: center;
}
.meta-sep { color: var(--text-muted); }

/* Logo 样式 */
.header-logo-link { display: inline-flex; flex-shrink: 0; }
.header-logo {
  width: 52px; height: 52px; object-fit: contain;
  border-radius: 14px;
  background: var(--bg-card);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}
.header-logo:hover { border-color: rgba(255,255,255,0.18); transform: scale(1.08); }

/* 设置选项与更新简介同行 */
.header-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.header-row .header-settings, .header-row .header-update { flex: 1; min-width: 240px; margin-top: 6px; }

/* 设置选项 */
.header-settings { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 10px; }
.settings-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text-muted);
  font-size: 0.82rem; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; transition: all 0.2s ease;
}
.settings-toggle:hover { color: var(--accent); background: rgba(126, 184, 255, 0.06); }
.settings-toggle-icon { display: inline-block; font-size: 0.6rem; transition: transform 0.3s ease; }
.settings-toggle.open .settings-toggle-icon { transform: rotate(90deg); }
.settings-content {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease; padding: 0 8px;
}
.settings-content.open { max-height: 100px; padding: 8px; }
.settings-label { font-size: 0.84rem; color: var(--text-secondary); margin-right: 8px; }
.settings-select {
  padding: 4px 10px; background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.84rem; outline: none; cursor: pointer;
}
.settings-select:focus { border-color: var(--accent); }

/* 更新简介 */
.header-update { margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 10px; }
.update-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text-muted);
  font-size: 0.82rem; cursor: pointer; padding: 4px 8px;
  border-radius: 6px; transition: all 0.2s ease;
}
.update-toggle:hover { color: var(--accent); background: rgba(126, 184, 255, 0.06); }
.update-toggle-icon { display: inline-block; font-size: 0.6rem; transition: transform 0.3s ease; }
.update-toggle.open .update-toggle-icon { transform: rotate(90deg); }
.update-content {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease; padding: 0 8px;
}
.update-content.open { max-height: 200px; padding: 8px; }
.update-content p { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* QQ 群号 */
.qq-group {
  color: var(--accent); cursor: pointer; transition: color 0.2s;
  -webkit-user-select: all; user-select: all;
}
.qq-group:hover { color: #a0ceff; }

/* QQ 复制提示动画 */
.qq-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(126, 184, 255, 0.2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(126, 184, 255, 0.3);
  color: var(--accent); padding: 10px 24px;
  border-radius: 30px; font-size: 0.9rem; z-index: 9999;
  pointer-events: none;
  animation: toastIn 0.35s ease, toastOut 0.35s ease 1.2s forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ---------- 主内容区 ---------- */
.main-content { position: relative; z-index: 2; max-width: var(--max-width); margin: 0 auto; padding: 10px 12px 40px; }

/* 板块标题 */
.section { margin-bottom: 48px; }
.section-title {
  text-align: center; font-size: 1.5rem; font-weight: normal;
  letter-spacing: 0.05em; color: var(--text-primary); margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.section-icon { font-size: 0.6rem; color: var(--accent); opacity: 0.6; }
.section-desc {
  text-align: center; color: var(--text-secondary); font-size: 0.9rem;
  margin-bottom: 28px; max-width: 900px; margin-left: auto; margin-right: auto;
}

/* 简介多行时改为左对齐（JS 动态添加此 class） */
.section-desc.multiline { text-align: left; }

/* ---------- 玻璃卡片（核心视觉） ---------- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px 30px; margin-bottom: 22px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative; overflow: hidden;
}
.glass-card::after {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  pointer-events: none;
}
.glass-card:hover { border-color: rgba(255, 255, 255, 0.12); }

/* 跳转高亮闪烁 */
@keyframes highlightFlash {
  0%   { box-shadow: 0 0 0 rgba(240, 192, 96, 0); }
  30%  { box-shadow: 0 0 40px rgba(240, 192, 96, 0.5), inset 0 0 20px rgba(240, 192, 96, 0.15); }
  100% { box-shadow: 0 0 0 rgba(240, 192, 96, 0); }
}
.glass-card.highlight-flash { animation: highlightFlash 1.5s ease; }

.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-title { font-size: 1.15rem; font-weight: normal; color: var(--text-primary); letter-spacing: 0.02em; }
.card-tag {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: normal; background: var(--tag-bg); color: var(--tag-text);
  letter-spacing: 0.04em;
}

/* ---------- 表格 ---------- */
.card-table-wrap { margin: 14px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-caption { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 8px; }
.glass-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
  border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border-table);
}
.glass-table thead { background: rgba(126, 184, 255, 0.08); }
.glass-table th {
  padding: 10px 14px; text-align: left; font-weight: normal;
  color: var(--accent); font-size: 0.85rem; letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-table);
}
.glass-table td {
  padding: 9px 14px; color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.glass-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
.glass-table tbody tr:hover { background: rgba(126, 184, 255, 0.04); }

/* ---------- 注解 ---------- */
.card-notes { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.note {
  font-size: 0.88rem; color: var(--text-secondary); padding: 10px 14px;
  background: rgba(240, 192, 96, 0.04); border-radius: var(--radius-sm);
  border-left: 3px solid var(--note-border); line-height: 1.6;
}
.note strong { color: var(--note-accent); }

/* 信息文本 */
.card-info-row { display: flex; gap: 24px; margin: 10px 0; flex-wrap: wrap; }
.info-item { font-size: 0.9rem; }
.info-label { color: var(--text-secondary); }
.info-value { color: var(--accent); font-weight: normal; font-family: var(--font-mono); }
.info-text { font-size: 0.9rem; color: var(--text-secondary); margin: 8px 0; line-height: 1.7; }
.info-text strong { color: var(--text-primary); }
.info-list { margin: 8px 0 8px 20px; font-size: 0.9rem; color: var(--text-secondary); list-style: disc; }
.info-list li { margin-bottom: 4px; line-height: 1.6; }
.info-list strong { color: var(--accent); font-family: var(--font-mono); }
.reaction-intro {
  margin: 8px 0 14px; font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.8; padding: 12px 16px; background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, 0.04);
}
.reaction-intro strong { color: var(--text-primary); }

/* 等级系数查询 */
.level-query {
  display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 14px 18px;
  background: rgba(126, 184, 255, 0.04); border: 1px solid rgba(126, 184, 255, 0.1);
  border-radius: var(--radius-md); flex-wrap: wrap;
}
.lq-label { font-size: 0.88rem; color: var(--text-secondary); font-weight: normal; white-space: nowrap; }
.lq-input {
  width: 80px; padding: 7px 12px; background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.9rem; font-family: var(--font-mono);
  text-align: center; transition: border-color 0.25s ease; outline: none;
}
.lq-input:focus { border-color: var(--accent); box-shadow: 0 0 8px rgba(126, 184, 255, 0.15); }
.lq-input::-webkit-inner-spin-button, .lq-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lq-input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.lq-input.invalid { border-color: rgba(255, 100, 100, 0.5); animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.lq-result { font-size: 0.88rem; color: var(--text-secondary); }
.lq-value { color: var(--accent); font-family: var(--font-mono); font-size: 0.9rem; }

/* 子公式 Grid 布局 */
.sub-formula-list { display: flex; flex-direction: column; gap: 10px; }
.sub-formula-grid {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center;
}
.sub-formula-grid .sub-label {
  font-size: 0.9rem; color: var(--text-secondary); white-space: nowrap;
  font-weight: normal; text-align: right;
}
.sub-formula-grid .formula-block { margin: 0; }
.sub-formula-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-label { font-size: 0.9rem; color: var(--text-secondary); white-space: nowrap; font-weight: normal; }
.formula-note {
  font-size: 0.82rem; color: var(--text-muted); margin: 2px 0 14px;
  padding-left: 8px; border-left: 2px solid rgba(126, 184, 255, 0.25);
}

/* ---------- 页脚 ---------- */
.footer { position: relative; z-index: 2; text-align: center; padding: 20px 20px 30px; font-size: 0.82rem; color: var(--text-muted); }
.footer-glass {
  display: inline-block; background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-card); border-radius: var(--radius-lg); padding: 16px 28px;
}
.footer p { margin: 2px 0; }

/* 手机端提示 */
.mobile-hint { display: none; font-size: 0.75rem; color: var(--note-accent); margin-top: 6px !important; opacity: 0.85; }

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1200px) {
  .main-content { max-width: 100%; }
  .header-glass { padding: 20px 28px; }
  .title { font-size: 1.5rem; }
  .glass-card { padding: 22px 20px; }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .header { padding: 16px 12px 6px; }
  .header-glass { padding: 16px 18px; border-radius: var(--radius-md); }
  .title { font-size: 1.3rem; }
  .header-badges { gap: 6px; }
  .badge { font-size: 0.75rem; padding: 3px 10px; }
  .header-meta { font-size: 0.78rem; gap: 3px; }
  .main-content { padding: 6px 12px 30px; }
  .content-wrapper { margin-left: 0 !important; }
  .section { margin-bottom: 32px; }
  .section-title { font-size: 1.25rem; gap: 10px; }
  .section-desc { font-size: 0.82rem; margin-bottom: 18px; }
  .glass-card { padding: 18px 14px; border-radius: var(--radius-md); margin-bottom: 16px; }
  .card-title { font-size: 1rem; }
  .glass-table { font-size: 0.78rem; }
  .glass-table th, .glass-table td { padding: 7px 8px; }
  .level-query { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .lq-input { width: 100%; }
  .card-info-row { flex-direction: column; gap: 8px; }
  .sub-formula-item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sub-formula-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .sub-formula-grid .sub-label { white-space: normal; text-align: left; }
  .sub-formula-grid .formula-inline { justify-content: flex-start; }
  .note { font-size: 0.8rem; padding: 8px 10px; }
  .footer-glass { padding: 12px 16px; }
  .sidebar { display: none !important; }
  .lighting-overlay { display: none !important; }
  .mobile-hint { display: block; }
}

/* ---------- 模态框系统（公共组件） ---------- */

/* 遮罩层：全屏半透明 + 背景模糊 */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: modalFadeIn 0.25s ease;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 模态框容器：玻璃卡片风格，左右分栏 */
.modal-container {
  background: rgba(15, 15, 30, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  width: 90vw; max-width: 900px; max-height: 85vh;
  display: flex; overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-30px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* 左侧列表区 */
.modal-left {
  flex: 0 0 260px; overflow-y: auto; padding: 20px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

/* 右侧预览区 */
.modal-right {
  flex: 1; overflow-y: auto; padding: 20px 24px;
}

/* 模态框标题 */
.modal-title {
  font-size: 1rem; color: var(--accent); margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* 列表项（左侧可选列表） */
.modal-list-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s ease; margin-bottom: 2px;
  border: 1px solid transparent;
}
.modal-list-item:hover { background: rgba(126, 184, 255, 0.08); }
.modal-list-item.selected { background: rgba(126, 184, 255, 0.15); border-color: rgba(126, 184, 255, 0.35); }
.modal-list-item img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: rgba(0,0,0,0.3); }
.modal-list-item .item-name { font-size: 0.82rem; color: var(--text-primary); }
.modal-list-item .item-star { font-size: 0.7rem; color: var(--text-muted); }

/* 确认/取消按钮行 */
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px;
  padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-btn {
  padding: 8px 20px; border-radius: 20px; font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent;
}
.modal-btn-confirm {
  background: rgba(126, 184, 255, 0.2); color: var(--accent);
  border-color: rgba(126, 184, 255, 0.35);
}
.modal-btn-confirm:hover { background: rgba(126, 184, 255, 0.35); }
.modal-btn-cancel {
  background: rgba(255, 255, 255, 0.05); color: var(--text-secondary);
}
.modal-btn-cancel:hover { background: rgba(255, 255, 255, 0.1); }

/* 武器稀有度颜色 */
.weapon-5star { color: #fcd34de6; }
.weapon-4star { color: #c4b5fde6; }
.weapon-3star { color: #7dd3fce6; }

/* 精炼分割按钮 */
.refine-split { display: flex; border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,0.12); width: fit-content; }
.refine-split button {
  padding: 6px 18px; font-size: 0.82rem; cursor: pointer; transition: all 0.2s ease;
  background: rgba(0,0,0,0.3); color: var(--text-secondary); border: none;
}
.refine-split button.active { background: rgba(126,184,255,0.2); color: var(--accent); }
.refine-split button:hover { background: rgba(126,184,255,0.1); }

/* 滑块样式（跨浏览器适配深色主题） */
.modal-slider { width: 100%; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--accent); border-radius: 50%; cursor: pointer; border: 2px solid rgba(255,255,255,0.2); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; background: var(--accent); border-radius: 50%; cursor: pointer; border: 2px solid rgba(255,255,255,0.2); }

/* 队伍角色高亮选中 */
.char-card { text-align: center; padding: 10px 14px; background: rgba(126,184,255,0.04); border: 2px solid rgba(255,255,255,0.06); border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s ease; max-width: 110px; }
.char-card:hover { background: rgba(126,184,255,0.08); }
.char-card.selected { border-color: rgba(126,184,255,0.5); background: rgba(126,184,255,0.12); box-shadow: 0 0 16px rgba(126,184,255,0.1); }
.char-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.1); }
.char-card.selected img { border-color: rgba(126,184,255,0.5); }

/* 触屏设备隐藏光照 */
@media (hover: none) and (pointer: coarse) {
  .lighting-overlay { display: none !important; }
}

/* 打印样式 */
@media print {
  .lighting-overlay { display: none !important; }
  body { background: #fff; color: #000; }
  .glass-card { background: #fff; border: 1px solid #ccc; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; break-inside: avoid; }
}
