/* 龙猫助手网页端样式 — 复刻 EXE 暗色风格
 * 底 #1c1c20 · 卡 #25252b · 边 #33333b · 字 #ececef · 强调绿 #07c160
 */

[x-cloak] { display: none !important; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #1c1c20;
  color: #ececef;
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ---- 顶部状态条 ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 14px;
  background: #161619;
  border-bottom: 1px solid #2a2a30;
  flex-shrink: 0;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #6a6a72;
  flex-shrink: 0;
}
.dot.valid { background: #07c160; }
.dot.invalid { background: #e74c3c; }
.dot.none { background: #6a6a72; }
.status-text {
  color: #8a8a92;
  font-size: 12px;
}
.spacer { flex: 1; }
.brand {
  color: #8a8a92;
  font-size: 12px;
}

/* ---- 通用按钮 ---- */
button, .primary, .secondary, .download {
  font-family: inherit;
  font-size: 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s, transform 0.05s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
button:active, .primary:active, .secondary:active, .download:active { transform: translateY(1px); }

.primary {
  background: #07c160;
  color: #fff;
  padding: 13px;
  font-weight: 500;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin-top: 6px;
}
.primary:hover { background: #18cb6e; }
.primary:disabled { background: #34343c; color: #6a6a72; cursor: not-allowed; }

.secondary {
  background: #2c2c33;
  color: #ececef;
  border: 1px solid #3a3a43;
  padding: 13px;
  font-weight: 500;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin-top: 6px;
}
.secondary:hover { background: #33333b; }

.ghost {
  background: transparent;
  color: #8a8a92;
  font-size: 13px;
  font-weight: 400;
  padding: 6px 10px;
  border-radius: 4px;
}
.ghost:hover { color: #07c160; }

/* ---- 下载龙猫助手 — 主推 CTA，橙色高显眼 ---- */
.download {
  background: #ff7a18;
  color: #fff;
  padding: 18px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin-top: 14px;
  box-shadow: 0 4px 14px rgba(255, 122, 24, 0.4);
  position: relative;
}
.download:hover {
  background: #ff8c33;
  box-shadow: 0 6px 18px rgba(255, 122, 24, 0.55);
  transform: translateY(-1px);
}
.download::before {
  content: "↓ ";
  font-weight: 800;
  margin-right: 2px;
}

/* ---- 页面/卡片 ---- */
.page {
  flex: 1;
  padding: 22px 22px 28px;
  display: flex;
  flex-direction: column;
}
.card {
  background: #25252b;
  border: 1px solid #33333b;
  border-radius: 6px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- 文本 ---- */
.title {
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  margin: 0 0 4px;
}
.subtitle {
  color: #8a8a92;
  font-size: 12px;
  text-align: center;
  margin: 0 0 12px;
}
.field-label {
  color: #8a8a92;
  font-size: 12px;
  margin: 4px 0 -4px;
}
.section-label {
  color: #9a9aa2;
  font-size: 13px;
}
.info-text {
  color: #9a9aa2;
  font-size: 13px;
  line-height: 1.7;
  margin: 8px 0;
}
.info-line {
  color: #8a8a92;
  font-size: 12px;
  text-align: center;
  margin: 4px 0;
}
.status-line {
  color: #8a8a92;
  font-size: 12px;
  text-align: center;
  margin: 4px 0;
  white-space: pre-line;
}
.countdown {
  font-size: 30px;
  font-weight: 600;
  color: #f0a020;
  text-align: center;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace;
  letter-spacing: 1px;
  margin: 10px 0 2px;
  line-height: 1.2;
}
.countdown.waiting { color: #6a6a72; font-size: 22px; }
.countdown-hint {
  color: #6a6a72;
  font-size: 11px;
  text-align: center;
  margin: 0 0 4px;
}
.hint {
  font-size: 12px;
  text-align: center;
  margin: 6px 0 0;
}
.hint.err { color: #e74c3c; }

.credits {
  color: #8a8a92;
  font-size: 12px;
  text-align: center;
  margin: 0;
}
.credits.exhausted { color: #e74c3c; }
.credits span { font-weight: 600; }

.user-info {
  color: #ececef;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin: 4px 0 0;
}
.user-info-hint {
  color: #6a6a72;
  font-size: 11px;
  text-align: center;
  margin: 0 0 6px;
}

/* ---- 输入 ---- */
input, select {
  background: #2c2c33;
  border: 1px solid #3a3a43;
  border-radius: 4px;
  padding: 11px 12px;
  color: #ececef;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus {
  border-color: #07c160;
  outline: none;
}
input::placeholder { color: #6a6a72; }
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%238a8a92' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 7px;
  padding-right: 30px;
}

/* ---- 行布局 ---- */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.row > .section-label { flex-shrink: 0; }
.row select { flex: 1; max-width: 190px; margin-left: auto; }
.link-row { justify-content: center; margin: 4px 0; }

.time-pickers {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.time-pickers select { width: 66px; flex: none; }
.unit { color: #9a9aa2; font-size: 13px; }

/* ---- 分隔线 ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6a6a72;
  font-size: 12px;
  margin: 8px 0 4px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #33333b;
}

/* ---- 步骤列表（连接提示页）---- */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.step {
  background: #1c1c20;
  border: 1px solid #33333b;
  border-radius: 4px;
  padding: 10px 12px;
  color: #c0c0c8;
  font-size: 13px;
  line-height: 1.6;
}

.mobile-tip {
  background: #1c1c20;
  border: 1px solid #33333b;
  border-radius: 4px;
  padding: 12px;
  color: #9a9aa2;
  font-size: 13px;
  text-align: center;
}
.mobile-tip b { color: #07c160; }

/* ---- 跑步记录抽屉 ---- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  height: 100dvh;
  background: #1c1c20;
  border-left: 1px solid #33333b;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 16px;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #33333b;
  margin-bottom: 12px;
}
.drawer-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.archive-stats {
  color: #9a9aa2;
  font-size: 12px;
  margin: 0 0 12px;
  line-height: 1.6;
}
.archive-list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.archive-row {
  background: #25252b;
  border: 1px solid #33333b;
  border-radius: 4px;
  padding: 10px 12px;
}
.archive-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}
.archive-date { color: #ececef; }
.archive-flag { font-size: 12px; font-weight: 500; }
.archive-row-bot {
  display: flex;
  justify-content: space-between;
  color: #9a9aa2;
  font-size: 12px;
}
.archive-empty {
  color: #6a6a72;
  font-size: 13px;
  text-align: center;
  margin-top: 18px;
}

/* ---- Loading ---- */
.loading-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #33333b;
  border-top-color: #07c160;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- 小屏微调 ---- */
@media (max-width: 480px) {
  .page { padding: 16px 14px 22px; }
  .card { padding: 20px 18px; }
  .title { font-size: 18px; }
}
