/* ==========================================================================
 * 胜利游戏 · 玩家门户站 —— 基础样式（全站公用）
 * 文件路径：web/css/base.css
 *
 * 风格：浅色 · 卡通魔兽 / Q 版
 * 依赖：零外部资源（无图片、无网络字体、无 CDN），所有图形均由 CSS 绘制
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * 1. 设计变量（改颜色只改这里）
 * -------------------------------------------------------------------------- */
:root {
  /* 主色：天空蓝 */
  --c-primary:      #4a90e2;
  --c-primary-dark: #2f6fc4;
  --c-primary-soft: #e8f2ff;

  /* 辅色：草地绿 / 金币黄 / 危险红 */
  --c-green:       #5cc48a;
  --c-green-dark:  #3da36b;
  --c-gold:        #f7b731;
  --c-gold-soft:   #fff6e0;
  --c-danger:      #e8664f;
  --c-danger-soft: #ffeeea;

  /* 文字与背景 */
  --c-text:        #33475b;
  --c-text-light:  #7d8fa3;
  --c-line:        #dbe6f2;
  --c-bg:          #f4f9ff;
  --c-card:        #ffffff;

  /* 圆角 / 阴影 / 过渡 */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(51, 71, 91, .06);
  --shadow:    0 8px 26px rgba(74, 144, 226, .14);
  --shadow-lg: 0 18px 46px rgba(74, 144, 226, .20);
  --trans:     all .22s cubic-bezier(.34, 1.28, .64, 1);
}

/* --------------------------------------------------------------------------
 * 2. 全局重置与字体
 *    字体只使用系统自带中文字体，不外链任何网络字体
 * -------------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* --------------------------------------------------------------------------
 * ★ [hidden] 必须真的隐藏 —— 全站兜底（2026-10-16 修「活动管理弹一堆窗口、关不掉」）
 *
 * 原因：弹层基类 .mask 是 display:flex（见下方第 7 节）。**作者样式比浏览器
 *      默认的 [hidden]{display:none} 优先级高**，所以写上 hidden 的弹窗照样显示。
 *      这条兜底以前只写在 css/login.css 里，而 gm.html 并没有引 login.css
 *      ⇒ 活动管理的三个弹层（#actModal / #actPreview / #actRenew）全部常显、
 *      互相叠在一起，下层弹层的 ✕ 被上层遮罩挡住点不到（表现为「关不掉」）。
 *      现在提升到全站公用的 base.css，任何页面都不会再踩。
 * -------------------------------------------------------------------------- */
[hidden] { display: none !important; }

html, body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  /* 桌面端专用：最小宽度兜底，不做移动端适配 */
  min-width: 1180px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--c-text); outline: none; }
ul, ol { list-style: none; }

