/* Core Style Sheet - Aviation Multitasking Trainer */
:root {
  --color-bg: #070b12;
  --color-panel-bg: rgba(13, 20, 32, 0.75);
  --color-border: rgba(0, 255, 102, 0.25);
  --color-border-hover: rgba(0, 255, 102, 0.55);
  
  --color-green: #00ff66;
  --color-red: #ff3333;
  --color-orange: #ff9900;
  --color-cyan: #00f0ff;
  
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

body {
  background: radial-gradient(circle at 50% 30%, #0f172a 0%, #070b14 70%, #030712 100%);
  color: #e5f0ff;
  font-family: var(--font-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* AMBIENT BACKGROUND GLOWS & GRID */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: rgba(0, 243, 255, 0.08);
  top: -150px;
  left: 20%;
}

.glow-2 {
  width: 700px;
  height: 700px;
  background: rgba(143, 0, 255, 0.08);
  bottom: -200px;
  right: 15%;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* Base Layout Container */
.app-container {
  position: relative;
  height: 100vh;
  width: 100vw;
}

/* TOP SECTION (Windshield & Console) */
.top-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #02050a;
  overflow: hidden;
  z-index: 1;
}

#windshield-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}



.bottom-section {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  height: 340px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background-color: transparent;
  padding: 0 20px 10px 20px;
  box-sizing: border-box;
  z-index: 2;
  pointer-events: none;
}

.bottom-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #5c5d63; /* flat metallic gray, matching ref image */
  border: 4px solid #38393e; /* dark border outline */
  border-radius: 16px;
  position: relative;
  overflow: visible; /* allow screws to render at corners */
  padding: 20px 24px 24px 24px; /* inner screen bounds */
  box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.2), 0 8px 20px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  pointer-events: auto;
}

#panel-left {
  width: 450px;
  height: 340px;
  flex: 0 0 450px;
}

#panel-right {
  width: 450px;
  height: 340px;
  flex: 0 0 450px;
}

#panel-center {
  width: 240px;
  height: 340px;
  flex: 0 0 240px;
}

.panel-body {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  background-color: #000000;
  border: 4px solid #232427; /* inner recess border */
  border-radius: 8px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
}

/* Screw design */
.screw {
  position: absolute;
  width: 14px;
  height: 14px;
  background-color: #9ca3af; /* light metallic gray screw */
  border: 2px solid #4b5563; /* screw outline */
  border-radius: 50%;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.screw::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 2px;
  background-color: #374151; /* screw line */
}

/* Position screws in the corners with different rotations for a realistic look */
.screw.top-left {
  top: 6px;
  left: 6px;
}
.screw.top-left::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.screw.top-right {
  top: 6px;
  right: 6px;
}
.screw.top-right::before {
  transform: translate(-50%, -50%) rotate(-30deg);
}

.screw.bottom-left {
  bottom: 6px;
  left: 6px;
}
.screw.bottom-left::before {
  transform: translate(-50%, -50%) rotate(15deg);
}

.screw.bottom-right {
  bottom: 6px;
  right: 6px;
}
.screw.bottom-right::before {
  transform: translate(-50%, -50%) rotate(60deg);
}

.panel-body canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.flex-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* CENTER PANEL RECT STACKED BUTTONS */
.id-buttons-row-stacked {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 5px;
}

.id-btn-rect {
  width: 100%;
  height: 30px;
  font-family: var(--font-main);
  font-weight: bold;
  font-size: 13px;
  color: #000000;
  border: 1px solid #000000;
  border-radius: 2px;
  cursor: pointer;
  outline: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.id-btn-rect:active {
  transform: scale(0.97);
}

.aircraft-rect-btn {
  background-color: #00ff00; /* vibrant green */
}

.aircraft-rect-btn:hover {
  opacity: 0.9;
}

.waypoint-rect-btn {
  background-color: #ff0000; /* vibrant red */
}

.waypoint-rect-btn:hover {
  opacity: 0.9;
}

/* Memory evaluation buttons */
.memory-buttons-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(10, 16, 26, 0.8);
}

