/* Voice+AI-Spike Styles */

:root {
  --primary: #2563eb;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-light);
  font-size: 0.9rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

/* Context Display */
.context-display {
  background: var(--bg);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
}

/* Testkorpus */
.hint {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.corpus-list {
  list-style: none;
}

.corpus-category {
  font-weight: 600;
  color: var(--primary);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.corpus-list li {
  padding: 0.75rem;
  background: var(--bg);
  border-left: 3px solid var(--primary);
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.expected-result {
  display: block;
  color: var(--text-light);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  font-style: italic;
}

/* Recording Controls */
.recording-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:not(:disabled):hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.btn-primary:not(:disabled):active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--error);
  color: white;
}

.btn-secondary:not(:disabled):hover {
  background: #dc2626;
}

.icon {
  font-size: 1.2rem;
}

/* Auth-Sektion */
.auth-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  color: white;
  box-shadow: var(--shadow);
}

.auth-section h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.auth-section .hint {
  margin: 0.5rem 0 1rem 0;
  opacity: 0.9;
}

.auth-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.token-input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.token-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.token-input:focus {
  outline: none;
  border-color: white;
  background: rgba(255, 255, 255, 0.2);
}

.auth-info {
  margin: 1rem 0 0 0;
  font-size: 0.85rem;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.75rem;
  border-radius: 4px;
}

/* Status-Nachrichten */
.status-message {
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.status-message.recording {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.status-message.processing {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.status-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.status-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.status-message.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

/* Results */
.stt-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stt-result {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.provider-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.provider-badge.openai {
  background: #10b981;
  color: white;
}

.provider-badge.deepgram {
  background: #8b5cf6;
  color: white;
}

.result-content {
  margin-top: 1rem;
}

.transcript {
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
}

.latency {
  font-size: 0.85rem;
  color: var(--text-light);
}

.loading {
  color: var(--text-light);
  font-style: italic;
}

.error {
  color: var(--error);
  padding: 0.75rem;
  background: #fee2e2;
  border-radius: var(--radius);
}

/* Interpretation Results */
.interpretation-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.interpretation-result {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.command-json {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.validation-status {
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.validation-status.valid {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.validation-status.needs_clarification {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.validation-status.invalid {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.validation-details {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.validation-details pre {
  background: var(--bg);
  padding: 0.5rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
}

.envelope-details {
  background: var(--bg);
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
  }
  
  .stt-comparison,
  .interpretation-results {
    grid-template-columns: 1fr;
  }
  
  .recording-controls {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}
