/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

#app {
  width: 100%;
  max-width: 500px;
}

/* Card */
.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
}

/* Typography */
h1 {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
}

/* Forms */
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus {
  border-color: #007aff;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: #007aff;
  color: white;
}

.btn--primary:hover:not(:disabled) {
  background: #0066d6;
}

.btn--secondary {
  background: #8e8e93;
  color: white;
}

.btn--ghost {
  background: transparent;
  color: #007aff;
  padding: 8px 16px;
  width: auto;
}

.btn--record {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #ff3b30;
  color: white;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.btn--record.recording {
  background: #34c759;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.header h1 {
  text-align: left;
  margin-bottom: 0;
}

/* Recorder */
.recorder {
  text-align: center;
  padding: 24px 0;
}

.status {
  margin-top: 16px;
  color: #666;
  font-size: 14px;
}

.status.error {
  color: #ff3b30;
}

/* Transcript */
.transcript-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transcript {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 16px;
  min-height: 150px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Error */
.error {
  color: #ff3b30;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
}

/* Recording Feedback */
.recording-feedback {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.timer {
  font-size: 32px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #34c759;
}

.audio-level-container {
  width: 200px;
  height: 8px;
  background: #e5e5ea;
  border-radius: 4px;
  overflow: hidden;
}

.audio-level {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34c759, #ffcc00, #ff3b30);
  border-radius: 4px;
  transition: width 0.05s ease-out;
}

/* Utilities */
.hidden {
  display: none !important;
}
