/* =========================================================================
   SPTG Pilot Aptitude Platform — Concurrent Multitasking Module Styling
   330s 5-Panel Instrument Cluster & Attention Balance Scoring
   ========================================================================= */

.multitask-workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 1100px) {
  .multitask-workspace {
    grid-template-columns: 1fr;
  }
}

/* Play Column */
.multitask-play-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.multitask-stage-card {
  background: var(--bg-surface, #121926);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

/* Multitask Stage HUD */
.multitask-stage-hud {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.multitask-hud-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
}

.multitask-hud-stat span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #7c8ba1);
}

.multitask-hud-stat strong {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

.multitask-hud-spacer {
  flex: 1;
}

.multitask-balance-mission,
.multitask-timer-mission {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.multitask-balance-badge {
  font-family: var(--font-mono, monospace);
  font-size: 1.15rem;
  font-weight: 800;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.15);
  padding: 0.1rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  letter-spacing: 0.06em;
}

.multitask-timer-mission strong {
  font-family: var(--font-mono, monospace);
  font-size: 1.25rem;
  font-weight: 700;
  color: #f7bf2a;
}

/* 5-Panel Instrument Cluster Grid */
.multitask-cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 0.75rem;
  background: radial-gradient(circle at center, #0f172a 0%, #080c14 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.85rem;
  min-height: 520px;
}

@media (max-width: 900px) {
  .multitask-cluster-grid {
    grid-template-columns: 1fr;
  }
}

/* Generic Panel Aesthetics */
.task-panel {
  background: var(--bg-surface, #121926);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.task-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.35rem;
  margin-bottom: 0.45rem;
}

.task-panel-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #00e5ff;
}

.task-panel-score-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  color: var(--text-muted, #7c8ba1);
}

/* Panel 1: Coordinate Plot */
.coord-plot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.coord-lamp-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: space-between;
}

.coord-status-lamp {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff4d4f;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 6px rgba(255, 77, 79, 0.6);
  transition: all 0.2s ease;
}

.coord-status-lamp.active-green {
  background: #20c56d;
  box-shadow: 0 0 12px rgba(32, 197, 109, 0.9);
  animation: pulse-lamp 1s infinite alternate;
}

@keyframes pulse-lamp {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

.coord-target-text {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.coord-grid-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  width: 100%;
  max-width: 180px;
}

.coord-cell-btn {
  aspect-ratio: 1;
  background: var(--bg-tertiary, #1a2333);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #cbd5e1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.coord-cell-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
}

.coord-cell-btn.flash-correct {
  background: rgba(32, 197, 109, 0.5) !important;
  border-color: #20c56d !important;
}

.coord-cell-btn.flash-wrong {
  background: rgba(255, 77, 79, 0.5) !important;
  border-color: #ff4d4f !important;
}

/* Panel 2: Moving Arrow Track */
.arrow-track-container {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  height: 100%;
  min-height: 180px;
}

.arrow-vertical-rail {
  width: 50px;
  height: 160px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.arrow-glider {
  position: absolute;
  left: 3px;
  width: 42px;
  height: 32px;
  background: linear-gradient(135deg, #00e5ff, #3a7ff5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 800;
  color: #000000;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
  transition: top 0.08s linear;
}

.arrow-choice-dock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  flex: 1;
}

.arrow-choice-btn {
  background: var(--bg-tertiary, #1a2333);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 0.4rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.arrow-choice-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
}

/* Panel 3: Continuous Arithmetic Queue */
.math-queue-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  height: 100%;
}

.math-queue-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 6px;
  padding: 0.6rem;
  text-align: center;
}

.math-queue-prompt {
  font-family: var(--font-mono, monospace);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.math-input-row {
  display: flex;
  gap: 0.4rem;
}

.math-queue-input {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.35rem;
  font-family: var(--font-mono, monospace);
  font-size: 1.1rem;
  color: #00e5ff;
  width: 100%;
  text-align: center;
}

.math-queue-input:focus {
  outline: none;
  border-color: #00e5ff;
}

/* Panel 4: Indicator Zone Excursion Needle */
.indicator-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
}

.indicator-meter-track {
  width: 100%;
  height: 120px;
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.indicator-safe-zone {
  position: absolute;
  top: 35%;
  height: 30%;
  width: 100%;
  background: rgba(32, 197, 109, 0.18);
  border-top: 1px dashed rgba(32, 197, 109, 0.5);
  border-bottom: 1px dashed rgba(32, 197, 109, 0.5);
}

.indicator-danger-top {
  position: absolute;
  top: 0;
  height: 35%;
  width: 100%;
  background: rgba(255, 77, 79, 0.12);
}

.indicator-danger-bottom {
  position: absolute;
  bottom: 0;
  height: 35%;
  width: 100%;
  background: rgba(255, 77, 79, 0.12);
}

.indicator-needle {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: #f7bf2a;
  box-shadow: 0 0 8px rgba(247, 191, 42, 0.9);
  transition: top 0.04s linear;
}

.indicator-needle.in-excursion {
  background: #ff4d4f;
  box-shadow: 0 0 12px #ff4d4f;
}

.indicator-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  width: 100%;
}

.indicator-btn {
  background: var(--bg-tertiary, #1a2333);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  cursor: pointer;
  transition: all 0.1s ease;
}

.indicator-btn:active {
  background: rgba(0, 229, 255, 0.3);
  border-color: #00e5ff;
}

/* Panel 5: Verbal Cognitive Prompt */
.task-panel-verbal {
  grid-column: 2 / 4;
}

@media (max-width: 900px) {
  .task-panel-verbal {
    grid-column: 1;
  }
}

.verbal-prompt-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.45rem;
}

.verbal-choices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

@media (max-width: 700px) {
  .verbal-choices-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.verbal-choice-btn {
  background: var(--bg-tertiary, #1a2333);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #cbd5e1);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.verbal-choice-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00e5ff;
}

/* Action Dock & Footer */
.multitask-stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted, #7c8ba1);
}

.multitask-action-dock {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