/* 滚动条美化（浅色系） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef4fb; }
::-webkit-scrollbar-thumb { background: #c5d8ee; border-radius: 6px; border: 2px solid #eef4fb; }
::-webkit-scrollbar-thumb:hover { background: #a9c6e8; }

/* --------------------------------------------------------------------------
 * 3. 通用按钮
 * -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: var(--trans);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* 主按钮：蓝色 */
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #66a8ef 0%, var(--c-primary) 55%, var(--c-primary-dark) 100%);
  box-shadow: 0 4px 12px rgba(74, 144, 226, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-primary:hover:not([disabled]) {
  background: linear-gradient(180deg, #7ab6f5 0%, #4a90e2 55%, #1f5cb0 100%);
  box-shadow: 0 8px 20px rgba(74, 144, 226, .48), inset 0 1px 0 rgba(255, 255, 255, .6);
  transform: translateY(-2px);
}

/* 成功按钮：绿色 */
.btn-success {
  color: #fff;
  background: linear-gradient(180deg, #7ad39f 0%, var(--c-green) 55%, var(--c-green-dark) 100%);
  box-shadow: 0 4px 12px rgba(92, 196, 138, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-success:hover:not([disabled]) {
  box-shadow: 0 8px 20px rgba(92, 196, 138, .48), inset 0 1px 0 rgba(255, 255, 255, .6);
  transform: translateY(-2px);
}

/* 危险按钮：红色 */
.btn-danger {
  color: #fff;
  background: linear-gradient(180deg, #f08a76 0%, var(--c-danger) 55%, #c94b35 100%);
  box-shadow: 0 4px 12px rgba(232, 102, 79, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-danger:hover:not([disabled]) {
  box-shadow: 0 8px 20px rgba(232, 102, 79, .48), inset 0 1px 0 rgba(255, 255, 255, .6);
  transform: translateY(-2px);
}

/* 金色按钮：充值用 */
.btn-gold {
  color: #7a5000;
  background: linear-gradient(180deg, #ffd76e 0%, var(--c-gold) 55%, #d99812 100%);
  box-shadow: 0 4px 12px rgba(247, 183, 49, .38), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-gold:hover:not([disabled]) {
  box-shadow: 0 8px 20px rgba(247, 183, 49, .55), inset 0 1px 0 rgba(255, 255, 255, .7);
  transform: translateY(-2px);
}

/* 幽灵按钮：白底描边 */
.btn-ghost {
  color: var(--c-primary);
  background: #fff;
  border: 1.5px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover:not([disabled]) {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 144, 226, .18);
}

.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
 * 4. 表单控件
 * -------------------------------------------------------------------------- */
.field { margin-bottom: 18px; }

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}
.field-label .req { color: var(--c-danger); margin-left: 3px; }

.input,
.select,
.textarea {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: #fff;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-sm);
  transition: var(--trans);
}
.textarea { height: auto; min-height: 76px; padding: 10px 14px; resize: vertical; line-height: 1.6; }

.input:hover, .select:hover, .textarea:hover { border-color: #bdd4ec; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, .14);
  background: #fbfdff;
}
.input::placeholder, .textarea::placeholder { color: #b3c2d1; }

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-text-light) 50%),
                    linear-gradient(135deg, var(--c-text-light) 50%, transparent 50%);
  background-position: calc(100% - 19px) 18px, calc(100% - 13px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
}

/* 单选 / 复选 */
.radio-row { display: flex; gap: 22px; align-items: center; }
.radio-item { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.radio-item input[type="radio"],
.radio-item input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--c-primary); cursor: pointer;
}

/* 表单错误提示 */
.form-msg {
  min-height: 22px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--c-danger);
  text-align: center;
}

/* --------------------------------------------------------------------------
 * 5. 卡片 / 分区标题
 * -------------------------------------------------------------------------- */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--c-line);
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}
.card-title .ico { font-size: 18px; }
.card-body { padding: 20px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 700;
}
.section-title::before {
  content: '';
  width: 4px; height: 17px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7ab6f5, var(--c-primary-dark));
}

/* --------------------------------------------------------------------------
 * 6. 状态徽标
 * -------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.tag-blue   { color: var(--c-primary-dark); background: #e8f2ff; border: 1px solid #c9e0fa; }
.tag-green  { color: #2f8a58; background: #e9f9f0; border: 1px solid #c4ecd8; }
.tag-gold   { color: #a06a00; background: var(--c-gold-soft); border: 1px solid #f7e0b0; }
.tag-red    { color: #c94b35; background: var(--c-danger-soft); border: 1px solid #f8d3cb; }
.tag-gray   { color: #7d8fa3; background: #f1f5f9; border: 1px solid #e0e9f2; }

/* --------------------------------------------------------------------------
 * 7. 表格
 * -------------------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--c-text-light);
  background: #f7fafd;
  border-bottom: 1px solid var(--c-line);
  white-space: nowrap;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef4fa;
  vertical-align: middle;
}
.table tbody tr { transition: background .16s; }
.table tbody tr:hover { background: #f8fbfe; }
.table tbody tr:last-child td { border-bottom: none; }

/* 空状态 */
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--c-text-light);
  font-size: 13.5px;
}
.empty .emoji { display: block; font-size: 34px; margin-bottom: 8px; opacity: .75; }

/* --------------------------------------------------------------------------
 * 8. 顶部导航条（用户页 / GM 页共用）
 * -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
  box-shadow: 0 2px 12px rgba(74, 144, 226, .07);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--c-text);
}
.brand .brand-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  font-size: 19px;
  background: linear-gradient(145deg, #cfe6ff, #9ccbff);
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(74, 144, 226, .3);
}
.topbar-right { display: flex; align-items: center; gap: 16px; }

/* 顶部用户胶囊 */
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 14px 0 6px;
  background: var(--c-primary-soft);
  border: 1px solid #d3e6fb;
  border-radius: 19px;
}
.user-chip .avatar {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 15px;
  background: linear-gradient(145deg, #fff, #d9ebff);
  box-shadow: inset 0 1px 0 #fff;
}
.user-chip .uname { font-weight: 700; font-size: 13.5px; }
.user-chip .urole { font-size: 12px; color: var(--c-text-light); }

/* 页面主体容器 */
.page-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 30px 60px;
}

