/**
 * Farm Investigation Simulation Stylesheet
 * Footprints, Interactive Ruler, Animal Finder App, Microscope Optics, and Video Walkthrough.
 */

.simulation-stage-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.sim-header-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-title {
  font-size: 15px;
  font-weight: 700;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Garden Scene
   ========================================================================== */
.garden-scene-canvas {
  background: #09111e;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.scene-svg {
  width: 100%;
  height: 100%;
  max-height: 380px;
  display: block;
}

/* ==========================================================================
   Footprints Observation Display
   ========================================================================== */
.footprints-grid-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  flex: 1;
}

.footprint-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fp-number {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.fp-svg-wrap {
  width: 100%;
  height: 140px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footprint-svg {
  width: 100%;
  height: 100%;
  max-height: 130px;
  display: block;
}

/* ==========================================================================
   Interactive Draggable Ruler Tool (Screen 4)
   ========================================================================== */
.ruler-measurement-stage {
  position: relative;
  background: #0c182c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  flex: 1;
  min-height: 380px;
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.measurement-footprints-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex: 1;
}

.measure-target-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.target-label {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.target-footprint-svg {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.measured-tag {
  font-size: 11px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
}

.measured-tag strong {
  color: #34d399;
}

.draggable-ruler {
  position: absolute;
  width: 390px;
  height: 60px;
  background: linear-gradient(180deg, #fef08a 0%, #facc15 100%);
  border: 2px solid #ca8a04;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  cursor: grab;
  z-index: 100;
  user-select: none;
  touch-action: none;
}

.draggable-ruler.dragging {
  cursor: grabbing;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.8);
  transform: scale(1.02);
}

.ruler-grab-handle {
  font-size: 10px;
  font-weight: 700;
  color: #713f12;
  text-align: center;
  padding-top: 2px;
}

.ruler-body-cm {
  position: relative;
  height: 40px;
  margin: 0 10px;
}

.ruler-ticks-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.cm-mark {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tick-line.major {
  width: 1.5px;
  height: 18px;
  background: #713f12;
}

.tick-line.half {
  position: absolute;
  top: 0;
  width: 1px;
  height: 10px;
  background: #a16207;
}

.cm-num {
  font-size: 10px;
  font-weight: 800;
  color: #713f12;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

/* ==========================================================================
   Animal Finder App Simulator (Screens 5 & 6)
   ========================================================================== */
.app-simulator-container {
  display: flex;
  justify-content: center;
  flex: 1;
}

.app-screen-frame {
  width: 100%;
  max-width: 460px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.app-header-bar {
  background: #1e293b;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-brand {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.app-body-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.app-instruction {
  font-size: 12.5px;
  color: var(--text-muted);
}

.app-fp-selector-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.btn-app-fp {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn-app-fp:hover {
  background: var(--bg-card-light);
}

.btn-app-fp.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.btn-app-fp .fp-title {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.btn-app-fp .fp-mini-dim {
  font-size: 9px;
  color: #94a3b8;
}

.decision-tree-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  flex: 1;
}

.tree-question-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.q-step {
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
}

.q-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.q-data-hint {
  font-size: 11px;
  color: #38bdf8;
}

.tree-branch-result {
  margin-top: 14px;
}

.branch-path.active {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  align-self: flex-start;
}

.sub-q {
  font-size: 13px;
  color: #fff;
}

.animal-result-card.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

/* ==========================================================================
   Suspects Board View (Screens 7, 8, 9)
   ========================================================================== */
.suspects-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
}

.suspect-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.suspect-item-card.prime-suspect {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.15);
}

.suspect-item-card.eliminated {
  opacity: 0.55;
  filter: grayscale(0.6);
}

.suspect-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}

.s-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.diet-tag {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  color: #cbd5e1;
}

/* ==========================================================================
   Tools Selection Board (Screen 10)
   ========================================================================== */
.tools-grid-selection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
}

.tool-select-card {
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-select-card:hover {
  background: var(--bg-card-light);
  transform: translateY(-2px);
}

.tool-select-card.selected {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.tool-icon-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.tool-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.tool-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.tool-status-check {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Interactive Microscope Simulation (Screens 11 & 12)
   ========================================================================== */
.microscope-viewport-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: #060a12;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 20px;
  flex: 1;
}

.eyepiece-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 8px solid #1f2937;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  position: relative;
  background: #030712;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eyepiece-lens {
  width: 100%;
  height: 100%;
  transition: filter 0.2s ease;
}

.eyepiece-crosshair {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, transparent 65%, rgba(0, 0, 0, 0.8) 100%);
}

.focus-control-panel {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.focus-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.focus-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.focus-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.microscope-slider {
  flex: 1;
  accent-color: #10b981;
  cursor: pointer;
}

.focus-status-text {
  font-size: 12px;
  color: var(--text-sub);
  text-align: center;
}

/* Dual Microscope */
.dual-microscope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
}

.micro-sample-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sample-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.eyepiece-circle-sm {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 6px solid #1f2937;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  background: #030712;
}

.focus-slider-wrap-sm {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.microscope-slider-sm {
  width: 100%;
  accent-color: #10b981;
}

.focus-state-badge {
  font-size: 11px;
  font-weight: 700;
}

/* ==========================================================================
   Microscopic Hair Comparison Stage (Screen 13)
   ========================================================================== */
.hair-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
}

.hair-comp-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hair-comp-box.evidence-box {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.comp-label {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

.comp-label.evidence {
  color: #fbbf24;
}

.comp-eyepiece {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 5px solid #1f2937;
  overflow: hidden;
}

.comp-features-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10.5px;
  color: var(--text-sub);
  text-align: right;
  width: 100%;
}

/* ==========================================================================
   Case Solved Banner (Screen 14)
   ========================================================================== */
.case-solved-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(245, 158, 11, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.solved-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.solved-sub {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 4px;
}

.report-score-pill {
  margin-right: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-val {
  font-size: 24px;
  font-weight: 800;
  color: #34d399;
}
