* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.hd {
  text-align: center;
  color: #fff;
  margin-bottom: 24px;
}
.hd .logo { font-size: 28px; font-weight: 600; }
.hd .sub  { font-size: 13px; opacity: 0.85; margin-top: 6px; }

.view.hidden { display: none; }

.card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  font-family: monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}
input:focus { border-color: #667eea; }

.btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: 0.2s;
}
.btn.primary { background: #667eea; color: #fff; }
.btn.primary:hover { background: #5568d3; }
.btn.primary:active { transform: scale(0.98); }
.btn.ghost {
  background: #f3f4f6;
  color: #374151;
}
.btn.ghost:hover:not(:disabled) { background: #e5e7eb; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
  gap: 12px;
}
.row:last-of-type { border-bottom: none; }
.row .label {
  width: 64px;
  color: #6b7280;
  font-size: 13px;
  flex-shrink: 0;
}
.row .val {
  flex: 1;
  font-size: 15px;
  color: #111827;
  word-break: break-all;
}
.row .val.mono { font-family: 'SF Mono', Menlo, monospace; }
.row .val.big  { font-size: 18px; font-weight: 600; }
.row .val.code { color: #059669; letter-spacing: 2px; }

.copy-btn {
  padding: 6px 12px;
  background: #eef2ff;
  color: #4f46e5;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.copy-btn:hover { background: #e0e7ff; }
.copy-btn.hidden { visibility: hidden; }

.hint {
  margin: 16px 0;
  padding: 12px;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.timer {
  flex: 1;
  font-size: 14px;
  color: #6b7280;
  font-family: monospace;
}
.timer.warn { color: #dc2626; font-weight: 600; }
.actions .btn { margin-top: 0; flex-shrink: 0; width: auto; padding: 10px 16px; font-size: 13px; }

.meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #e5e7eb;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

.err {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.err.show { display: block; }

.footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}
.footer a { color: #fff; text-decoration: underline; }
.footer .muted { opacity: 0.7; }

/* 验证码出现时的高亮动画 */
@keyframes pulse-success {
  0% { background: #d1fae5; }
  100% { background: #fff; }
}
.row.got-sms { animation: pulse-success 1.5s ease-out; }