.mem-btn {
  padding: 10px 0;
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 12px;
  color: var(--color-orange);
  background-color: transparent;
  border: 1px solid rgba(255, 153, 0, 0.15);
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  text-align: center;
}

.mem-btn:hover {
  background-color: rgba(255, 153, 0, 0.1);
  border-color: var(--color-orange);
}

.mem-btn.correct {
  background-color: rgba(0, 255, 102, 0.18) !important;
  border-color: var(--color-green) !important;
  color: var(--color-green) !important;
}

.mem-btn.wrong {
  background-color: rgba(255, 51, 51, 0.18) !important;
  border-color: var(--color-red) !important;
  color: var(--color-red) !important;
}

.symbol-container {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
}

.symbol-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* RIGHT PANEL: COGNITIVE MULTIPLE-CHOICE */
#panel-right .panel-body {
  position: relative;
  height: 100%;
  width: 100%;
}

.cog-canvas-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.options-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 15px;
  padding: 20px;
  background-color: transparent;
  box-sizing: border-box;
}

.cog-opt-btn {
  font-family: var(--font-sans);
  font-weight: bold;
  font-size: 26px;
  color: var(--color-cyan);
  background-color: rgba(13, 20, 32, 0.95);
  border: 1.5px solid rgba(0, 240, 255, 0.25);
  border-radius: 10px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease-in-out;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.2);
}

.cog-opt-btn:hover {
  background-color: rgba(0, 240, 255, 0.08);
  border-color: var(--color-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.cog-opt-btn:active {
  transform: scale(0.97);
}

.cog-opt-btn.correct-flash {
  background-color: rgba(0, 255, 102, 0.25) !important;
  border-color: var(--color-green) !important;
  color: var(--color-green) !important;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.45) !important;
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.5);
}

.cog-opt-btn.incorrect-flash {
  background-color: rgba(255, 51, 51, 0.25) !important;
  border-color: var(--color-red) !important;
  color: var(--color-red) !important;
  box-shadow: 0 0 20px rgba(255, 51, 51, 0.45) !important;
  text-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
}

.hidden {
  display: none !important;
}

/* OVERLAY CARD STYLING - TACTICAL AEROSPACE AESTHETIC */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 18, 0.96);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  width: 90%;
  max-width: 680px;
  background: #111827;
  border: 1px solid #1f2937;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 36px 40px;
  text-align: center;
}

.cyber-header {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #94a3b8;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 4px 12px;
  display: inline-block;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.cyber-header.error {
  color: #f87171;
  background: #451a1a;
  border-color: #7f1d1d;
}

.cyber-header.info {
  color: #fbbf24;
  background: #453010;
  border-color: #78350f;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  color: #f3f4f6;
}

.subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 26px;
  letter-spacing: 0.2px;
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  text-align: left;
  margin-bottom: 30px;
}

.instruction-block {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.instruction-block:hover {
  background: #283548;
  border-color: #4b5563;
}

.instruction-block h3 {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #38bdf8;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.instruction-block p {
  font-size: 11.5px;
  color: #d1d5db;
  line-height: 1.5;
}

.instruction-block p strong {
  color: #ffffff;
}

.green-text { color: #10b981; }
.red-text { color: #ef4444; }

.glow-button {
  background: #2563eb;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 14px 40px;
  cursor: pointer;
  outline: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease-in-out;
  text-shadow: none;
}

.glow-button:hover {
  background: #1d4ed8;
  border-color: #60a5fa;
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.glow-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.4);
}

/* RESULTS SYSTEM */
.rating-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}

.rating-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #64748b;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.rating-badge {
  font-size: 64px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #10b981;
  line-height: 1;
  background: rgba(16, 185, 129, 0.08);
  border: 2px solid rgba(16, 185, 129, 0.35);
  border-radius: 16px;
  padding: 10px 36px;
  box-shadow: inset 0 0 15px rgba(16, 185, 129, 0.12);
}

.stats-report {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(10, 15, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 26px;
  text-align: left;
}

.report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.report-row-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.06);
  margin: 3px 0;
}

.report-label {
  color: #8da2c0;
  letter-spacing: 0.5px;
}

