/* =========================================================================
   SIMULADOR EDUCATIVO DE PHISHING - CSS
   ========================================================================= */

/* Contenedor Hacker Exterior (Estética Neon / Cyberpunk) */
.simulador-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1000px;
  margin: 3rem auto 5rem auto;
  padding: 0 1rem;
}

.simulador-header-cyber {
  margin-bottom: 2rem;
  color: var(--neon-cyan, #0ff);
  font-family: 'JetBrains Mono', monospace;
  text-align: left;
}

.simulador-header-cyber h2 {
  font-size: 1.4rem;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.simulador-header-cyber p {
  color: #aaa;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* =========================================================================
   UI DE CLIENTE DE CORREO INTERNO (Estilo Outlook / Gmail Realista)
   ========================================================================= */
.simulador-root {
  /* Scope CSS variables para el entorno de correo claro */
  --email-bg: #f3f2f1;
  --email-surface: #ffffff;
  --email-hover: #e1dfdd;
  
  --email-primary: #0f6cbd; /* Outlook blue */
  --email-primary-hover: #0c5697;
  --email-danger: #d13438;
  --email-danger-hover: #a82428;
  --email-success: #107c10;
  --email-success-hover: #0b5a0b;
  
  --email-text-main: #242424;
  --email-text-muted: #605e5c;
  
  --email-font: 'Inter', system-ui, -apple-system, sans-serif;

  background-color: var(--email-bg);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
  overflow: hidden;
  font-family: var(--email-font);
  color: var(--email-text-main);
  position: relative;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.simulador-root * {
  box-sizing: border-box;
}

/* Modal de Consentimiento */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background-color: var(--email-surface);
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  animation: slideUpFade 0.4s ease-out forwards;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--email-hover);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--email-text-main);
  margin: 0;
}

.modal-body {
  padding: 1.5rem;
  color: var(--email-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-body p { margin: 0; }

.modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* Dark Matrix Theme for Agent Modal */
.modal-dark {
  background-color: rgba(0, 0, 0, 0.95);
}

.modal-content-dark {
  background-color: #0d0d0d;
  border: 1px solid var(--neon-cyan, #0ff);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.15), 0 10px 40px rgba(0, 0, 0, 0.5);
  max-width: 480px;
}

.modal-header-dark {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.08), transparent);
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.modal-header-dark h2 {
  color: #ffffff;
  font-family: 'Fira Code', monospace;
  font-size: 1.1rem;
}

.modal-body-dark {
  color: #aaa;
}

.modal-body-dark p {
  color: #999;
}

/* Grid del App */
#app-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hidden {
  display: none !important;
}

/* Header de la Aplicación Falsa */
.app-header {
  background-color: var(--email-surface);
  border-bottom: 1px solid var(--email-hover);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--email-primary);
}

.app-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--email-text-main);
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--email-text-muted);
}

.score-counter strong {
  color: var(--email-primary);
  font-size: 1.05rem;
}

/* Layout del Simulador (Donde va el correo) */
.simulator-layout {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem;
}

.email-card {
  background-color: var(--email-surface);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
  width: 100%;
  max-width: 800px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.email-content-wrapper {
  padding: 2rem 2.5rem;
  transition: filter 0.3s ease;
}

.email-content-wrapper.dimmed {
  filter: blur(2px) grayscale(50%) brightness(0.9);
  pointer-events: none;
}

/* Fila de Avatares y Meta */
.email-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--email-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
}

.sender-info {
  display: flex;
  flex-direction: column;
}

.visible-sender {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--email-text-main);
  line-height: 1.2;
}

.real-sender {
  color: var(--email-text-muted);
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

.meta-date {
  font-size: 0.8rem;
  color: var(--email-text-muted);
  margin-top: 0.25rem;
}

/* Asunto y Cuerpo (Mensaje) */
.email-subject {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--email-text-main);
  margin: 0 0 1.5rem 0;
  border-bottom: 1px solid var(--email-hover);
  padding-bottom: 1rem;
}

.email-body {
  font-size: 1rem;
  color: var(--email-text-main);
  min-height: 120px;
  line-height: 1.5;
}

.email-body p {
  margin-bottom: 1rem;
}

