/* ============================================================
   EVADAREA DIN HACKER'S LAIR — Stiluri globale (tema luminoasa)
   ============================================================ */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #c8d4e8;
  font-family: 'Courier New', monospace;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#game-container canvas {
  display: block;
  box-shadow: 0 4px 24px rgba(30, 60, 120, 0.25);
}

/* ============================================================
   PUZZLE OVERLAY
   ============================================================ */

#puzzle-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 50, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
}

#puzzle-overlay.hidden {
  display: none;
}

#puzzle-box {
  background: #ffffff;
  border: 2px solid #aabbd4;
  border-radius: 10px;
  width: 860px;
  max-height: 620px;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(20, 50, 120, 0.25);
}

#puzzle-box::-webkit-scrollbar { width: 6px; }
#puzzle-box::-webkit-scrollbar-track { background: #f0f4fb; }
#puzzle-box::-webkit-scrollbar-thumb { background: #aabbd4; border-radius: 3px; }

#puzzle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 2px solid #dde4f0;
  background: #f4f7fc;
  position: sticky;
  top: 0;
  border-radius: 8px 8px 0 0;
}

#puzzle-title {
  color: #1a3a8a;
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

#puzzle-close {
  background: none;
  border: 1px solid #c8d0e0;
  color: #778899;
  cursor: pointer;
  font-size: 15px;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  transition: all 0.15s;
}
#puzzle-close:hover { background: #ffe0e0; color: #cc2222; border-color: #cc2222; }

#puzzle-content {
  padding: 24px;
}

/* ============================================================
   ELEMENTE COMUNE PUZZLE
   ============================================================ */

.puzzle-desc {
  color: #2a3a5e;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.puzzle-btn {
  background: #e8f5ee;
  border: 2px solid #2a9a5a;
  color: #1a6a3a;
  font-family: monospace;
  font-size: 15px;
  font-weight: bold;
  padding: 11px 28px;
  cursor: pointer;
  border-radius: 6px;
  display: block;
  margin: 16px auto 0;
  transition: all 0.15s;
}
.puzzle-btn:hover {
  background: #c8eeda;
  box-shadow: 0 2px 8px rgba(42, 154, 90, 0.3);
}

.puzzle-feedback {
  margin-top: 14px;
  font-size: 14px;
  min-height: 26px;
  border-radius: 4px;
  padding: 4px 0;
}

.puzzle-fail    { color: #cc2222; }
.puzzle-correct { color: #1a7a3a; }

.puzzle-result.success {
  background: #eafaf2;
  border: 2px solid #2a9a5a;
  border-radius: 6px;
  padding: 16px;
  color: #1a5a32;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 14px;
}

/* ============================================================
   CAMERA 1 — Parole
   ============================================================ */

.password-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.password-btn {
  background: #f4f7fc;
  border: 2px solid #c0cce0;
  color: #1a2a4e;
  font-family: monospace;
  font-size: 15px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}
.password-btn:hover:not(:disabled) {
  background: #e4ecf8;
  border-color: #3366cc;
  color: #0a1a3e;
  box-shadow: 0 2px 8px rgba(50, 100, 200, 0.15);
}
.password-btn.wrong {
  background: #fff0f0;
  border-color: #cc4444;
  color: #aa2222;
  text-decoration: line-through;
}
.password-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ============================================================
   CAMERA 2 — Phishing Email
   ============================================================ */

.email-card {
  background: #f8f9fc;
  border: 2px solid #c0cce0;
  border-radius: 8px;
  overflow: hidden;
}

.email-from,
.email-subject {
  padding: 10px 16px;
  font-size: 14px;
  color: #445577;
  border-bottom: 1px solid #dde4f0;
  background: #f0f4fb;
}
.email-from strong,
.email-subject strong { color: #1a2a4e; }

.email-body {
  padding: 14px 16px;
  font-size: 14px;
  color: #2a3a5e;
  line-height: 1.8;
  max-height: 200px;
  overflow-y: auto;
  background: #ffffff;
}

.email-link {
  color: #cc2222;
  text-decoration: underline;
  background: rgba(204, 34, 34, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: bold;
}

.phishing-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 8px;
}

.phishing-btn {
  background: #f4f7fc;
  border: 2px solid #c0cce0;
  color: #1a2a4e;
  font-family: monospace;
  font-size: 14px;
  padding: 11px 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  text-align: center;
}
.phishing-btn:hover:not(:disabled) {
  background: #e4ecf8;
  border-color: #3366cc;
  color: #0a1a3e;
}
.phishing-btn.wrong {
  background: #fff0f0;
  border-color: #cc4444;
  color: #aa2222;
}
.phishing-btn.correct-btn {
  background: #eafaf2;
  border-color: #2a9a5a;
  color: #1a5a32;
}
.phishing-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ============================================================
   CAMERA 3 — Antivirus Quiz
   ============================================================ */

.cloud-progress {
  text-align: right;
  font-size: 13px;
  color: #6677aa;
  margin-bottom: 8px;
  font-weight: bold;
}

.progress-bar {
  height: 10px;
  background: #dde4f0;
  border-radius: 5px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1166dd, #00aa88);
  border-radius: 5px;
  transition: width 0.4s ease;
}

.cloud-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cloud-btn {
  background: #f4f7fc;
  border: 2px solid #c0cce0;
  color: #1a2a4e;
  font-family: monospace;
  font-size: 14px;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  transition: all 0.15s;
}
.cloud-btn:hover:not(:disabled) {
  background: #e4ecf8;
  border-color: #3366cc;
  color: #0a1a3e;
}
.cloud-btn.correct {
  background: #eafaf2;
  border-color: #2a9a5a;
  color: #1a5a32;
  font-weight: bold;
}
.cloud-btn.wrong {
  background: #fff0f0;
  border-color: #cc4444;
  color: #aa2222;
}
.cloud-btn:disabled { cursor: not-allowed; }

/* ============================================================
   CAMERA 4 — Algoritm Drag & Drop
   ============================================================ */

.algo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  user-select: none;
}

.algo-step {
  background: #f4f7fc;
  border: 2px solid #c0cce0;
  color: #1a2a4e;
  font-family: monospace;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.1s, border-color 0.1s;
}
.algo-step:hover { background: #e4ecf8; border-color: #5588cc; }
.algo-step.dragging {
  opacity: 0.55;
  cursor: grabbing;
  border: 2px dashed #3366cc;
}
.algo-step.correct {
  background: #eafaf2;
  border-color: #2a9a5a;
  color: #1a5a32;
  font-weight: bold;
}
.algo-step.wrong {
  background: #fff0f0;
  border-color: #cc4444;
  color: #aa2222;
}
.drag-handle {
  color: #8899bb;
  font-size: 20px;
  flex-shrink: 0;
}