/* 页脚 */
.footer {
  padding: 22px 0 30px;
  text-align: center;
  font-size: 12.5px;
  color: #a4b4c4;
}

/* --------------------------------------------------------------------------
 * 9. 弹窗：确认框 & 结果提示
 * -------------------------------------------------------------------------- */
.mask {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 71, 91, .38);
  backdrop-filter: blur(3px);
  animation: maskIn .18s ease-out;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 430px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 26px 60px rgba(31, 58, 95, .28);
  overflow: hidden;
  animation: modalIn .26s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px 0;
  font-size: 16px;
  font-weight: 700;
}
.modal-head .m-ico { font-size: 21px; }
.modal-body { padding: 14px 24px 4px; }
.modal-body p { font-size: 14px; line-height: 1.75; color: var(--c-text); }
.modal-body .m-sub {
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: #f6faff;
  border: 1px solid #e2eefb;
  font-size: 13px;
  color: var(--c-text-light);
  line-height: 1.7;
}
.modal-body .m-sub b { color: var(--c-text); }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px 22px;
}

/* 轻提示（Toast） */
.toast-host {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 58, 95, .18);
  border: 1px solid var(--c-line);
  animation: toastIn .28s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-16px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.toast.hide { animation: toastOut .22s ease-in forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px) scale(.96); } }

.toast .t-ico { font-size: 17px; }
.toast-success { color: #2f8a58; border-color: #c4ecd8; background: #f4fdf8; }
.toast-error   { color: #c94b35; border-color: #f8d3cb; background: #fff7f5; }
.toast-info    { color: var(--c-primary-dark); border-color: #c9e0fa; background: #f6fbff; }

/* --------------------------------------------------------------------------
 * 10. 加载遮罩
 * -------------------------------------------------------------------------- */
.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(2px);
}
.loading-mask.show { display: flex; }
.spinner {
  width: 40px; height: 40px;
  border: 4px solid #dbe9f8;
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 按钮内联小转圈 */
.btn .btn-spin {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ==========================================================================
 * 键值信息行（左标签 + 右内容）—— 用户中心、游戏账号页、GM 后台共用
 *   <div class="kv-list">
 *     <div class="kv-row"><span class="k">通行证账号</span><span class="v mono">xxx</span></div>
 *   </div>
 * 放在 base.css 里，三套页面（含只引 base.css + gm.css 的 GM 后台）都有一套一致样式。
 * ========================================================================== */
.kv-list { padding: 4px 0; }
.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 20px;
  font-size: 13.5px;
  border-bottom: 1px dashed #eef4fa;
}
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--c-text-light); white-space: nowrap; }
.kv-row .v { font-weight: 700; color: var(--c-text); text-align: right; }
.kv-row .v.mono { font-family: Consolas, "Courier New", monospace; letter-spacing: .6px; }

/* ==========================================================================
 * 弹窗里的输入框（UI.prompt 用：铅笔改名等需要玩家输入内容的场景）
 * ========================================================================== */
.modal .m-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--c-text-light);
}
.modal .m-input {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 12px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--c-text);
  background: #fff;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.modal .m-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, .14);
}
.modal .m-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #8a9bb0;
  line-height: 1.7;
}


/* ==========================================================================
 * 2026-10-16：右下角「演示数据」角标（.demo-badge）已按老板要求整体删除。
 * 「哪些板块是真数据」改为 GM 后台板块标签上的浅灰小圆点（见 css/gm.css 的 .sample-dot）。
 * ========================================================================== */
