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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f9fa;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
}

.container {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a2e;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

.subtitle {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Form */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 18px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #3b82f6;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  gap: 8px;
}

.lang-btn {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.lang-btn.active {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #3b82f6;
}

/* Google Sign-In */
.google-btn-container {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.error {
  color: #ef4444;
  font-size: 14px;
  margin-top: 12px;
}

/* Record */
.greeting {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.instruction {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 40px;
  line-height: 1.5;
}

.record-area {
  margin-bottom: 32px;
}

.record-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  cursor: pointer;
  font-size: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.3);
}

.record-btn:hover {
  transform: scale(1.05);
}

.record-btn.recording {
  animation: pulse 1.5s ease-in-out infinite;
  background: #dc2626;
}

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

#record-status {
  margin-top: 16px;
  font-size: 16px;
  color: #6b7280;
}

.timer {
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ef4444;
  margin-top: 8px;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: #2563eb;
}

/* Processing */
.progress-steps {
  text-align: left;
  margin: 32px auto;
  max-width: 280px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 16px;
  color: #9ca3af;
  transition: color 0.3s;
}

.step.active {
  color: #3b82f6;
  font-weight: 600;
}

.step.done {
  color: #10b981;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e5e7eb;
  flex-shrink: 0;
  transition: background 0.3s;
}

.step.active .step-dot {
  background: #3b82f6;
  animation: pulse-dot 1s ease-in-out infinite;
}

.step.done .step-dot {
  background: #10b981;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Results */
.results-preview {
  text-align: left;
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  font-size: 15px;
  line-height: 1.6;
}

.results-preview h3 {
  font-size: 16px;
  margin: 16px 0 8px;
  color: #1a1a2e;
}

.results-preview h3:first-child {
  margin-top: 0;
}

.results-preview .question {
  font-weight: 600;
  color: #374151;
  margin-top: 12px;
}

.results-preview .answer {
  color: #4b5563;
  margin: 4px 0 12px;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.action-btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}

.action-btn.primary {
  background: #3b82f6;
  color: white;
}

.action-btn.primary:hover {
  background: #2563eb;
}

.action-btn.secondary {
  background: white;
  color: #374151;
  border: 2px solid #e5e7eb;
}

.action-btn.secondary:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.new-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
}

/* Landing */
.brand-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
}

.feature-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.feature-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 40px;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}

.feature-desc {
  font-size: 14px;
  color: #6b7280;
}

/* Back button */
.back-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #6b7280;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 16px;
  align-self: flex-start;
  display: block;
  text-align: left;
}

.back-btn:hover {
  color: #3b82f6;
}

/* Rename button */
.rename-btn {
  margin-top: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.rename-btn:hover {
  background: #e5e7eb;
}

/* Mobile adjustments — already mobile-first, just ensure no overflow */
@media (max-width: 480px) {
  .screen { padding: 16px; }
  h1 { font-size: 24px; }
  .record-btn { width: 100px; height: 100px; font-size: 40px; }
}