/* Estilos de phishing en el cuerpo del correo de simulador.js */
.fake-btn, .fake-btn-neutral {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 500;
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 0.5rem;
  cursor: default;
  border: none;
}
.fake-btn {
  background-color: var(--email-primary);
  color: white;
}
.fake-btn-neutral {
  background-color: #e1dfdd;
  color: #323130;
}
.fake-link {
  color: var(--email-primary);
  text-decoration: underline;
  cursor: default;
}
.fake-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.85rem;
  background-color: #f8f9fa;
  color: var(--email-text-main);
}

/* =========================================================================
   PANEL DE ACCIONES (El usuario responde los escenarios aquí)
   ========================================================================= */
.action-panel {
  background-color: var(--email-surface);
  border-top: 2px dashed #ccc;
  /* Eliminado position: relative y overflow: hidden para que el drawer flote sobre la tarjeta completa */
}

.action-panel-instructions {
  text-align: center;
  padding: 1rem 1rem 0 1rem;
  font-size: 0.9rem;
  color: var(--email-text-muted);
}

.decision-buttons {
  display: flex;
  padding: 1.5rem 2.5rem;
  gap: 1rem;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.decision-buttons.fade-out {
  opacity: 0;
  pointer-events: none;
}

.btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  border: none;
  transition: all 0.2s ease;
}

.btn-large {
  flex: 1;
}

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

.btn-danger {
  background-color: #fdf3f4;
  color: var(--email-danger);
  border: 1px solid var(--email-danger);
}
.btn-danger:hover {
  background-color: var(--email-danger);
  color: white;
}

.btn-success {
  background-color: #f3fcf3;
  color: var(--email-success);
  border: 1px solid var(--email-success);
}
.btn-success:hover {
  background-color: var(--email-success);
  color: white;
}

/* =========================================================================
   CAJON DE RETROALIMENTACIÓN (GOOD/BAD FEEDBACK)
   ========================================================================= */
.feedback-drawer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--email-surface);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
  padding: 1.5rem 2.5rem;
  z-index: 50;
}

.feedback-drawer.active {
  transform: translateY(0);
}

.feedback-drawer.correct {
  border-top: 6px solid var(--email-success);
}
.feedback-drawer.incorrect {
  border-top: 6px solid var(--email-danger);
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.feedback-result {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.correct .feedback-result { color: var(--email-success); }
.correct .feedback-icon { color: var(--email-success); }
.incorrect .feedback-result { color: var(--email-danger); }
.incorrect .feedback-icon { color: var(--email-danger); }

.feedback-content {
  flex-grow: 1;
}

.feedback-content h4 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  color: var(--email-text-main);
}

.feedback-content p {
  color: var(--email-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.feedback-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* RESALTADO FORENSE (RED FLAGS EN EL CORREO) */
.highlight-red-flag {
  position: relative;
  z-index: 10;
  outline: 3px solid var(--email-danger);
  background-color: rgba(209, 52, 56, 0.15);
  border-radius: 2px;
  animation: pulse 1.5s infinite;
  display: inline-block;
  padding: 0 0.2rem;
  font-weight: bold;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(209, 52, 56, 0.7); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(209, 52, 56, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(209, 52, 56, 0); }
}

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

/* =========================================================================
   PANTALLA DE RESULTADOS FINALES (Módulo 5) — Fullscreen Dark
   ========================================================================= */
.results-layout {
  flex: 1;
  display: flex;
  padding: 0;
}

.results-fullscreen {
  background-color: #0d0d0d;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  animation: slideUpFade 0.4s ease-out;
}

.results-header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.05), transparent);
}

.results-header-bar h2 {
  font-family: var(--font-mono, 'Fira Code', monospace);
}

.analytics-dashboard-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.master-carousel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.master-slide-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem 1.5rem;
}

.master-slide {
  animation: fadeSlideIn 0.3s ease-out;
}

.master-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid #222;
  background: #0a0a0a;
}

