/* ============================================================
   创客算力（演示）· APP 风格界面（移动端优先 + 桌面手机画幅兼容）
   演示环境：无真实资金、无链上转账；深色玻璃拟态；无第三方 UI 库
   字体比例：正文 15px 基准，标题/数字/辅助信息形成 21/26/11 清晰阶梯
   ============================================================ */
:root{
  --bg:#05070d; --txt:#e8eef7; --sub:#94a4ba; --dim:#64748b;
  --teal:#2dd4bf; --teal2:#14b8a6; --cyan:#38bdf8; --amber:#fbbf24;
  --green:#34d399; --red:#f87171; --line:rgba(255,255,255,.09);
  --glass:linear-gradient(165deg,rgba(255,255,255,.055),rgba(255,255,255,.015));
  --grad:linear-gradient(135deg,var(--teal),var(--cyan));
}
*{box-sizing:border-box; margin:0; padding:0;}
html{-webkit-text-size-adjust:100%;}
body{
  font-family:-apple-system,"SF Pro Display","PingFang SC","Microsoft YaHei","Segoe UI",system-ui,sans-serif;
  font-size:15px; color:var(--txt); line-height:1.6;
  background:
    radial-gradient(760px 420px at 8% -8%, rgba(20,184,166,.16), transparent 60%),
    radial-gradient(700px 380px at 96% 4%, rgba(245,158,11,.09), transparent 55%),
    radial-gradient(820px 520px at 50% 112%, rgba(56,189,248,.08), transparent 60%),
    var(--bg);
  overflow:hidden; height:100vh; height:100dvh;
}
a{color:var(--teal); text-decoration:none;}
a:hover{color:var(--cyan);}

/* ---------- APP 画幅：手机全屏 / 桌面居中手机画框 ---------- */
.app{
  height:100vh; height:100dvh; width:100%;
  margin:0 auto; position:relative;
  display:flex; flex-direction:column; overflow:hidden;
  background:
    radial-gradient(480px 260px at 50% -6%, rgba(45,212,191,.10), transparent 65%),
    rgba(6,9,16,.55);
}

/* 桌面 ≥781px：前台呈现手机画幅，后台呈现宽幅面板 */
@media (min-width:781px){
  .app-front{
    width:430px; height:calc(100vh - 44px); height:calc(100dvh - 44px);
    margin:22px auto; border:1px solid var(--line); border-radius:34px;
    box-shadow:0 34px 90px rgba(0,0,0,.6), 0 0 0 8px rgba(255,255,255,.02), inset 0 0 0 1px rgba(255,255,255,.03);
  }
  .app-admin{
    width:min(960px, calc(100vw - 48px)); height:calc(100vh - 44px); height:calc(100dvh - 44px);
    margin:22px auto; border:1px solid var(--line); border-radius:26px;
    box-shadow:0 34px 90px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.03);
  }
}

/* ---------- 顶栏 ---------- */
.appbar{
  flex:none;
  background:rgba(7,11,20,.86); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}
.appbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; gap:10px;
}
.brand{display:flex; align-items:center; gap:9px; color:var(--txt); font-weight:800; font-size:15.5px; letter-spacing:.3px;}
.brand-mark{
  width:26px; height:26px; border-radius:9px; flex:none;
  background:var(--grad); box-shadow:0 0 16px rgba(45,212,191,.55);
}
.brand-txt{line-height:1;}
.brand-sub{font-size:10px; color:var(--dim); font-weight:600; letter-spacing:1px; line-height:1;}
.appbar-user{display:flex; align-items:center; gap:8px; font-size:12px; color:var(--sub);}
.chip-user{
  padding:3px 10px; border-radius:999px; font-size:12px; color:var(--txt);
  background:rgba(255,255,255,.06); border:1px solid var(--line); max-width:130px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* 管理端分段导航 */
.seg{display:flex; gap:6px; padding:2px 14px 12px;}
.seg-i{
  flex:1; text-align:center; padding:8px 4px; font-size:12.5px; font-weight:600;
  color:var(--sub); border-radius:11px; white-space:nowrap; transition:all .15s;
  border:1px solid transparent;
}
.seg-i:hover{color:var(--txt);}
.seg-i.on{color:var(--txt); background:rgba(255,255,255,.07); border-color:var(--line); box-shadow:inset 0 0 0 1px rgba(45,212,191,.18);}

/* ---------- 登录/注册 Hero ---------- */
.hero{flex:none; text-align:center; padding:36px 20px 8px;}
.hero-mark{
  width:66px; height:66px; border-radius:22px; display:inline-block; margin-bottom:16px;
  background:var(--grad); box-shadow:0 0 38px rgba(45,212,191,.5);
}
.hero h1{font-size:23px; font-weight:800; letter-spacing:.5px;}
.hero p{font-size:12.5px; color:var(--dim); margin-top:8px;}

/* ---------- 内容区（独立滚动） ---------- */
.screen{
  flex:1 1 auto; min-height:0;
  overflow-y:auto; -webkit-overflow-scrolling:touch;
  padding:16px 16px 26px;
  scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.14) transparent;
}
.screen::-webkit-scrollbar{width:5px;}
.screen::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14); border-radius:99px;}
.page-title{
  font-size:21px; font-weight:800; margin:4px 0 16px; letter-spacing:.4px;
  display:flex; align-items:center; gap:10px;
}
.page-title::before{
  content:""; width:4px; height:20px; border-radius:3px; flex:none;
  background:var(--grad); box-shadow:0 0 10px rgba(45,212,191,.6);
}

