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

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a27;
  --border: #2a2a3a;
  --text: #e4e4ef;
  --text-dim: #8888a0;
  --accent: #ffdd2d;
  --accent2: #fbbf24;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
}

.logo h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.badge {
  background: var(--accent);
  color: #1a1a27;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 0;
}

.hero h2 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2), #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-send, .btn-voice, .btn-voice-stop {
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a1a27;
  padding: 14px 28px;
  font-size: 16px;
  margin: 0 8px;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 221, 45, 0.25); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  padding: 14px 28px;
  font-size: 16px;
  border: 1px solid var(--border);
  margin: 0 8px;
}

.btn-secondary:hover { border-color: var(--accent); }

/* Prompts */
.prompts-section {
  margin: 40px 0;
}

.prompts-section h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.prompts-intro {
  color: var(--text-dim);
  margin-bottom: 24px;
  font-size: 14px;
}

.prompt-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.prompt-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.prompt-header.system { background: rgba(255, 221, 45, 0.08); }
.prompt-header.evaluation { background: rgba(34, 197, 94, 0.08); }
.prompt-header.decision { background: rgba(245, 158, 11, 0.08); }

.prompt-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.system .prompt-tag { background: var(--accent); color: #1a1a27; }
.evaluation .prompt-tag { background: var(--green); color: #1a1a27; }
.decision .prompt-tag { background: var(--orange); color: #1a1a27; }

.prompt-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.prompt-content {
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}

/* Chat */
.chat-section {
  margin: 40px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

/* Video header — interviewer card */
.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #0d0d14, #141422);
  border-bottom: 1px solid var(--border);
}

.video-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.video-avatar-wrap {
  position: relative;
}

.video-avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px rgba(255, 221, 45, 0.15);
}

.video-live-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--red);
  color: white;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.video-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.video-title {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.video-company {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
}

.t-badge {
  background: var(--accent);
  color: #1a1a27;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.video-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.video-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.round-indicator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.chat-messages {
  padding: 20px;
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.message.interviewer .message-avatar {
  background: rgba(255, 221, 45, 0.15);
}

.message.candidate .message-avatar {
  background: var(--surface2);
  border: 1px solid var(--border);
}

.message-body {
  flex: 1;
}

.message-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dim);
}

.message-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

.message.interviewer .message-name { color: var(--accent); }

/* Typing indicator */
.typing {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.typing span {
  width: 6px;
  height: 6px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: bounce 1.4s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Input */
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  align-items: flex-end;
}

#user-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}

#user-input:focus { border-color: var(--accent); }

.btn-send {
  background: var(--accent);
  color: #1a1a27;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  min-width: 44px;
}

.btn-send:hover { background: var(--accent2); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Voice button */
.btn-voice {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  font-size: 18px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-voice:hover { border-color: var(--accent); background: var(--surface2); }

.btn-voice.recording {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--red);
  animation: pulse-red 1.5s infinite;
}

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

/* Voice status */
.voice-status {
  padding: 10px 20px;
  background: rgba(239, 68, 68, 0.08);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
}

.voice-recording {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--red);
}

.rec-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1s infinite;
}

.btn-voice-stop {
  background: var(--red);
  color: white;
  padding: 6px 14px;
  font-size: 12px;
  margin-left: auto;
}

.chat-actions {
  padding: 16px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Results */
.results-section {
  margin: 40px 0;
}

.results-section h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
}

.decision-card {
  border-color: var(--accent);
  background: rgba(255, 221, 45, 0.03);
}

.result-actions {
  text-align: center;
  margin: 32px 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 0 20px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

footer p { font-size: 13px; color: var(--text-dim); }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.disclaimer { font-size: 11px; margin-top: 4px; opacity: 0.6; }

/* Loading spinner */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  flex-direction: column;
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-size: 14px;
  color: var(--text-dim);
}

/* Mobile */
@media (max-width: 640px) {
  .hero h2 { font-size: 28px; }
  .hero { padding: 40px 0; }
  .btn-primary, .btn-secondary { display: block; width: 100%; margin: 8px 0; }
  .chat-messages { max-height: 400px; }
}
