/* ═══════════════════════════════════════════
   panke.app Engine v2 — Component Styles
   Matches existing site aesthetic:
   - Dark: #0a0a0f bg, #e2e2ea text
   - Accent: #58a6ff blue, #3fb950 green, #f0c040 gold
   - Fonts: Playfair Display, Source Serif 4, JetBrains Mono
   ═══════════════════════════════════════════ */

/* ─── Terminal Simulator ─── */
.terminal-sim {
  border: 1px solid #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d14;
  margin: 16px 0;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #12121f;
  border-bottom: 1px solid #1a1a2e;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #2a2a3a;
}
.terminal-dots span:first-child { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #6b6b80;
}

.terminal-body {
  padding: 16px;
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.terminal-line { margin-bottom: 2px; white-space: pre-wrap; word-break: break-word; }
.terminal-system { color: #6b6b80; }
.terminal-input { color: #e2e2ea; }
.terminal-output { color: #c9d1d9; }
.terminal-error { color: #f85149; }
.terminal-highlight { color: #f0c040; font-weight: 700; }
.terminal-hint { color: #58a6ff; font-style: italic; }

.t-green { color: #3fb950; }
.t-yellow { color: #f0c040; }
.t-red { color: #f85149; }

.terminal-input-row {
  display: flex;
  align-items: center;
  padding: 8px 16px 12px;
  border-top: 1px solid #1a1a2e;
  background: #0a0a12;
}

.terminal-prompt {
  color: #3fb950;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  user-select: none;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e2e2ea;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  outline: none;
  caret-color: #3fb950;
}
.terminal-input::placeholder { color: #3a3a4a; }
.terminal-input:disabled { opacity: 0.5; cursor: not-allowed; }

.terminal-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px 12px;
  border-top: 1px solid #0f0f1a;
}

.suggestion-btn {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  color: #8b8ba0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.suggestion-btn:hover {
  background: #22223a;
  color: #58a6ff;
  border-color: #58a6ff;
}

.hint-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 12px;
  padding: 8px;
  background: transparent;
  border: 1px dashed #2a2a3e;
  color: #6b6b80;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}
.hint-btn:hover {
  border-color: #f0c040;
  color: #f0c040;
}

/* ─── Email Capture ─── */
.email-capture {
  background: linear-gradient(135deg, rgba(88,166,255,0.04), rgba(63,185,80,0.04));
  border: 1px solid #1a1a2e;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  text-align: center;
}

.email-heading {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  color: #e2e2ea;
  margin-bottom: 16px;
  font-weight: 600;
}

.email-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.email-input {
  flex: 1;
  padding: 10px 14px;
  background: #0d0d14;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  color: #e2e2ea;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.email-input:focus { border-color: #58a6ff; }
.email-input::placeholder { color: #3a3a4a; }
.email-input.shake {
  animation: shake 0.4s ease;
  border-color: #f85149;
}

.email-btn {
  padding: 10px 20px;
  background: #58a6ff;
  color: #0a0a0f;
  border: none;
  border-radius: 8px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.email-btn:hover { background: #79b8ff; transform: translateY(-1px); }

.email-note {
  font-size: 11px;
  color: #484f58;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
}

.email-saved {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #3fb950;
  text-align: center;
  padding: 16px;
}
.email-saved strong { color: #e2e2ea; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ─── Quiz Styles ─── */
.quiz-container { margin: 16px 0; }

.quiz-question {
  background: #0d0d14;
  border: 1px solid #1a1a2e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.quiz-question-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  color: #e2e2ea;
  margin-bottom: 14px;
  line-height: 1.5;
}

.quiz-question-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #58a6ff;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quiz-options { display: flex; flex-direction: column; gap: 8px; }

.quiz-option {
  padding: 12px 16px;
  background: #12121f;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  color: #c9d1d9;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.quiz-option:hover:not(.quiz-answered) {
  border-color: #58a6ff;
  background: #161628;
  color: #e2e2ea;
}
.quiz-option.correct {
  border-color: #3fb950;
  background: rgba(63,185,80,0.08);
  color: #3fb950;
}
.quiz-option.incorrect {
  border-color: #f85149;
  background: rgba(248,81,73,0.08);
  color: #f85149;
}
.quiz-option.quiz-answered { cursor: default; }

.quiz-explanation {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(88,166,255,0.06);
  border-left: 3px solid #58a6ff;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #8b8ba0;
  line-height: 1.5;
  display: none;
}
.quiz-explanation.visible { display: block; }

.quiz-result {
  text-align: center;
  padding: 20px;
  margin-top: 16px;
  border: 1px solid #1a1a2e;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(63,185,80,0.04), rgba(240,192,64,0.04));
}
.quiz-result-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  color: #e2e2ea;
  margin-bottom: 6px;
}
.quiz-result-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #f0c040;
  font-weight: 700;
}
.quiz-result-rewards {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #3fb950;
  margin-top: 8px;
}

/* ─── 404 Page ─── */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
  padding: 24px;
}

.page-404-content {
  text-align: center;
  max-width: 520px;
}

.page-404-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(72px, 15vw, 120px);
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1;
  margin-bottom: 16px;
  user-select: none;
}

.page-404-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 4vw, 32px);
  color: #e2e2ea;
  margin-bottom: 12px;
}

.page-404-text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  color: #6b6b80;
  line-height: 1.6;
  margin-bottom: 32px;
}

.page-404-terminal {
  background: #0d0d14;
  border: 1px solid #1a1a2e;
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  margin-bottom: 32px;
}

.page-404-terminal code {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #6b6b80;
  line-height: 1.8;
}
.page-404-terminal code .cmd { color: #3fb950; }
.page-404-terminal code .err { color: #f85149; }
.page-404-terminal code .fix { color: #58a6ff; }

.page-404-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.page-404-link {
  padding: 10px 20px;
  border: 1px solid #1a1a2e;
  border-radius: 8px;
  color: #8b8ba0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}
.page-404-link:hover {
  border-color: #58a6ff;
  color: #58a6ff;
  background: rgba(88,166,255,0.04);
}
.page-404-link.primary {
  background: #58a6ff;
  color: #0a0a0f;
  border-color: #58a6ff;
  font-weight: 600;
}
.page-404-link.primary:hover {
  background: #79b8ff;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .terminal-body { min-height: 220px; max-height: 320px; font-size: 12px; }
  .terminal-suggestions { padding: 6px 12px 10px; }
  .suggestion-btn { font-size: 10px; padding: 3px 8px; }
  .email-form { flex-direction: column; }
  .email-btn { width: 100%; }
  .quiz-option { padding: 10px 14px; font-size: 13px; }
  .page-404-links { flex-direction: column; }
}
