* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

.app-header,
.app-footer {
  text-align: center;
  padding: 24px 16px;
  background: #0b1120;
  border-bottom: 1px solid #1e293b;
}

.app-footer {
  border-top: 1px solid #1e293b;
  border-bottom: none;
  margin-top: 24px;
}

.subtle {
  color: #94a3b8;
  margin-top: 6px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 16px;
}

.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.instructions ol {
  padding-left: 18px;
}

.note {
  color: #cbd5f5;
  font-size: 0.95rem;
}

.note.small {
  font-size: 0.85rem;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.question-text {
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 12px 0 18px;
  min-height: 64px;
}

.ai-voice {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.toggle input {
  width: 16px;
  height: 16px;
}

.badge {
  background: #1d4ed8;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.btn {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #334155;
  color: #e2e8f0;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}

.btn:hover:enabled {
  transform: translateY(-1px);
  background: #475569;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: #16a34a;
}

.btn.primary:hover:enabled {
  background: #15803d;
}

.btn.secondary {
  background: #1f2937;
  border: 1px solid #334155;
}

.btn.danger {
  background: #dc2626;
}

.btn.danger:hover:enabled {
  background: #b91c1c;
}

.btn.ghost {
  background: transparent;
  border: 1px dashed #475569;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.status {
  background: #0f172a;
  border: 1px solid #1e293b;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.timer {
  font-weight: 600;
  color: #f8fafc;
}

.transcript {
  margin-top: 12px;
  border: 1px solid #1f2937;
  border-radius: 10px;
  background: #0b1120;
  overflow: hidden;
}

.transcript-header {
  padding: 8px 12px;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  font-weight: 600;
}

.transcript-log {
  max-height: 220px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.transcript-line {
  margin-bottom: 8px;
  line-height: 1.4;
}

.transcript-line span {
  color: #93c5fd;
  font-weight: 600;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
}

.ai-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #60a5fa, #1e3a8a);
  position: relative;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-face {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #f8fafc;
  position: relative;
}

.avatar-mouth {
  width: 36px;
  height: 10px;
  border-radius: 999px;
  background: #1f2937;
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.1s ease, height 0.1s ease;
}

.ai-avatar.speaking .avatar-mouth {
  height: 22px;
  transform: translateX(-50%) scaleY(1.1);
}

video {
  width: 100%;
  border-radius: 10px;
  background: #0b1120;
  min-height: 220px;
}

.error {
  color: #fca5a5;
  min-height: 20px;
}