.report-value {
  font-weight: bold;
  font-size: 14px;
  color: #ffffff;
}

.font-green {
  color: #10b981 !important;
}

.font-red {
  color: #ef4444 !important;
}

.font-cyan {
  color: #38bdf8 !important;
}

/* FLOATING SCORE POPUPS */
#score-popup-container {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 9999;
}

.score-pop {
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 26px;
  opacity: 0;
  text-align: center;
  margin-bottom: 10px;
  animation: pop-up-fade 1.0s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.correct-pop {
  color: var(--color-green);
  text-shadow: 0 0 15px rgba(0, 255, 102, 0.8);
}

.wrong-pop {
  color: var(--color-red);
  text-shadow: 0 0 15px rgba(255, 51, 51, 0.8);
}

.collision-pop {
  color: var(--color-orange);
  text-shadow: 0 0 15px rgba(255, 153, 0, 0.8);
}

@keyframes pop-up-fade {
  0% {
    transform: translateY(20px) scale(0.6);
    opacity: 0;
  }
  30% {
    transform: translateY(0) scale(1.1);
    opacity: 1;
  }
  80% {
    transform: translateY(-30px) scale(1.0);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-50px) scale(0.8);
    opacity: 0;
  }
}

/* FLOATING PLUS-ONE POPUPS ON BUTTONS */
.plus-one-pop {
  position: fixed;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 25px;
  pointer-events: none;
  z-index: 10000;
  animation: button-pop-up-fade 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.plus-one-pop.aircraft-pop {
  color: #00f0ff;
  text-shadow: 
    -1.5px -1.5px 0 #000,  
     1.5px -1.5px 0 #000,
    -1.5px  1.5px 0 #000,
     1.5px  1.5px 0 #000,
     0 0 10px rgba(0, 240, 255, 0.8);
}

.plus-one-pop.waypoint-pop {
  color: #ffaa00;
  text-shadow: 
    -1.5px -1.5px 0 #000,  
     1.5px -1.5px 0 #000,
    -1.5px  1.5px 0 #000,
     1.5px  1.5px 0 #000,
     0 0 10px rgba(255, 170, 0, 0.8);
}

@keyframes button-pop-up-fade {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
  }
  30% {
    transform: translate(-50%, -85%) scale(1.3);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -150%) scale(0.85);
    opacity: 0;
  }
}

/* COPYRIGHT BAR AT BOTTOM */
.copyright-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 34px !important;
  line-height: 34px !important;
  text-align: center !important;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
  background: rgba(13, 20, 36, 0.92) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  z-index: 99999 !important;
  pointer-events: auto !important;
}

.copyright-bar .footer-brand {
  font-weight: 700 !important;
  color: #ffffff !important;
}

.copyright-bar .accent-cyan {
  color: #00f3ff !important;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.4) !important;
}

.copyright-bar .accent-purple {
  color: #c084fc !important;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.4) !important;
}

/* ==========================================
   IMAGE-BASED QUESTION LAYOUT (PANEL 3)
   ========================================== */

/* Shift panel body into a flexbox layout when an image question is active */
.panel-body.image-layout {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: 10px;
  box-sizing: border-box;
}

.panel-body.image-layout .cog-canvas-wrapper {
  /* The canvas only renders the timer at the bottom, so it must not block interaction */
  pointer-events: none;
}

/* Question body holding text & image */
.cog-question-body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 3;
  box-sizing: border-box;
  padding: 10px 14px;
  overflow: hidden;
}

.cog-question-body.hidden {
  display: none !important;
}

.cog-question-body .q-text {
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin: 0 auto;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  max-width: 98%;
  word-wrap: break-word;
  text-align: center !important;
  width: 100%;
}

.cog-question-body .q-text b {
  color: var(--color-cyan);
}

.cog-question-body .q-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  padding: 0;
  max-height: 180px;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
}

.cog-question-body .q-image svg,
.cog-question-body .q-image img {
  max-height: 175px;
  max-width: 100%;
  margin: 0 auto;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Adjust options container for Panel 3 cognitive questions */
.panel-body .options-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
  box-sizing: border-box;
  z-index: 5;
}