/* ---------- 数据卡（网格） ---------- */
.grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:14px;}
.stat{
  position:relative; overflow:hidden;
  background:var(--glass); border:1px solid var(--line); border-radius:18px;
  padding:14px 14px 13px;
}
.stat::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(120px 56px at 102% 0%, rgba(45,212,191,.13), transparent 70%);
}
.stat .num{font-size:26px; font-weight:800; color:var(--teal); letter-spacing:.2px; font-variant-numeric:tabular-nums; line-height:1.2;}
.stat .lb{font-size:11px; color:var(--dim); margin-top:5px; line-height:1.45;}
.stat.gold .num{color:var(--amber);} .stat.cyan .num{color:var(--cyan);} .stat.green .num{color:var(--green);}
/* 网格内的操作按钮占满整行 */
.grid .btn{grid-column:1/-1; width:100%; text-align:center;}

/* ---------- 卡片 ---------- */
.card{
  background:var(--glass); border:1px solid var(--line); border-radius:20px;
  padding:17px 16px; margin-bottom:14px;
  box-shadow:0 12px 30px rgba(0,0,0,.28);
  backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
}
.card h2{font-size:15.5px; margin-bottom:12px; letter-spacing:.3px; display:flex; align-items:center;}
.card h2 .en{font-size:10px; color:var(--dim); letter-spacing:2px; font-weight:600; margin-left:8px;}
.card .muted{color:var(--dim); font-size:12.5px;}

/* ---------- 钱包卡 ---------- */
.wallet-card{position:relative; overflow:hidden;}
.wallet-card::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(220px 90px at 96% -8%, rgba(52,211,153,.15), transparent 70%);
}
.wallet-addr{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:rgba(2,6,16,.5); border:1px solid rgba(52,211,153,.35); border-radius:14px;
  padding:13px 14px;
}
.addr-dot{
  width:10px; height:10px; border-radius:50%; flex:none;
  background:var(--green); box-shadow:0 0 12px rgba(52,211,153,.8);
}
.wallet-addr .mono{font-size:14px; color:var(--txt); letter-spacing:.5px; word-break:break-all;}

/* ---------- 表格（横向滚动兼容小屏） ---------- */
.tbl-wrap{
  overflow-x:auto; -webkit-overflow-scrolling:touch;
  border:1px solid var(--line); border-radius:15px; background:rgba(2,6,16,.42);
}
table.tbl{width:100%; border-collapse:collapse; font-size:13px; min-width:520px;}
.tbl th{
  text-align:left; padding:10px 12px; font-size:11px; color:var(--dim);
  letter-spacing:1px; font-weight:700; border-bottom:1px solid var(--line); background:rgba(255,255,255,.035);
}
.tbl td{padding:9px 12px; font-size:12.5px; border-bottom:1px solid rgba(255,255,255,.05); vertical-align:middle;}
.tbl tr:last-child td{border-bottom:none;}
.tbl tr:hover td{background:rgba(255,255,255,.025);}
.mono{font-variant-numeric:tabular-nums; font-family:Consolas,Menlo,monospace; font-size:12.5px;}

/* ---------- 徽章 ---------- */
.badge{display:inline-block; padding:2px 9px; border-radius:999px; font-size:11px; font-weight:700; white-space:nowrap;}
.badge.teal{background:rgba(45,212,191,.14); color:var(--teal); border:1px solid rgba(45,212,191,.35);}
.badge.amber{background:rgba(251,191,36,.14); color:var(--amber); border:1px solid rgba(251,191,36,.35);}
.badge.red{background:rgba(248,113,113,.14); color:var(--red); border:1px solid rgba(248,113,113,.35);}
.badge.gray{background:rgba(148,163,184,.12); color:var(--sub); border:1px solid rgba(148,163,184,.3);}
.badge.green{background:rgba(52,211,153,.14); color:var(--green); border:1px solid rgba(52,211,153,.35);}

/* ---------- 表单 ---------- */
.form-card{width:100%;}
.field{margin-bottom:13px;}
.field label{display:block; font-size:12.5px; color:var(--sub); margin-bottom:6px; font-weight:600;}
.field input,.field select{
  width:100%; padding:12px 13px; font-size:15px; color:var(--txt);
  background:rgba(255,255,255,.055); border:1px solid var(--line); border-radius:13px; outline:none;
  transition:border .15s, box-shadow .15s;
}
.field input:focus,.field select:focus{border-color:rgba(45,212,191,.6); box-shadow:0 0 0 3px rgba(45,212,191,.14);}
.field input::placeholder{color:var(--dim);}
.field .help{font-size:11.5px; color:var(--dim); margin-top:6px; line-height:1.6;}

