/* 通电机能风 · 移动优先 */
@import url('https://fonts.googleapis.com/css2?family=Martian+Mono:wght@400;600;800&display=swap');

:root {
  --bg: #0b0f0c;
  --bg-2: #10161211;
  --panel: #121a15;
  --panel-2: #16211b;
  --line: #223328;
  --ink: #e8f2ea;
  --ink-dim: #9db3a4;
  --ink-faint: #5c7263;
  --volt: #3dff88;
  --volt-dim: #1d8f4c;
  --amber: #ffb454;
  --red: #ff6b6b;
  --mono: 'Martian Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --cjk: -apple-system, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { color-scheme: dark; }
body {
  background:
    radial-gradient(1200px 500px at 50% -200px, #1a3d2422, transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 39px, #16241b55 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, #16241b55 39px 40px),
    var(--bg);
  color: var(--ink);
  font-family: var(--cjk);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* —— 顶栏 —— */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #0b0f0cd9; backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--mono); font-weight: 800; font-size: 15px; letter-spacing: -0.5px; display: flex; align-items: center; gap: 7px; white-space: nowrap; flex: none; }
.logo .bolt { color: var(--volt); font-size: 17px; filter: drop-shadow(0 0 6px #3dff8880); }
.logo small { color: var(--ink-faint); font-weight: 400; font-size: 10px; margin-left: 2px; }
.top .spacer { flex: 1; }
.top nav { display: flex; gap: 2px; }
.top nav a {
  font-size: 12.5px; color: var(--ink-dim); padding: 6px 10px; border-radius: 8px;
}
.top nav a.on, .top nav a:active { color: var(--volt); background: #3dff8812; }

/* —— 电池（额度）—— */
.battery {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink-dim);
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  cursor: pointer;
}
.battery .shell {
  width: 26px; height: 12px; border: 1.5px solid var(--ink-dim); border-radius: 3px; position: relative;
}
.battery .shell::after { /* 电池正极凸头 */
  content: ''; position: absolute; right: -4.5px; top: 2.5px; width: 3px; height: 5px;
  background: var(--ink-dim); border-radius: 0 2px 2px 0;
}
.battery .juice {
  position: absolute; inset: 1.5px; border-radius: 1px; transform-origin: left;
  background: linear-gradient(90deg, var(--volt-dim), var(--volt));
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.battery.low .juice { background: var(--amber); animation: pulse 1.2s infinite; }
.battery.dead .juice { background: var(--red); }
@keyframes pulse { 50% { opacity: .45; } }

/* —— 通用元件 —— */
.wrap { max-width: 720px; margin: 0 auto; padding: 0 14px 90px; }
.wide { max-width: 1080px; }
.kicker { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 2.5px; color: var(--volt); text-transform: uppercase; }
h1.hero {
  font-size: clamp(26px, 7vw, 42px); line-height: 1.25; font-weight: 800; letter-spacing: -0.5px;
  margin: 10px 0 12px;
}
h1.hero em { font-style: normal; color: var(--volt); text-shadow: 0 0 24px #3dff8855; }
.sub { color: var(--ink-dim); font-size: 14.5px; max-width: 34em; }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: relative; overflow: hidden;
}
.card.link:active { border-color: var(--volt-dim); transform: scale(.985); transition: .12s; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .5px;
  color: var(--ink-dim); background: #0e1410; border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.chip.volt { color: var(--volt); border-color: #2b5c3d; }
.chip.amber { color: var(--amber); border-color: #5c4a2b; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); padding: 12px 18px; cursor: pointer;
  min-height: 46px; /* 触控目标 */
}
.btn.primary {
  background: linear-gradient(135deg, #2be36f, #1fbf62); color: #05140a; border: none;
  box-shadow: 0 4px 24px #2be36f33; font-weight: 700;
}
.btn.primary:active { transform: translateY(1px); box-shadow: 0 2px 10px #2be36f22; }
.btn.ghost { background: transparent; }
.mono { font-family: var(--mono); }
.dim { color: var(--ink-dim); } .faint { color: var(--ink-faint); }
.sec { margin-top: 34px; }
.sec > .sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.sec > .sec-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.sec > .sec-head .more { margin-left: auto; font-size: 12px; color: var(--ink-faint); }

/* —— 首页项目卡 —— */
.pcards { display: grid; gap: 12px; }
@media (min-width: 760px) { .pcards { grid-template-columns: 1fr 1fr; } }
.pcard .head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pcard .avatar {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 800; font-size: 16px; color: var(--volt);
  background: #0e1911; border: 1px solid #234730;
}
.pcard h3 { font-size: 16px; font-weight: 700; }
.pcard .tagline { color: var(--ink-dim); font-size: 13px; margin: 6px 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard .play {
  margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 800;
  color: #05140a; background: var(--volt); border-radius: 999px; padding: 7px 14px;
}
.new-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 8px var(--volt); animation: pulse 1.6s infinite; }

/* —— 三步说明 —— */
.steps { display: grid; gap: 10px; counter-reset: st; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { counter-increment: st; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.step::before {
  content: '0' counter(st); font-family: var(--mono); font-weight: 800; font-size: 22px;
  color: var(--volt); display: block; margin-bottom: 4px; opacity: .9;
}
.step b { display: block; font-size: 14px; margin-bottom: 3px; }
.step span { font-size: 12.5px; color: var(--ink-dim); }

/* —— 榜单 —— */
.rank-list { display: grid; gap: 10px; }
.rrow { display: flex; align-items: center; gap: 12px; padding: 14px; }
.rrow .pos { font-family: var(--mono); font-weight: 800; font-size: 18px; width: 30px; color: var(--ink-faint); flex: none; text-align: center; }
.rrow:nth-child(1) .pos { color: var(--volt); }
.rrow:nth-child(2) .pos { color: #9fe7bb; }
.rrow:nth-child(3) .pos { color: #6fbf8f; }
.rrow .info { flex: 1; min-width: 0; }
.rrow .info b { font-size: 15px; }
.rrow .dims { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.rrow .total {
  font-family: var(--mono); font-weight: 800; font-size: 20px; color: var(--volt); flex: none;
}
.rrow .total small { display: block; font-size: 9px; color: var(--ink-faint); font-weight: 400; text-align: right; }
.dimbar { display: flex; flex-direction: column; gap: 2px; font-size: 10px; color: var(--ink-faint); font-family: var(--mono); min-width: 52px; }
.dimbar i { height: 3px; border-radius: 2px; background: var(--volt-dim); display: block; }

/* —— 项目页 —— */
.pj-head { padding: 14px 0 0; }
.pj-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.pj-head .tagline { color: var(--ink-dim); font-size: 13.5px; margin-top: 4px; }
.pj-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tabs { display: flex; gap: 4px; margin: 16px 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs button {
  flex: 1; padding: 10px; font-size: 13px; font-weight: 600; color: var(--ink-dim);
  background: transparent; border: none; border-radius: 9px; cursor: pointer; min-height: 42px;
}
.tabs button.on { background: #3dff8815; color: var(--volt); }
.pane { display: none; } .pane.on { display: block; }

/* playground 对话 */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 300px; max-height: 56dvh; overflow-y: auto; padding: 4px 2px 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: #21422e; border: 1px solid #2b5c3d; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .cost { display: block; margin-top: 6px; font-family: var(--mono); font-size: 9.5px; color: var(--amber); }
.composer { display: flex; gap: 8px; margin-top: 10px; position: sticky; bottom: 12px; }
.composer textarea {
  flex: 1; resize: none; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 14px;
  min-height: 48px; max-height: 120px; outline: none;
}
.composer textarea:focus { border-color: var(--volt-dim); }
.composer .send { flex: none; width: 48px; height: 48px; border-radius: 12px; font-size: 18px; }
.model-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.model-row::-webkit-scrollbar { display: none; }
.mchip {
  flex: none; display: flex; flex-direction: column; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel);
  padding: 7px 11px; cursor: pointer; min-height: 44px;
}
.mchip b { font-size: 12px; font-weight: 700; color: var(--ink-dim); }
.mchip small { font-family: var(--mono); font-size: 9px; color: var(--ink-faint); }
.mchip.on { border-color: var(--volt); background: #3dff880d; }
.mchip.on b { color: var(--volt); }
.mchip.lock b::after { content: ' 🔒'; font-size: 10px; }
.iframe-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #000; }
.iframe-wrap iframe { width: 100%; height: 68dvh; border: 0; display: block; }
.takeaway pre {
  font-family: var(--mono); font-size: 11px; color: #b8e6c6; background: #0a120d;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; margin: 8px 0;
}
.scorecard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.scorecard .sc { text-align: center; padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.scorecard .sc b { font-family: var(--mono); font-size: 16px; color: var(--volt); display: block; }
.scorecard .sc span { font-size: 10px; color: var(--ink-faint); }

/* —— 电量页 —— */
.big-batt { display: flex; flex-direction: column; align-items: center; padding: 30px 0 10px; }
.big-batt .shell {
  width: 160px; height: 74px; border: 3px solid var(--ink-dim); border-radius: 14px; position: relative;
}
.big-batt .shell::after { content: ''; position: absolute; right: -12px; top: 24px; width: 8px; height: 26px; background: var(--ink-dim); border-radius: 0 4px 4px 0; }
.big-batt .juice { position: absolute; inset: 5px; border-radius: 8px; transform-origin: left; background: linear-gradient(90deg, var(--volt-dim), var(--volt)); box-shadow: 0 0 30px #3dff8844; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.big-batt .pct { font-family: var(--mono); font-weight: 800; font-size: 34px; margin-top: 14px; color: var(--volt); }
.big-batt .pct small { font-size: 12px; color: var(--ink-faint); font-weight: 400; }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv b { font-family: var(--mono); font-weight: 600; }
input.key {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 12px; padding: 13px 14px; font-family: var(--mono); font-size: 12px; outline: none;
}
input.key:focus { border-color: var(--volt-dim); }

.btn-login {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700; color: #05140a;
  background: linear-gradient(135deg, #2be36f, #1fbf62);
  border-radius: 9px; padding: 7px 12px; min-height: 30px; white-space: nowrap;
}
@media (max-width: 480px) {
  .btn-login { font-size: 11px; padding: 6px 8px; }
  /* 手机上元素太多放不下（logo+3个导航+办卡+语言+电量）：导航换到第二行，
     第一行只留品牌和关键控件，避免语言/电量被挤出屏幕 */
  .top { gap: 5px; padding: 10px 8px; flex-wrap: wrap; row-gap: 4px; }
  .logo small { display: none; }
  .top nav { order: 10; width: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { padding: 5px 8px; font-size: 12px; white-space: nowrap; }
  .lang { padding: 6px 6px; }
  .battery { padding: 5px 6px; gap: 5px; }
}

/* —— 语言切换 —— */
.lang {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--ink-dim);
  border: 1px solid var(--line); background: var(--panel); border-radius: 8px;
  padding: 6px 9px; cursor: pointer; min-height: 30px;
}

/* —— 社群 —— */
.fab {
  position: fixed; right: 14px; bottom: 18px; z-index: 70;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: #05140a;
  background: linear-gradient(135deg, #2be36f, #1fbf62);
  border: none; border-radius: 999px; padding: 12px 18px; cursor: pointer;
  box-shadow: 0 6px 24px #2be36f44;
}
.fab span { font-size: 15px; }
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: #000a; backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 700px) { .modal-mask { align-items: center; } }
.modal {
  width: 100%; max-width: 520px; max-height: 86dvh; overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 20px 20px 0 0; padding: 18px;
}
@media (min-width: 700px) { .modal { border-radius: 20px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-head b { font-size: 17px; }
.modal-head .x { background: none; border: none; color: var(--ink-faint); font-size: 16px; cursor: pointer; padding: 6px; }
.perk {
  font-size: 12.5px; color: var(--amber); background: #ffb45411; border: 1px dashed #5c4a2b;
  border-radius: 10px; padding: 9px 12px; margin: 10px 0;
}
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.group {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; background: var(--panel);
}
.group img { width: 110px; height: 110px; border-radius: 8px; }
.group b { font-size: 13px; }

/* —— 分类筛选 —— */
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; font-size: 12px; font-weight: 600; color: var(--ink-dim);
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; min-height: 36px;
}
.cat.on { color: var(--volt); border-color: var(--volt-dim); background: #3dff880d; }

/* —— 账号表单 —— */
.auth-tabs { display: flex; gap: 14px; margin-bottom: 12px; font-weight: 700; }
.auth-tabs span { color: var(--ink-faint); cursor: pointer; }
.auth-tabs span.on { color: var(--volt); }
.field { margin-bottom: 10px; }
.err { color: var(--red); font-size: 12px; min-height: 16px; margin: 4px 0; }

/* —— 底部悬浮条（移动）—— */
.playbar {
  position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: #101812f2; border: 1px solid #2b5c3d; border-radius: 16px;
  padding: 10px 14px; backdrop-filter: blur(14px); box-shadow: 0 8px 30px #000a;
}
@media (min-width: 900px) { .playbar { display: none; } }

/* —— 页面加载编排 —— */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .55s cubic-bezier(.2,.8,.2,1) forwards; }
.reveal:nth-child(2) { animation-delay: .07s; } .reveal:nth-child(3) { animation-delay: .14s; }
.reveal:nth-child(4) { animation-delay: .21s; } .reveal:nth-child(5) { animation-delay: .28s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.footer { margin-top: 50px; padding: 20px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-faint); }
.footer .mono { font-size: 10px; }

/* 撞墙卡片（额度耗尽 → 转化） */
.gate-card{border:1px solid var(--volt);border-radius:12px;padding:14px 16px;margin-top:8px;
  background:linear-gradient(180deg,#3dff8814,transparent)}
.gate-card b{display:block;font-size:15px;margin-bottom:5px}
.gate-card p{margin:0 0 11px;font-size:13.5px;color:var(--ink-dim);line-height:1.65}
.gate-actions{display:flex;gap:8px;flex-wrap:wrap}
.gate-actions .btn{flex:1 1 auto;min-width:150px;text-align:center;justify-content:center}
.gate-free{display:block;margin-top:8px;font-size:11.5px;color:var(--ink-faint)}
@media(max-width:420px){.gate-actions .btn{flex:1 1 100%}}

/* 群号一键复制（很多人没法扫码：在电脑上看网页、手机上用 QQ） */
.gnum{display:block;width:100%;margin-top:6px;padding:7px 8px;font-size:11.5px;
  color:var(--volt);background:#0e1911;border:1px solid #2b5c3d;border-radius:8px;cursor:pointer}
.gnum:active{background:#132a1c}

/* 悬浮进群按钮原本固定在右下角，正好压在聊天输入区的发送键上——
   手机上实测发送键完全点不到，等于核心功能不可用。
   试过用 JS 检测重叠再收起，但依赖滚动时序、在真实页面里不稳定；
   改成纯 CSS：窄屏下把它挪到左下角并缩成图标，**结构上就不可能与右侧的发送键重叠**。 */
@media (max-width: 560px) {
  .fab {
    right: auto; left: 12px; bottom: 12px;
    padding: 0; width: 46px; height: 46px; border-radius: 50%;
    justify-content: center;
  }
  .fab .fab-label { display: none; }          /* 只留图标；靠结构隐藏，不靠 font-size:0 */
  .fab span { font-size: 20px; }
  /* 输入区左侧让出按钮的位置，避免点输入框时误触 */
  .composer { padding-left: 46px; }

  /* 横向可滚的行（模型选择、任务预设）在窄屏会被裁掉却看不出能滑，
     右侧加一道渐隐提示。用 mask 不占位、不影响点击。 */
  .model-row, .task-row, .chips-scroll {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  }
}

/* 群号一键复制（很多人没法扫码：在电脑上看网页、手机上用 QQ） */
.gnum{display:block;width:100%;margin-top:6px;padding:7px 8px;font-size:11.5px;
  color:var(--volt);background:#0e1911;border:1px solid #2b5c3d;border-radius:8px;cursor:pointer}
.gnum:active{background:#132a1c}

/* 悬浮进群按钮会盖住聊天输入区的发送键——手机上实测完全重叠，用户根本发不出消息。
   输入框进入视口时把它收起，离开时再出现：既不挡操作，也保留全站显眼入口。 */
.fab { transition: opacity .18s, transform .18s; }
.fab.tucked { opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; }

/* 横向可滚的行（模型选择、任务预设）在窄屏会被裁掉却看不出能滑，
   右侧加一道渐隐提示。用 mask 不占位、不影响点击。 */
@media (max-width: 560px) {
  .model-row, .task-row, .chips-scroll {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  }
  .fab { padding: 11px 15px; font-size: 12.5px; }
}

/* —— 桌面适配(2026-08-04):此前全站被 .wrap 720px 锁成窄柱,桌面半屏空白 ——
   平台首页/机厅用 .wide(1080px);hero 双栏,右侧放实时数据面板占住 C 位 */
.hero-grid { display: grid; gap: 26px; }
@media (min-width: 920px) {
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; }
}
.stat-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-panel .stat {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.stat-panel .stat b { display: block; font-family: var(--mono); font-weight: 800;
  font-size: clamp(20px, 2.4vw, 30px); color: var(--volt); }
.stat-panel .stat span { font-size: 11px; color: var(--ink-faint); }
.stat-panel .wide2 { grid-column: 1 / -1; }
.stat-panel .stat.amber b { color: var(--amber); }
@media (min-width: 1000px) { .steps.four { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1080px) { .wide .pcards { grid-template-columns: repeat(3, 1fr); } }

/* 双语块:服务端渲染两种语言,前端按 data-lang 显隐;爬虫无 JS 时两种都读到(利 GEO) */
html[data-lang="en"] .lang-zh { display: none; }
html[data-lang="zh"] .lang-en { display: none; }
