/* ============================================================
   style-gold-pages.css — 功能页黑金主题专属覆盖层（员工C）
   作用页面：create.html / profile.html / moments.html / wallet.html
   加载顺序：tailwind-local → style-g → style-v3 → style-gold → 本文件
   设计规范：黑金 v1.0（近纯黑底 #0a0a0c + 金色体系 #f5d78e/#d4af37/#9a7b2d）
   原则：只覆盖颜色与动效，不改任何 id/class 钩子
   ============================================================ */

/* ===== 1. 页面基底：强制黑金变量（无视旧紫色主题值） ===== */
:root {
  --p-primary: #d4af37; --p-accent: #b08d2f; --p-bg: #0a0a0c;
  --p-surface: #14110c; --p-text: #f3f4f6; --p-text2: #c9a96a;
  --bg: #0a0a0c; --surface: #14110c; --surface2: #1f1a12;
  --primary: #d4af37; --primary-hover: #c49a2e; --primary-light: rgba(212,175,55,.15);
  --border: rgba(212,175,55,.16); --text: #f3f4f6; --text2: #c9a96a;
  --danger: #e05b5b; --warning: #d4af37; --success: #3fb97a;
  --p-card-radius: 16px; --p-card-glow: 0 0 20px rgba(212,175,55,.15);
  --p-card-hover: translateY(-3px);
}
/* 服务器主题若下发 light 模式，依旧强制黑金底（这些页面是黑金奢华风，不跟随浅色） */
[data-theme="light"] {
  --p-bg: #0a0a0c !important; --p-surface: #14110c !important; --p-text: #f3f4f6 !important; --p-text2: #c9a96a !important;
  --bg: #0a0a0c !important; --surface: #14110c !important; --surface2: #1f1a12 !important;
  --text: #f3f4f6 !important; --text2: #c9a96a !important; --border: rgba(212,175,55,.16) !important;
  --primary: #d4af37 !important; --primary-hover: #c49a2e !important; --primary-light: rgba(212,175,55,.15) !important;
  --danger: #e05b5b !important; --warning: #d4af37 !important; --success: #3fb97a !important;
  --user-msg: #d4af37 !important; --user-text: #0a0a0c !important; --ai-msg: #14110e !important; --ai-border: rgba(212,175,55,.18) !important;
}
body, #app-body { background: #0a0a0c !important; }

