* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a; color: #e2e8f0; line-height: 1.6;
  min-height: 100vh;
}
#app { max-width: 720px; margin: 0 auto; padding: 20px 16px 40px; }

header { text-align: center; margin-bottom: 24px; }
header h1 { font-size: 1.8rem; background: linear-gradient(135deg, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { font-size: 0.85rem; color: #94a3b8; margin-top: 4px; }

.panel {
  background: #1e293b; border: 1px solid #334155; border-radius: 12px;
  padding: 20px; margin-bottom: 16px;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.panel-header h2 { font-size: 1rem; color: #94a3b8; font-weight: 500; }
.panel-actions { display: flex; gap: 8px; }

.btn {
  padding: 8px 16px; border: none; border-radius: 8px; cursor: pointer;
  font-size: 0.85rem; font-weight: 500; transition: all 0.2s;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-record { background: #ef4444; color: #fff; }
.btn-record:hover:not(:disabled) { background: #dc2626; }
.btn-stop { background: #64748b; color: #fff; }
.btn-stop:hover:not(:disabled) { background: #475569; }
.btn-pause { background: #f59e0b; color: #fff; }
.btn-pause:hover:not(:disabled) { background: #d97706; }
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #2563eb; }
.btn-secondary { background: #334155; color: #e2e8f0; }
.btn-secondary:hover:not(:disabled) { background: #475569; }

.controls { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }

#timer {
  text-align: center; font-size: 2.5rem; font-weight: 700;
  font-variant-numeric: tabular-nums; margin: 8px 0; color: #f1f5f9;
}

#volume-bar {
  height: 6px; background: #334155; border-radius: 3px; overflow: hidden; margin: 8px 0;
}
#volume-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #60a5fa, #a78bfa);
  transition: width 80ms linear; border-radius: 3px;
}

#status-text { text-align: center; font-size: 0.8rem; color: #64748b; }

#transcript-text {
  width: 100%; min-height: 120px; padding: 12px; border: 1px solid #334155;
  border-radius: 8px; background: #0f172a; color: #e2e8f0;
  font-size: 0.9rem; line-height: 1.6; resize: vertical; font-family: inherit;
}
#transcript-text:focus { outline: none; border-color: #3b82f6; }

#summary-content { font-size: 0.9rem; }
.summary-section { margin-bottom: 14px; }
.summary-icon { margin-right: 4px; }
.summary-section ul { padding-left: 20px; margin-top: 6px; }
.summary-section li { margin-bottom: 4px; color: #cbd5e1; }
#full-summary-text { margin-top: 6px; color: #cbd5e1; line-height: 1.7; }
hr { border: none; border-top: 1px solid #334155; margin: 14px 0; }

#history-list {
  display: flex; flex-direction: column; gap: 8px;
}
.history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: #0f172a; border-radius: 8px; cursor: pointer;
  transition: background 0.2s;
}
.history-item:hover { background: #1e293b; }
.history-item .title { font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .date { font-size: 0.75rem; color: #64748b; margin: 0 12px; white-space: nowrap; }
.history-item .del-btn {
  background: none; border: none; color: #64748b; cursor: pointer; font-size: 1rem; padding: 2px 6px;
}
.history-item .del-btn:hover { color: #ef4444; }
.history-empty { text-align: center; color: #64748b; padding: 20px; font-size: 0.85rem; }

.loading { opacity: 0.6; pointer-events: none; }

@media (max-width: 600px) {
  #app { padding: 12px 10px; }
  .panel { padding: 14px; }
  #timer { font-size: 2rem; }
  .controls { gap: 6px; }
  .btn { padding: 6px 12px; font-size: 0.8rem; }
}
