* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "Microsoft YaHei", sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px 0;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.btn, .btn-sm { -webkit-tap-highlight-color: transparent; }
.app {
  width: 480px;
  max-width: 95vw;
  padding: 36px 28px;
}
.app h1 {
  font-size: 22px;
  text-align: center;
  margin-bottom: 6px;
  color: #f8fafc;
}
.subtitle {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 28px;
}

.record-zone {
  background: #1e293b;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 20px;
}
.status-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #475569;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
.status-dot.recording { background: #ef4444; animation: pulse 1.2s infinite; }
.status-dot.paused { background: #f59e0b; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.status-text {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}
.duration {
  font-size: 26px;
  font-weight: 700;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  margin-bottom: 24px;
}

.btn-group {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-primary { background: #ef4444; color: #fff; }
.btn-warning { background: #f59e0b; color: #1e293b; }
.btn-secondary { background: #475569; color: #e2e8f0; }
.btn-success { background: #22c55e; color: #fff; }
.btn-icon { font-size: 16px; }

.history-title {
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 12px;
}
.recording-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recording-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  border-radius: 10px;
  padding: 10px 14px;
}
.recording-item.playing {
  border: 1px solid #22c55e;
}
.recording-info { font-size: 13px; min-width: 0; }
.recording-name { font-weight: 500; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording-meta { font-size: 12px; color: #64748b; }
.recording-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; white-space: nowrap; }
.empty-state {
  text-align: center;
  color: #475569;
  font-size: 13px;
  padding: 20px 0;
}

/* 平板适配 */
@media (max-width: 768px) {
  .app {
    width: 96vw;
    padding: 24px 16px;
  }
  .app h1 { font-size: 20px; }
  .subtitle { margin-bottom: 20px; }
  .record-zone { padding: 22px 16px; }
  .duration { font-size: 24px; margin-bottom: 20px; }
  .btn { padding: 9px 18px; }
}

/* 手机适配 */
@media (max-width: 480px) {
  body { padding: 8px 0; align-items: flex-start; }
  .app {
    width: 100vw;
    padding: 20px 12px;
  }
  .app h1 { font-size: 18px; margin-bottom: 4px; }
  .subtitle { font-size: 12px; margin-bottom: 16px; }
  .record-zone {
    padding: 20px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
  }
  .duration { font-size: 22px; margin-bottom: 18px; }
  .btn-group {
    flex-direction: column;
    gap: 8px;
  }
  .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
  .recording-item {
    padding: 10px 12px;
    gap: 8px;
  }
  .recording-info { font-size: 12px; }
  .recording-meta { font-size: 11px; }
  .btn-sm { padding: 6px 10px; font-size: 11px; }
  .history-title { font-size: 13px; }
}
