/* ============================================================
   Phoenix Nest METS — Skills Baseline Assessment Styles
   Dark industrial theme matching existing METS PWA
   ============================================================ */

/* ----------------------------------------------------------
   LAYOUT & SCREENS
   ---------------------------------------------------------- */

.bl-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  min-height: 80vh;
  color: #e0e0e0;
}

.bl-header {
  text-align: center;
  margin-bottom: 24px;
}

.bl-header h2 {
  color: #f5a623;
  margin: 8px 0 4px;
  font-size: 24px;
}

.bl-icon-large {
  font-size: 48px;
  margin: 16px 0 8px;
}

.bl-subtitle {
  color: #999;
  font-size: 14px;
  margin: 4px 0 16px;
}

/* ----------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------- */

.bl-btn {
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 48px;
  min-width: 120px;
  transition: transform 0.1s, opacity 0.1s;
}

.bl-btn:active {
  transform: scale(0.96);
  opacity: 0.85;
}

.bl-btn-primary {
  background: #f5a623;
  color: #1a1a1a;
}

.bl-btn-secondary {
  background: #333;
  color: #e0e0e0;
  border: 1px solid #555;
}

/* ----------------------------------------------------------
   PROGRESS BAR
   ---------------------------------------------------------- */

.bl-progress-bar {
  width: 100%;
  max-width: 400px;
  height: 6px;
  background: #333;
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.bl-progress-fill {
  height: 100%;
  background: #f5a623;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ----------------------------------------------------------
   INTRO SCREEN
   ---------------------------------------------------------- */

.bl-info-box {
  background: #1e2a1e;
  border: 1px solid #2ecc71;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  max-width: 400px;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

.bl-info-box strong {
  color: #2ecc71;
}

.bl-game-list {
  width: 100%;
  max-width: 400px;
  margin: 16px 0 24px;
}

.bl-game-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #222;
  border-radius: 6px;
  margin-bottom: 8px;
}

.bl-game-icon {
  font-size: 28px;
  width: 36px;
  text-align: center;
}

.bl-game-item strong {
  color: #f5a623;
  display: block;
  font-size: 15px;
}

.bl-game-desc {
  color: #888;
  font-size: 12px;
}

/* ----------------------------------------------------------
   TRANSITION SCREEN
   ---------------------------------------------------------- */

.bl-transition {
  justify-content: center;
  text-align: center;
}

.bl-game-num {
  color: #888;
  font-size: 13px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bl-transition h2 {
  color: #f5a623;
  font-size: 28px;
  margin: 8px 0;
}

/* ----------------------------------------------------------
   GAME SCREEN COMMON
   ---------------------------------------------------------- */

.bl-game-screen {
  padding: 12px;
  align-items: stretch;
}

.bl-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  margin-bottom: 8px;
}

.bl-game-label {
  font-weight: 600;
  font-size: 16px;
  color: #f5a623;
}

.bl-game-meta {
  color: #888;
  font-size: 13px;
}

.bl-instructions {
  background: #1a1a2e;
  border: 1px solid #334;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.bl-instructions strong {
  color: #f5a623;
}

/* Feedback overlay */
.bl-feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  z-index: 100;
  pointer-events: none;
  animation: bl-fb-pop 0.5s ease-out;
}

.bl-fb-good { color: #2ecc71; }
.bl-fb-miss { color: #e74c3c; }

@keyframes bl-fb-pop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  40% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ----------------------------------------------------------
   GAME 1: RECALL — Spatial Span
   ---------------------------------------------------------- */

.bl-recall-status {
  text-align: center;
  font-size: 15px;
  color: #ccc;
  margin-bottom: 16px;
  min-height: 24px;
}

.bl-recall-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
  padding: 16px;
}

.bl-recall-cell {
  aspect-ratio: 1;
  background: #2a2a3a;
  border: 2px solid #444;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  min-width: 70px;
  min-height: 70px;
}

.bl-recall-cell:active:not(.disabled) {
  transform: scale(0.92);
}

.bl-recall-cell.disabled {
  cursor: default;
  opacity: 0.6;
}

.bl-recall-cell.flash {
  background: #f5a623 !important;
  border-color: #f5c563 !important;
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.5);
}

.bl-recall-cell.tapped {
  background: #3498db;
  border-color: #5dade2;
}

/* ----------------------------------------------------------
   GAME 2: SORT — Task Switching
   ---------------------------------------------------------- */

.bl-sort-rule {
  text-align: center;
  font-size: 18px;
  padding: 12px;
  margin-bottom: 12px;
  background: #1a1a2e;
  border: 2px solid #444;
  border-radius: 8px;
  transition: border-color 0.3s, background 0.3s;
}

.bl-sort-rule strong {
  color: #f5a623;
  font-size: 22px;
}

.bl-rule-changed {
  border-color: #e74c3c !important;
  background: #2e1a1a !important;
  animation: bl-rule-pulse 0.6s ease;
}

@keyframes bl-rule-pulse {
  0%, 100% { border-color: #e74c3c; }
  50% { border-color: #ff6b6b; box-shadow: 0 0 15px rgba(231, 76, 60, 0.4); }
}

.bl-sort-card {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
  background: #222;
  border: 2px solid #555;
  border-radius: 12px;
  margin: 12px auto;
}

.bl-sort-bins {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.bl-sort-bin {
  padding: 14px 20px;
  background: #2a2a3a;
  border: 2px solid #555;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-width: 90px;
  min-height: 48px;
  transition: transform 0.1s, border-color 0.15s;
  touch-action: manipulation;
}

.bl-sort-bin:active {
  transform: scale(0.94);
}

.bl-bin-correct {
  border-color: #2ecc71 !important;
  background: #1e2e1e !important;
}

.bl-bin-wrong {
  border-color: #e74c3c !important;
  background: #2e1a1a !important;
}

/* ----------------------------------------------------------
   GAME 3: FOCUS — Go/No-Go
   ---------------------------------------------------------- */

.bl-focus-screen {
  justify-content: flex-start;
  user-select: none;
  -webkit-user-select: none;
}

.bl-focus-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.bl-focus-go {
  background: #1e2e1e;
  border: 1px solid #2ecc71;
  border-radius: 6px;
  padding: 8px 12px;
}

.bl-focus-nogo {
  background: #2e1a1a;
  border: 1px solid #e74c3c;
  border-radius: 6px;
  padding: 8px 12px;
}

.bl-focus-icons {
  font-size: 24px;
  margin-left: 8px;
}

.bl-focus-timer-bar {
  width: 100%;
  height: 4px;
  background: #333;
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
}

.bl-focus-timer-fill {
  width: 100%;
  height: 100%;
  background: #f5a623;
  border-radius: 2px;
}

.bl-focus-stimulus {
  font-size: 96px;
  text-align: center;
  padding: 40px 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.bl-focus-stimulus:active {
  transform: scale(0.9);
}

.bl-stim-hit {
  animation: bl-hit-flash 0.3s ease;
}

.bl-stim-fa {
  animation: bl-fa-flash 0.3s ease;
}

@keyframes bl-hit-flash {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.5) drop-shadow(0 0 20px #2ecc71); }
  100% { filter: brightness(1); }
}

@keyframes bl-fa-flash {
  0% { filter: brightness(1); }
  50% { filter: brightness(0.5) drop-shadow(0 0 20px #e74c3c); }
  100% { filter: brightness(1); }
}

.bl-focus-fixation {
  font-size: 48px;
  color: #555;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bl-focus-hint {
  font-size: 11px;
  color: #666;
  text-align: center;
  padding: 8px 0;
}

/* ----------------------------------------------------------
   GAME 4: PACK — Spatial Planning
   ---------------------------------------------------------- */

.bl-pack-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  background: #111;
  border: 2px solid #555;
  border-radius: 8px;
  padding: 6px;
  max-width: 360px;
  margin: 0 auto 16px;
  width: 100%;
}

.bl-pack-cell {
  aspect-ratio: 1;
  background: #222;
  border: 1px solid #333;
  border-radius: 4px;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s;
}

.bl-pack-cell.filled {
  border-color: rgba(255,255,255,0.2);
}

.bl-pack-cell.placeable {
  cursor: pointer;
  border-color: #f5a623;
  background: rgba(245, 166, 35, 0.1);
}

.bl-pack-cell.placeable:active {
  background: rgba(245, 166, 35, 0.3);
}

.bl-pack-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.bl-pack-preview {
  text-align: center;
}

.bl-pack-piece-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

.bl-pack-piece-grid {
  display: grid;
  gap: 2px;
  margin: 0 auto;
}

.bl-preview-cell {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  background: transparent;
}

.bl-preview-cell.active {
  border: 1px solid rgba(255,255,255,0.3);
}

.bl-pack-buttons {
  display: flex;
  gap: 12px;
}

.bl-pack-done-msg {
  font-size: 16px;
  color: #999;
  margin-bottom: 8px;
}

/* ----------------------------------------------------------
   RESULTS SCREEN
   ---------------------------------------------------------- */

.bl-results {
  text-align: center;
}

.bl-results h2 {
  color: #2ecc71;
  margin: 8px 0;
}

.bl-scores-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 400px;
  width: 100%;
  margin: 16px 0;
}

.bl-score-card {
  background: #222;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.bl-score-icon {
  font-size: 28px;
}

.bl-score-name {
  font-weight: 600;
  color: #f5a623;
  font-size: 14px;
  margin: 4px 0;
}

.bl-score-detail {
  color: #999;
  font-size: 12px;
}

.bl-profile-box {
  background: #1a1a2e;
  border: 1px solid #3498db;
  border-radius: 8px;
  padding: 16px;
  max-width: 400px;
  width: 100%;
  margin: 8px 0 24px;
  text-align: left;
}

.bl-profile-box h3 {
  color: #3498db;
  margin: 0 0 12px;
  font-size: 16px;
  text-align: center;
}

.bl-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  justify-content: center;
}

.bl-tag {
  background: #2a2a3a;
  border: 1px solid #444;
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 12px;
  color: #ccc;
}

.bl-profile-notes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bl-profile-notes li {
  padding: 6px 0;
  border-bottom: 1px solid #2a2a3a;
  font-size: 13px;
  line-height: 1.5;
  color: #bbb;
}

.bl-profile-notes li:last-child {
  border-bottom: none;
}

/* ----------------------------------------------------------
   TEAM TAB — Learner Profile Card
   ---------------------------------------------------------- */

.bl-profile-card {
  background: #1a1a2e;
  border: 1px solid #334;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.bl-profile-card h4 {
  color: #3498db;
  margin: 0 0 8px;
  font-size: 14px;
}

.bl-profile-card .bl-tag {
  font-size: 11px;
}

.bl-profile-card .bl-profile-notes li {
  font-size: 12px;
  padding: 4px 0;
}

.bl-profile-card .bl-profile-date {
  color: #666;
  font-size: 11px;
  text-align: right;
  margin-top: 8px;
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */

@media (max-width: 360px) {
  .bl-recall-cell {
    min-width: 60px;
    min-height: 60px;
  }
  .bl-recall-grid {
    gap: 8px;
    max-width: 240px;
  }
  .bl-focus-stimulus {
    font-size: 72px;
  }
  .bl-pack-cell {
    min-height: 36px;
  }
  .bl-sort-bin {
    padding: 10px 14px;
    min-width: 80px;
    font-size: 13px;
  }
}


/* Phase progress indicator */
.bl-phase-progress {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Contractor picker */
.bl-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}
.bl-picker-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.bl-picker-btn:hover, .bl-picker-btn:active {
  background: rgba(255, 149, 0, 0.15);
  border-color: rgba(255, 149, 0, 0.4);
}
.bl-picker-name { font-weight: 600; }
.bl-picker-tier { font-size: 13px; opacity: 0.5; }
.bl-input {
  width: 100%;
  max-width: 300px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  margin: 12px auto;
  display: block;
}
.bl-input::placeholder { color: rgba(255, 255, 255, 0.3); }