.master-slide-title {
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 1.1rem;
  color: var(--neon-cyan, #0ff);
  margin: 0 0 0.8rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.metric-display-compact {
  border-left: 3px solid var(--neon-cyan, #0ff);
  padding: 0.8rem 1rem;
  background: #111;
  border-radius: 0 6px 6px 0;
  border-top: 1px solid #222;
  border-right: 1px solid #222;
  border-bottom: 1px solid #222;
}

.final-metric-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.global-benchmarks-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.bench-card-compact {
  background: #111;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  border: 1px solid #2a2a2a;
}

.bench-card-compact h4 {
  color: var(--neon-cyan, #0ff);
  font-family: var(--font-mono, 'Fira Code', monospace);
  margin: 0 0 0.4rem 0;
  font-size: 0.8rem;
}

.bench-card-compact p {
  font-size: 0.85rem;
  color: #ddd;
  margin: 0;
}

/* =========================================================================
   RANKING GLOBAL
   ========================================================================= */

.ranking-section {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
}

.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #2a2a2a;
  background: #0d0d0d;
}

.ranking-header h3 {
  color: var(--neon-cyan, #0ff);
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 0.85rem;
  margin: 0;
}

.ranking-position {
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 0.75rem;
  color: #888;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 0.78rem;
}

.ranking-table th {
  padding: 0.4rem 0.8rem;
  text-align: left;
  color: #666;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #222;
  background: #0a0a0a;
}

.ranking-table td {
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid #1a1a1a;
  color: #ccc;
}

.ranking-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ranking-table tr.rank-current-user {
  background: rgba(0, 255, 255, 0.08);
  border-left: 2px solid var(--neon-cyan, #0ff);
}

.ranking-table tr.rank-current-user td {
  color: #fff;
  font-weight: 600;
}

.ranking-table .rank-number {
  font-weight: 700;
  min-width: 30px;
  text-align: center;
}

.ranking-table .rank-1 { color: #ffd700; }
.ranking-table .rank-2 { color: #c0c0c0; }
.ranking-table .rank-3 { color: #cd7f32; }

.ranking-separator {
  text-align: center;
  padding: 0.3rem;
  color: #555;
  font-size: 0.7rem;
  border-bottom: 1px solid #1a1a1a;
}

/* Eslabón Débil (compacto) */
.analysis-display-compact {
  background: #1a0808;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  border: 1px dashed rgba(255, 50, 50, 0.4);
  text-align: left;
}

.analysis-display-compact h4 {
  font-size: 0.9rem;
  color: #fff;
  margin: 0 0 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono, 'Fira Code', monospace);
}

.analysis-display-compact p {
  color: #ccc;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

.results-footer-bar {
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: center;
  border-top: 1px solid #222;
  background: #0a0a0a;
}

/* Responsivo */
@media (max-width: 768px) {
  .decision-buttons {
    flex-direction: column;
    padding: 1rem 1.5rem;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* =========================================================================
   MODO FORENSE (VER MÁS A DETALLE)
   ========================================================================= */

/* Contenedor principal del toolkit que superpone al email */
.forensics-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Dejar pasar clics al inicio */
  z-index: 100;
  opacity: 0; /* Ocultar por defecto para animacion fade */
  transition: opacity 0.4s ease;
}

/* Cuando el modo Forense esta activo, oscurecer mas y atrapar clics */
.forensics-overlay.active {
  pointer-events: auto;
  opacity: 1;
  background: rgba(0, 0, 0, 0.4);
  /* El backdrop-filter a veces no funciona si hay contenedores complejos, usaremos un truco en el DOM o lo dejamos sutil */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* En lugar de aplicar blur al wrapper que crea un stacking context, solo lo opacamos para que las red flags puedan flotar */
.email-content-wrapper.forensics-active {
  pointer-events: none; /* No clics nativos */
  opacity: 0.5;
}

/* Modificar el resaltado cuando estamos en modo forense intensivo */
.highlight-red-flag.forensic-focus {
  z-index: 110 !important;
  position: relative; /* Asegurar stacking context */
  outline: 3px solid var(--neon-cyan);
  background-color: var(--email-surface); /* Hacer el fondo solido para tapar el blur detras */
  color: var(--email-text-main) !important;
  box-shadow: 0 0 15px var(--neon-cyan);
  animation: none;
  cursor: pointer;
  transition: all 0.3s ease;
  /* Override del opacity del padre */
  opacity: 1 !important;
}

.highlight-red-flag.forensic-focus:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px var(--neon-cyan);
}

/* Tooltip Inteligente Flotante */
.forensic-tooltip {
  position: absolute;
  background: var(--email-surface);
  border: 1px solid var(--neon-cyan);
  color: var(--email-text-main);
  padding: 1rem;
  border-radius: 8px;
  width: 280px;
  box-shadow: 0 10px 30px rgba(0, 255, 204, 0.2);
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
  pointer-events: none;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.forensic-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.forensic-tooltip::before {
  content: "ANÁLISIS FORENSE //";
  display: block;
  color: var(--neon-cyan);
  font-size: 0.7rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  letter-spacing: 1px;
}

/* Botón flotante para salir del modo forense */
.btn-close-forensics {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--email-danger);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  cursor: pointer;
  z-index: 130;
  box-shadow: 0 4px 10px rgba(209, 52, 56, 0.4);
}

.btn-close-forensics:hover {
  background: #b02a2e;
}

/* =========================================================================
   DESGLOSE POR ESCENARIO — Carousel Navigation
   ========================================================================= */

.scenario-carousel-section {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.scenario-carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #2a2a2a;
  background: #0d0d0d;
}

.scenario-carousel-header h3 {
  color: var(--neon-cyan, #0ff);
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 0.85rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.scenario-carousel-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.carousel-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 255, 0.3);
  background: transparent;
  color: var(--neon-cyan, #0ff);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: system-ui;
  line-height: 1;
  padding: 0;
}

.carousel-arrow:hover {
  background: rgba(0, 255, 255, 0.15);
  border-color: var(--neon-cyan, #0ff);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.scenario-counter {
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 0.75rem;
  color: #888;
  min-width: 50px;
  text-align: center;
}

.scenario-carousel-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.scenario-card {
  padding: 1rem 1.2rem;
  animation: fadeSlideIn 0.3s ease-out;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.scenario-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.scenario-card-title {
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.scenario-card-title .scenario-type {
  display: inline-block;
  font-size: 0.68rem;
  color: #999;
  background: #1a1a1a;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 0.5rem;
  font-weight: 400;
  vertical-align: middle;
}

.scenario-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.scenario-badge.correct {
  background: rgba(16, 124, 16, 0.15);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.scenario-badge.incorrect {
  background: rgba(209, 52, 56, 0.15);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.scenario-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

@media (max-width: 500px) {
  .scenario-card-metrics {
    grid-template-columns: 1fr;
  }
  .global-benchmarks-compact {
    grid-template-columns: 1fr;
  }
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.metric-item .metric-label {
  font-size: 0.68rem;
  color: #888;
  font-family: var(--font-mono, 'Fira Code', monospace);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-item .metric-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #ccc;
  font-family: var(--font-mono, 'Fira Code', monospace);
  margin-bottom: 2px;
}

/* Bar chart container */
.bar-chart {
  position: relative;
  height: 20px;
  background: #1a1a1a;
  border-radius: 4px;
  overflow: hidden;
}

.bar-chart .bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  min-width: 2px;
}

.bar-chart .bar-user {
  background: linear-gradient(90deg, #00bcd4, #00e5ff);
  z-index: 2;
  opacity: 0.9;
}

.bar-chart .bar-global {
  background: rgba(255, 255, 255, 0.12);
  border-right: 2px dashed rgba(255, 255, 255, 0.3);
  z-index: 1;
}

.bar-chart .bar-label {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.62rem;
  font-family: var(--font-mono, 'Fira Code', monospace);
  color: rgba(255, 255, 255, 0.6);
  z-index: 3;
  pointer-events: none;
}

/* Success rate bar variant */
.bar-chart .bar-success {
  background: linear-gradient(90deg, #4caf50, #66bb6a);
  z-index: 2;
  opacity: 0.85;
}

.scenario-card-footer {
  margin-top: 0.6rem;
  padding-top: 0.4rem;
  border-top: 1px solid #1a1a1a;
  font-size: 0.7rem;
  color: #666;
  font-family: var(--font-mono, 'Fira Code', monospace);
  display: flex;
  justify-content: space-between;
}