/* ---------- 按钮 ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  border:none; cursor:pointer; font-size:14px; font-weight:700;
  padding:0 18px; height:46px; border-radius:13px; text-decoration:none; letter-spacing:.3px;
  transition:transform .1s, box-shadow .15s, filter .15s;
}
.btn:active{transform:scale(.97);}
.btn-primary{color:#04121a; background:var(--grad); box-shadow:0 0 18px rgba(45,212,191,.32);}
.btn-primary:hover{filter:brightness(1.08); color:#04121a;}
.btn-danger{color:#fff; background:linear-gradient(135deg,#f87171,#ef4444);}
.btn-ghost{color:var(--sub); background:transparent; border:1px solid var(--line);}
.btn-ghost:hover{color:var(--txt); background:rgba(255,255,255,.05);}
.btn-sm{padding:0 12px; height:32px; font-size:12px; border-radius:9px;}

/* ---------- Flash / 提示 ---------- */
.flash{
  padding:11px 14px; border-radius:13px; font-size:13px; margin-bottom:13px;
  border:1px solid; animation:fadein .25s ease; line-height:1.6;
}
@keyframes fadein{from{opacity:0; transform:translateY(-4px);} to{opacity:1; transform:none;}}
.flash.success{color:var(--green); background:rgba(52,211,153,.10); border-color:rgba(52,211,153,.4);}
.flash.error{color:var(--red); background:rgba(248,113,113,.10); border-color:rgba(248,113,113,.4);}
.note{
  font-size:12px; color:var(--sub); border:1px dashed rgba(255,255,255,.14);
  border-radius:13px; padding:10px 13px; margin-bottom:13px; background:rgba(255,255,255,.02); line-height:1.7;
}
.note b{color:var(--teal);}
.note code{font-size:11.5px; color:var(--cyan);}

/* ---------- 底部 Tab 栏（固定贴底） ---------- */
.tabbar{
  flex:none;
  display:flex; background:rgba(7,11,20,.94);
  backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border-top:1px solid var(--line);
  padding:6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tab{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
  color:var(--dim); font-size:10.5px; font-weight:700; letter-spacing:.5px;
  padding:4px 0 3px; border-radius:12px; transition:all .15s;
}
.tab svg{width:23px; height:23px;}
.tab.on{color:var(--teal); background:rgba(45,212,191,.09); box-shadow:inset 0 0 0 1px rgba(45,212,191,.18);}

/* ---------- 签到卡 ---------- */
.checkin-card{position:relative; overflow:hidden;}
.checkin-card::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(200px 90px at 90% -10%, rgba(251,191,36,.16), transparent 70%);
}
.checkin-ready,.checkin-countdown{text-align:center; padding:6px 0 2px;}
.checkin-big{font-size:18px; font-weight:800; color:var(--amber); letter-spacing:.4px;}
.checkin-countdown .checkin-big{color:var(--teal);}
.checkin-time{
  font-size:36px; font-weight:800; letter-spacing:3px; color:var(--txt);
  font-variant-numeric:tabular-nums; font-family:Consolas,Menlo,monospace;
  margin:8px 0 4px; text-shadow:0 0 22px rgba(45,212,191,.45);
}
.checkin-sub{font-size:11.5px; color:var(--dim); margin-bottom:12px; line-height:1.7;}

/* ---------- 页脚 ---------- */
.appfoot{flex:none; text-align:center; font-size:10.5px; color:var(--dim); padding:14px 16px calc(16px + env(safe-area-inset-bottom));}

/* ---------- 后台宽幅下微调 ---------- */
.app-admin .grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));}
.app-admin .screen{padding:20px 22px 30px;}
.app-admin .grid .btn{grid-column:auto; width:auto;}
.app-admin .tbl{min-width:640px;}

/* ---------- 充值二维码卡 ---------- */
.recharge-qr-card{
  text-align:center; padding:20px 16px 16px; margin-bottom:18px;
  background:var(--glass); border-radius:16px; border:1px solid var(--line);
}
.recharge-qr-title{font-size:15px; font-weight:700; margin-bottom:14px; color:var(--teal);}
.recharge-qr-img img{display:block; margin:0 auto;}
.recharge-addr-label{font-size:12px; color:var(--sub); margin-top:14px; margin-bottom:6px;}
.recharge-addr-row{display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap;}
.recharge-addr{
  font-size:13px; color:var(--txt); background:rgba(0,0,0,.3);
  padding:8px 12px; border-radius:8px; word-break:break-all; max-width:100%;
}

/* 分页 */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pagination .page-btn, .pagination .page-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 10px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; color: #64748b; text-decoration: none;
  background: #fff;
}
.pagination .page-btn:hover, .pagination .page-num:hover { border-color: #14b8a6; color: #14b8a6; }
.pagination .page-num.current { background: #14b8a6; color: #fff; border-color: #14b8a6; }
.pagination .page-btn.disabled { opacity: .4; cursor: not-allowed; }
.pagination .page-dots { color: #94a3b8; }