/* ===== 2. 金色工具类（替代页面里的紫色 tailwind 工具类） ===== */
.gold-text-gradient {
  background: linear-gradient(135deg,#f5d78e 0%,#d4af37 55%,#b08d2f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-gold { color: #e8c56b; }
.text-gold-bright { color: #f5d78e; }
.text-gold-soft { color: #c9a96a; }
.hover\:text-gold:hover { color: #f5d78e !important; }
.border-gold-dim { border-color: rgba(212,175,55,.45) !important; }
.border-gold-soft { border-color: rgba(212,175,55,.22) !important; }
.border-gold-edge { border-color: #0a0a0c; }
.bg-gold-soft { background-color: rgba(212,175,55,.08); }
.bg-gold-main {
  background: linear-gradient(135deg,#f5d78e 0%,#d4af37 45%,#9a7b2d 100%);
  color: #0a0a0c;
}
.bg-gold-cover { background: linear-gradient(135deg,#2c2416 0%,#17130c 55%,#0a0a0c 100%); }
.shadow-gold-float { box-shadow: 0 0 20px rgba(212,175,55,.5); }
.gold-divider {
  margin: 16px 0; border: none; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,.4), transparent);
}
/* 文件上传按钮（金色描边小按钮） */
.file-btn-gold::file-selector-button {
  background: rgba(212,175,55,.15);
  color: #e8c56b;
  border: 1px solid rgba(212,175,55,.3);
  border-radius: 10px;
  margin-right: 12px;
  padding: 6px 12px;
  cursor: pointer;
}
.file-btn-gold::file-selector-button:hover { background: rgba(212,175,55,.26); color: #f5d78e; }

/* ===== 3. 旧紫色工具类残留兜底（JS 动态插入的 class 无法改源码，统一转金） ===== */
.text-purple-400, .text-purple-300, .text-pink-400 { color: #e8c56b !important; }
.hover\:text-purple-400:hover { color: #f5d78e !important; }
.bg-purple-500\/5 { background-color: rgba(212,175,55,.05) !important; }
.bg-purple-500\/10 { background-color: rgba(212,175,55,.1) !important; }
.bg-purple-500\/20 { background-color: rgba(212,175,55,.14) !important; }
.bg-purple-500\/40 { background-color: rgba(212,175,55,.35) !important; }
.border-purple-500\/20 { border-color: rgba(212,175,55,.2) !important; }
.border-purple-500\/30 { border-color: rgba(212,175,55,.3) !important; }
.border-purple-400\/50 { border-color: rgba(212,175,55,.45) !important; }
.hover\:bg-purple-500\/10:hover { background-color: rgba(212,175,55,.1) !important; }
/* 渐变停靠点兜底（profile.js 动态写入的 from-purple-500/to-pink-500 等） */
.from-purple-500 { --tw-gradient-from: #d4af37 var(--tw-gradient-from-position); --tw-gradient-to: rgb(212 175 55 / 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-purple-700 { --tw-gradient-from: #2c2416 var(--tw-gradient-from-position); --tw-gradient-to: rgb(12 10 8 / 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-pink-500 { --tw-gradient-to: #9a7b2d var(--tw-gradient-to-position); }
.via-indigo-800 { --tw-gradient-via: #17130c var(--tw-gradient-via-position); }

/* ===== 4. 全局组件覆盖（原 style-g.css / tailwind 紫色 → 黑金） ===== */

/* 顶部导航 */
.navbar-glass {
  background: rgba(12,10,8,.82) !important;
  border-bottom-color: rgba(212,175,55,.18) !important;
}
[data-theme="light"] .navbar-glass {
  background: rgba(12,10,8,.82) !important;
  border-bottom-color: rgba(212,175,55,.18) !important;
}

/* 底部导航（黑金样式由 style-gold.css 文末「底部导航 v2」章节统一管理，此处旧规则已移除） */

/* 弹窗 */
.modal-overlay-glass { background: rgba(0,0,0,.68); }
.modal-glass {
  background: linear-gradient(160deg, rgba(26,22,16,.92), rgba(14,12,10,.96)) !important;
  border: 1px solid rgba(212,175,55,.22) !important;
  border-radius: 16px;
}
[data-theme="light"] .modal-glass {
  background: linear-gradient(160deg, rgba(26,22,16,.92), rgba(14,12,10,.96)) !important;
  border-color: rgba(212,175,55,.22) !important;
}

/* 输入框 */
.input-glass {
  background: rgba(10,10,12,.6) !important;
  border: 1px solid rgba(212,175,55,.2) !important;
}
.input-glass:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,.15) !important;
}
[data-theme="light"] .input-glass {
  background: rgba(10,10,12,.6) !important;
  border-color: rgba(212,175,55,.2) !important;
}

/* 主按钮：金色渐变底 + 纯黑文字 + 金色辉光 */
.btn-primary-glow {
  background: linear-gradient(135deg,#f5d78e 0%,#d4af37 45%,#9a7b2d 100%) !important;
  color: #0a0a0c !important;
  box-shadow: 0 0 18px rgba(212,175,55,.35) !important;
}
.btn-primary-glow:hover { box-shadow: 0 0 28px rgba(212,175,55,.55) !important; }

/* 标题辉光（紫→金） */
.title-glow { text-shadow: 0 0 20px rgba(212,175,55,.35); }

/* 帮助图标 */
.help-icon { background: rgba(212,175,55,.18) !important; color: #e8c56b !important; }
.help-icon:hover { background: rgba(212,175,55,.4) !important; color: #0a0a0c !important; }

/* 工具提示气泡（行内样式兜底已同步为黑金，这里覆盖 CSS 层的紫色残留） */
.help-bubble {
  background: #14120e !important;
  border: 1px solid rgba(212,175,55,.35) !important;
  color: #f3f4f6 !important;
  box-shadow: 0 10px 40px rgba(0,0,0,.65) !important;
}
.help-bubble::after { border-top-color: rgba(212,175,55,.35) !important; }
[data-theme="light"] .help-bubble {
  background: #14120e !important;
  border-color: rgba(212,175,55,.35) !important;
  color: #f3f4f6 !important;
}

/* 图标按钮 */
.icon-btn-glass {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(212,175,55,.25) !important;
  color: #c9a96a !important;
}
.icon-btn-glass:hover { background: rgba(212,175,55,.15) !important; color: #f5d78e !important; }

/* 动态页顶部条 / 返回按钮 */
.chat-header-bar {
  background: rgba(12,10,8,.85) !important;
  border-bottom: 1px solid rgba(212,175,55,.18) !important;
  box-shadow: 0 1px 12px rgba(0,0,0,.4) !important;
}
.chat-back-btn {
  background: rgba(212,175,55,.08) !important;
  color: #e8c56b !important;
  border: 1px solid rgba(212,175,55,.25) !important;
}
.chat-back-btn:hover { background: rgba(212,175,55,.18) !important; color: #f5d78e !important; }

/* 角色卡片 */
.char-card-new { background: #14110c !important; border: 1px solid rgba(212,175,55,.18) !important; }
.char-card-new:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 20px rgba(212,175,55,.18) !important;
  border-color: rgba(212,175,55,.4) !important;
}

/* 加载转圈（紫→金） */
.spinner-glow { border-top-color: #d4af37; }

/* Toast 信息提示（紫→金） */
.toast.info { border-left-color: #d4af37; color: #f7e9c3; }
.toast.info::before { background: #d4af37; box-shadow: 0 0 8px rgba(212,175,55,.8); }

/* ===== 5. 页面组件覆盖（create.html / profile.html / moments.html / wallet.html） ===== */

/* 表单卡片：黑金渐变 + 金边 + 上浮 */
.form-card-glass {
  background: linear-gradient(160deg, rgba(26,22,16,.85), rgba(14,12,10,.92)) !important;
  border: 1px solid rgba(212,175,55,.22) !important;
  border-radius: 16px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.form-card-glass:hover,
.form-card-glass:focus-within {
  border-color: rgba(212,175,55,.45) !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  z-index: 50;
}
[data-theme="light"] .form-card-glass {
  background: linear-gradient(160deg, rgba(26,22,16,.85), rgba(14,12,10,.92)) !important;
  border-color: rgba(212,175,55,.22) !important;
}

/* 性别选择按钮（原先无样式，黑金补齐） */
.gender-option {
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(212,175,55,.2) !important;
  color: #d1d5db !important;
  transition: all .25s ease;
}
.gender-option:hover { border-color: rgba(212,175,55,.45); }

/* 标签多选（原先无样式，黑金补齐） */
.tag-opt-btn {
  display: inline-block; padding: 5px 12px; margin: 4px 4px 0 0;
  border-radius: 999px; font-size: 12px; cursor: pointer;
  background: rgba(212,175,55,.07);
  border: 1px solid rgba(212,175,55,.22); color: #c9a96a;
  transition: all .25s ease; user-select: none;
}
.tag-opt-btn:hover { background: rgba(212,175,55,.16); color: #f5d78e; border-color: rgba(212,175,55,.45); }
.tag-selected {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; margin: 4px 4px 0 0;
  border-radius: 999px; font-size: 12px; font-weight: 600;
  background: linear-gradient(135deg,#f5d78e,#d4af37 55%,#9a7b2d);
  color: #0a0a0c; border: 1px solid rgba(245,215,142,.4);
}

/* 个人主页 Tab（JS 注入样式里的紫色也在此兜底覆盖） */
.profile-tab.active { color: #e8c56b !important; border-bottom-color: #d4af37 !important; }

/* 关注按钮（JS 动态写入 from-purple-500/to-pink-500 类名，此处强制黑金） */
#btn-follow.bg-gradient-to-r {
  background: linear-gradient(135deg,#f5d78e 0%,#d4af37 45%,#9a7b2d 100%) !important;
  color: #0a0a0c !important;
}
#btn-follow { border-color: rgba(212,175,55,.4) !important; color: #e8c56b !important; }

/* 动态卡片 / 发布框 */
.mom-publish, .mom-card {
  background: linear-gradient(160deg, rgba(26,22,16,.85), rgba(14,12,10,.92)) !important;
  border: 1px solid rgba(212,175,55,.22) !important;
}
.mom-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.5), 0 0 20px rgba(212,175,55,.1) !important;
  border-color: rgba(212,175,55,.45) !important;
}
.pub-submit, .mom-cmt-input button {
  background: linear-gradient(135deg,#f5d78e 0%,#d4af37 45%,#9a7b2d 100%) !important;
  color: #0a0a0c !important;
  box-shadow: 0 4px 14px rgba(212,175,55,.35);
}
.mom-actions .mom-like.liked .like-ico, .mom-actions .liked { color: #d4af37 !important; }

/* 钱包卡片 / 打卡 / 兑换 */
.token-card {
  background: linear-gradient(160deg, rgba(26,22,16,.85), rgba(14,12,10,.92)) !important;
  border: 1px solid rgba(212,175,55,.22) !important;
}
.checkin-btn, .cal-day.checked, .wallet-btn-primary {
  background: linear-gradient(135deg,#f5d78e 0%,#d4af37 45%,#9a7b2d 100%) !important;
  color: #0a0a0c !important;
}
.wallet-btn-primary { box-shadow: 0 6px 22px rgba(212,175,55,.35); }
.cal-day.today { border-color: rgba(212,175,55,.65) !important; box-shadow: 0 0 8px rgba(212,175,55,.3) !important; }
.refresh-btn {
  border: 1px solid rgba(212,175,55,.3) !important;
  background: rgba(212,175,55,.07) !important;
  color: #e8c56b !important;
}
.refresh-btn:hover { background: rgba(212,175,55,.14) !important; border-color: rgba(212,175,55,.5) !important; }
.log-tab.active {
  background: rgba(212,175,55,.18) !important;
  border-color: rgba(212,175,55,.4) !important;
  color: #f5d78e !important;
}

/* ===== 6. 移动端适配微调 ===== */
@media (max-width: 480px) {
  .token-big { font-size: 40px; }
  .balance-big { font-size: 30px; }
}

/* ===== 7. 缺失工具类补定义 ===== */
/* hover:text-gold（create.html/profile.html 链接 hover 变色；
   改造前此类从未被定义过、hover 不生效，补上让交互真正工作） */
.hover\:text-gold:hover { color: #e8c56b !important; }
