/* 颜色变量会在 app.js 中用 Telegram 主题色覆盖，实现深浅色自动适配 */
:root {
  --bg: #ffffff;
  --card-bg: #f3f3f6;
  --text: #000000;
  --hint: #8a8a8e;
  --btn: #2481cc;
  --btn-text: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}

.hidden { display: none !important; }

/* 诊断/警告条 */
.warn {
  background: #fff3cd;
  color: #663c00;
  border: 1px solid #ffe08a;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

/* 用户资料卡 */
.profile { display: flex; align-items: center; gap: 14px; }

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.name { font-size: 18px; font-weight: 600; }

.username {
  display: inline-block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--btn);
  text-decoration: none;
}

.tgid { margin-top: 4px; font-size: 13px; color: var(--hint); }

/* 积分卡 */
.counter { text-align: center; }

.counter-label { font-size: 14px; color: var(--hint); }

.counter-num {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
  margin: 8px 0 18px;
  transition: transform 0.1s ease;
}

.counter-num.bump { transform: scale(1.15); }

.main-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 17px;
  font-weight: 600;
  color: var(--btn-text);
  background: var(--btn);
  cursor: pointer;
}

.main-btn:active { opacity: 0.85; }
.main-btn:disabled { opacity: 0.5; cursor: default; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(32px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  max-width: 80%;
  text-align: center;
  z-index: 99;
}