/* Interactive button cards for Panel 3 cognitive questions */
.panel-body .cog-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6px;
  min-height: 60px;
  max-width: 100%;
  border-radius: 8px;
  background-color: rgba(7, 11, 18, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  box-sizing: border-box;
  font-family: var(--font-main);
  color: #ffffff;
  overflow: hidden;
}

.cog-opt-content {
  width: 100%;
  height: 100%;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  box-sizing: border-box;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.panel-body .cog-opt-btn:hover {
  background-color: rgba(0, 240, 255, 0.08);
  border-color: var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.panel-body .cog-opt-btn:active {
  transform: scale(0.97);
}

.cog-opt-btn.correct-flash {
  background-color: rgba(0, 255, 102, 0.25) !important;
  border-color: var(--color-green) !important;
  color: var(--color-green) !important;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.6) !important;
}

.cog-opt-btn.incorrect-flash {
  background-color: rgba(255, 51, 51, 0.25) !important;
  border-color: var(--color-red) !important;
  color: var(--color-red) !important;
  box-shadow: 0 0 20px rgba(255, 51, 51, 0.6) !important;
}

/* Styled option letter badge inside cards */
.cog-opt-letter {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: rgba(0, 240, 255, 0.75);
  font-weight: 700;
  pointer-events: none;
}

/* Content wrapper inside cards (SVG or text) */
.cog-opt-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.cog-opt-content svg,
.cog-opt-content img {
  max-height: 85%;
  max-width: 85%;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  margin: auto !important;
  align-self: center !important;
  justify-self: center !important;
  object-fit: contain;
  overflow: visible !important;
}

.cog-opt-content .swatch,
.cog-opt-btn .swatch {
  width: 34px !important;
  height: 34px !important;
  border-radius: 6px !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
  margin-right: 12px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  flex: none !important;
}

/* Ensure inline SVGs behave like scalable vectors */
svg {
  display: inline-block;
  vertical-align: middle;
}

/* Custom parsed HTML elements styling for Panel 3 */
.cog-question-body .figure-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-top: 2px;
  width: 100%;
  max-width: 100%;
}

.cog-question-body .figure-box {
  border: none !important;
  padding: 0;
  background: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  transition: border-color 0.2s ease;
  flex: 0 1 auto;
}

.cog-question-body .figure-box svg {
  height: 68px !important;
  width: 68px !important;
  max-height: 68px !important;
  max-width: 68px !important;
}

.cog-question-body .word-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 15px;
  font-size: 14px;
  margin-top: 8px;
  font-family: var(--font-mono);
  color: #a0b6d2;
  text-align: left;
  background: rgba(10, 16, 26, 0.4);
  border: 1.5px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  padding: 10px 15px;
}

.cog-question-body .word-grid .lbl {
  color: var(--color-cyan);
  font-weight: bold;
}

.cog-question-body .word-cell {
  padding: 2px 0;
  color: #ffffff;
}

/* Dark mode overrides for SVG diagrams */
/* 1. Question body SVGs (only dark lines overridden to white) */
.cog-question-body svg [stroke="#1f2937"],
.cog-question-body svg [stroke="#4b5563"],
.cog-question-body svg [stroke="#1e3a5f"] {
  stroke: #ffffff !important;
}

.cog-question-body svg [fill="#1f2937"] {
  fill: #ffffff !important;
}

/* 2. Option content SVGs (make all lines and objects white/light gray so they are the same color) */
/* We target rect, path, circle, line, polygon, polyline, ellipse, but EXCLUDE text (so letters like Y, X remain black/high contrast inside yellow/pink blocks) */
/* EXCEPTION: We do not apply this to question-8 so its options remain colored */
.panel-body:not(.question-8) .cog-opt-content svg rect,
.panel-body:not(.question-8) .cog-opt-content svg path,
.panel-body:not(.question-8) .cog-opt-content svg circle,
.panel-body:not(.question-8) .cog-opt-content svg line,
.panel-body:not(.question-8) .cog-opt-content svg polygon,
.panel-body:not(.question-8) .cog-opt-content svg polyline,
.panel-body:not(.question-8) .cog-opt-content svg ellipse {
  stroke: #ffffff !important;
}

