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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100dvh;
  padding: 1rem;
  padding-top: env(safe-area-inset-top, 1rem);
  padding-bottom: env(safe-area-inset-bottom, 1rem);
}

h1 {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #888;
}

/* Auth screen */
#auth-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80dvh;
  gap: 1rem;
}

#auth-screen input {
  width: 100%;
  max-width: 320px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #e0e0e0;
  font-size: 1rem;
}

#auth-screen button {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

/* Main screen */
#main-screen { display: none; }

/* Record button */
.record-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

#record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #333;
  background: #1a1a1a;
  color: #e0e0e0;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#record-btn.recording {
  border-color: #ef4444;
  background: #1c0a0a;
  color: #ef4444;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
  50% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}

#record-btn.uploading {
  border-color: #2563eb;
  color: #2563eb;
}

/* Status message */
#status {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 2rem;
  min-height: 1.2rem;
}

/* Task list */
.task-list h2 {
  font-size: 0.8rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.task {
  background: #141414;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.task-status {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
}

.task-status.received { color: #888; background: #1a1a1a; }
.task-status.transcribing { color: #f59e0b; background: #1a1700; }
.task-status.transcribed { color: #f59e0b; background: #1a1700; }
.task-status.executing { color: #2563eb; background: #0a1225; }
.task-status.completed { color: #22c55e; background: #0a1a0e; }
.task-status.failed { color: #ef4444; background: #1c0a0a; }

.task-time {
  font-size: 0.7rem;
  color: #555;
}

.task-transcript {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 0.4rem;
}

.task-result {
  font-size: 0.85rem;
  color: #ccc;
  white-space: pre-wrap;
  background: #0d0d0d;
  padding: 0.5rem;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.task-error {
  font-size: 0.8rem;
  color: #ef4444;
}
