/* ==========================================================================
   TELA AZUL (BSOD / FORCA DE TI) — DESIGN SYSTEM RETRÔ CIBERNÉTICO
   ========================================================================== */

:root {
  --bsod-bg: #060a12;
  --bsod-surface: #0f172a;
  --bsod-surface-soft: #1e293b;
  --bsod-blue: #0284c7;
  --bsod-blue-deep: #004785;
  --bsod-accent: #38bdf8;
  --bsod-glow: rgba(56, 189, 248, 0.35);
  --bsod-success: #10b981;
  --bsod-danger: #ef4444;
  --bsod-warning: #f59e0b;
  --bsod-text: #f8fafc;
  --bsod-text-muted: #94a3b8;
  --bsod-line: rgba(255, 255, 255, 0.12);
  --bsod-terminal-green: #4ade80;
}

body.bsod-app-body {
  background-color: var(--bsod-bg);
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(2, 132, 199, 0.1) 0%, transparent 60%),
    linear-gradient(to bottom, #050811, #0b1120);
  color: var(--bsod-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.bsod-container {
  max-width: 1180px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 1.25rem 1rem 3.5rem 1rem;
}

/* Header */
.bsod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--bsod-line);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.bsod-logo-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bsod-logo-icon {
  font-size: 1.8rem;
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 0.4rem 0.65rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
}

.bsod-logo-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.bsod-logo-text p {
  font-size: 0.78rem;
  color: var(--bsod-text-muted);
  margin: 0.15rem 0 0 0;
}

.bsod-top-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bsod-nav-btn {
  background: var(--bsod-surface);
  border: 1px solid var(--bsod-line);
  color: var(--bsod-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.bsod-nav-btn:hover {
  background: var(--bsod-surface-soft);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Painel de Configuração (Setup) */
.bsod-card {
  background: var(--bsod-surface);
  border: 1.5px solid var(--bsod-line);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}

.bsod-section-title {
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bsod-accent);
  margin: 1.5rem 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bsod-section-title:first-child {
  margin-top: 0;
}

.bsod-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.bsod-opt-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid var(--bsod-line);
  border-radius: 10px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bsod-opt-card:hover {
  background: var(--bsod-surface-soft);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.bsod-opt-card.selected {
  background: rgba(2, 132, 199, 0.15);
  border-color: var(--bsod-accent);
  box-shadow: 0 0 15px var(--bsod-glow);
}

.bsod-opt-card strong {
  color: #ffffff;
  font-size: 0.88rem;
  display: block;
  margin-bottom: 0.25rem;
}

.bsod-opt-card span {
  font-size: 0.75rem;
  color: var(--bsod-text-muted);
  line-height: 1.3;
}

.btn-start-bsod {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 2rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-start-bsod:hover {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.6);
  transform: translateY(-2px);
}

/* ==========================================================================
   ARENA DO JOGO & TERMINAL DE DIAGNÓSTICO
   ========================================================================== */
.bsod-arena-card {
  background: #080e1a;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(2, 132, 199, 0.05);
  position: relative;
  overflow: hidden;
}

/* Barra de Status */
.bsod-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.bsod-pill {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--bsod-line);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Monitor de Diagnóstico de Hardware */
.bsod-terminal-screen {
  background: #030712;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
  position: relative;
  font-family: 'Consolas', 'Courier New', monospace;
}

.bsod-diag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  padding-bottom: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
  color: var(--bsod-text-muted);
}

.bsod-health-meter {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.health-block {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.health-block.active-safe {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.health-block.active-warn {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.health-block.active-danger {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: pulseDanger 0.4s infinite alternate;
}

.bsod-log-text {
  font-size: 0.82rem;
  color: var(--bsod-terminal-green);
  line-height: 1.4;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bsod-log-text.warning {
  color: #fbbf24;
}

.bsod-log-text.critical {
  color: #f87171;
}

/* Área de Letras da Palavra Secreta */
.bsod-word-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  min-height: 55px;
}

.bsod-letter-slot {
  width: 44px;
  height: 54px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 3.5px solid var(--bsod-accent);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  transition: all 0.2s ease;
  user-select: none;
}

.bsod-letter-slot.revealed {
  background: rgba(56, 189, 248, 0.15);
  border-bottom-color: #38bdf8;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bsod-letter-slot.space {
  width: 20px;
  border-bottom: none;
  background: transparent;
}

/* ==========================================================================
   CARD DA PERGUNTA / ENIGMA CONCEITUAL (DESTAQUE MÁXIMO)
   ========================================================================== */
.bsod-hint-box {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(56, 189, 248, 0.08);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.bsod-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.6rem;
}

.bsod-question-label {
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #facc15;
  text-transform: uppercase;
}

.bsod-cat-tag {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bsod-question-body {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.55;
  color: #ffffff;
  margin-bottom: 0.65rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.bsod-question-footer {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Teclado Virtual */
.bsod-keyboard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.key-btn {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Consolas', monospace;
  height: 44px;
  min-width: 40px;
  padding: 0 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.key-btn:hover:not(:disabled) {
  background: var(--bsod-blue);
  border-color: var(--bsod-accent);
  box-shadow: 0 0 10px var(--bsod-glow);
  transform: translateY(-2px);
}

.key-btn.hit {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #4ade80 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.key-btn.miss {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #64748b !important;
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================================================
   TELA AZUL CLÁSSICA DA MORTE (BSOD CRASH SCREEN OFICIAL)
   ========================================================================== */
.bsod-crash-screen {
  background: #0078d7 !important;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
    linear-gradient(135deg, #0078d7 0%, #005a9e 100%) !important;
  color: #ffffff !important;
  border-radius: 16px !important;
  padding: 3rem 2.5rem !important;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
  box-shadow: 0 0 60px rgba(0, 120, 215, 0.9), inset 0 0 30px rgba(0, 0, 0, 0.2) !important;
  border: 2px solid rgba(255, 255, 255, 0.25) !important;
  animation: bsodGlitchIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative;
  overflow: hidden;
}

.bsod-crash-inner {
  max-width: 840px;
  margin: 0 auto;
  text-align: left;
}

.bsod-sad-emoticon {
  font-size: 6rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 1.25rem;
  color: #ffffff;
  letter-spacing: -2px;
  user-select: none;
}

.bsod-crash-main-title {
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 1.25rem 0;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.bsod-crash-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 2rem 0;
  color: #e0f2fe;
}

.bsod-diagnostic-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.bsod-qr-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-bsod-reboot {
  background: #ffffff !important;
  color: #0078d7 !important;
  border: none !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  padding: 0.9rem 2.2rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35) !important;
}

.btn-bsod-reboot:hover {
  background: #f0f9ff !important;
  color: #005a9e !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45) !important;
}

.btn-bsod-reboot:active {
  transform: scale(0.98) !important;
}

@keyframes bsodGlitchIn {
  0% { transform: scale(0.96); opacity: 0.5; filter: brightness(2) contrast(1.5); }
  50% { transform: scale(1.01); filter: contrast(1.2); }
  100% { transform: scale(1); opacity: 1; filter: none; }
}

/* Tela de Vitória */
.bsod-victory-box {
  background: linear-gradient(135deg, #064e3b, #0f172a);
  border: 2px solid #10b981;
  border-radius: 14px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
  animation: fadeIn 0.3s ease;
}

/* Animações */
@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes glitchIn {
  0% { transform: scale(0.98); opacity: 0.8; filter: brightness(1.8); }
  50% { transform: scale(1.01); filter: contrast(1.4); }
  100% { transform: scale(1); opacity: 1; filter: none; }
}

@keyframes pulseDanger {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

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

@media (max-width: 600px) {
  .bsod-letter-slot {
    width: 32px;
    height: 42px;
    font-size: 1.3rem;
  }
  .key-btn {
    min-width: 28px;
    height: 38px;
    font-size: 0.82rem;
  }
}