/* For elements that only specify fill (like solid blocks), make them white if they are dark, but preserve bright fill colors like yellow/pink/blue/green */
.panel-body:not(.question-8) .cog-opt-content svg rect[fill="#1f2937"],
.panel-body:not(.question-8) .cog-opt-content svg rect[fill="black"],
.panel-body:not(.question-8) .cog-opt-content svg rect[fill="#000"],
.panel-body:not(.question-8) .cog-opt-content svg rect[fill="#000000"],
.panel-body:not(.question-8) .cog-opt-content svg path[fill="#1f2937"],
.panel-body:not(.question-8) .cog-opt-content svg path[fill="black"],
.panel-body:not(.question-8) .cog-opt-content svg path[fill="#000"],
.panel-body:not(.question-8) .cog-opt-content svg path[fill="#000000"],
.panel-body:not(.question-8) .cog-opt-content svg circle[fill="#1f2937"],
.panel-body:not(.question-8) .cog-opt-content svg circle[fill="black"],
.panel-body:not(.question-8) .cog-opt-content svg circle[fill="#000"],
.panel-body:not(.question-8) .cog-opt-content svg circle[fill="#000000"] {
  fill: #ffffff !important;
}

/* If fill is none, keep it none to prevent drawing solid white blocks */
.panel-body:not(.question-8) .cog-opt-content svg rect[fill="none"],
.panel-body:not(.question-8) .cog-opt-content svg path[fill="none"],
.panel-body:not(.question-8) .cog-opt-content svg circle[fill="none"] {
  fill: none !important;
}



/* 4. Question 10 specific overrides: make star and dot white */
.panel-body.question-10 svg text,
.panel-body.question-10 svg circle {
  fill: #ffffff !important;
}

/* POST-FLIGHT MEMORY ASSESSMENT STYLING */
.options-container-static {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  margin-top: 24px;
  box-sizing: border-box;
}

.options-container-static .cog-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 22px 14px 12px 14px;
  min-height: 76px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(24, 32, 46, 0.9) 0%, rgba(16, 22, 32, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  box-sizing: border-box;
}

.options-container-static .cog-opt-btn:hover {
  background: linear-gradient(180deg, rgba(35, 47, 68, 0.9) 0%, rgba(24, 32, 46, 0.95) 100%);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.options-container-static .cog-opt-btn:active {
  transform: scale(0.98);
}

.options-container-static .cog-opt-btn .cog-opt-letter {
  position: absolute;
  top: 8px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #60a5fa;
  font-weight: 700;
  pointer-events: none;
}

.options-container-static .cog-opt-btn .option-text {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
}

/* Choice Feedback Classes */
.options-container-static .cog-opt-btn.correct-choice {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3) !important;
}
.options-container-static .cog-opt-btn.correct-choice .option-text {
  color: #10b981 !important;
}
.options-container-static .cog-opt-btn.correct-choice .cog-opt-letter {
  color: #10b981 !important;
}

.options-container-static .cog-opt-btn.wrong-choice {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.3) !important;
}
.options-container-static .cog-opt-btn.wrong-choice .option-text {
  color: #ef4444 !important;
}
.options-container-static .cog-opt-btn.wrong-choice .cog-opt-letter {
  color: #ef4444 !important;
}

.options-container-static.disabled {
  pointer-events: none !important;
}

/* Custom parsed HTML elements styling for Panel 3 questions */
.mini-grid {
  display: grid;
  gap: 2px;
  background: #4a4a4a;
  border: 1.5px solid #4a4a4a;
  box-sizing: border-box;
}
.mini-grid div {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #ffffff;
  box-sizing: border-box;
}

.num-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.num-pair .arrow {
  color: #b9c4da;
  font-size: 11px;
}

.swatch {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #4a4a4a, 0 2px 6px rgba(0, 0, 0, 0.4);
  flex: none;
  display: inline-block;
  vertical-align: middle;
}

.crossgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 6px;
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto;
}
.crossgrid .cell {
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}
.crossgrid .cell .clabel {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #b9c4da;
  background: none;
}
