/**
 * Plant Simulation & Visualization Styles for TIMSS Tomato Lab
 * Greenhouse tank models, SVG growth animations, time-lapse timeline, and comparative charts.
 */

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

.sim-header-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.sim-header-badge::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #10b981, #059669);
}

.badge-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* ==========================================================================
   Tanks Grid & Tank Cards
   ========================================================================== */
.tanks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  flex: 1;
}

.tank-card {
  background: rgba(18, 30, 50, 0.9);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.tank-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.4), rgba(255,255,255,0.1));
}

.tank-card.clickable-tank {
  cursor: pointer;
}

.tank-card.clickable-tank:hover {
  background: rgba(26, 44, 73, 0.95);
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(16, 185, 129, 0.2);
}

.tank-card.active-tank {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 20px var(--primary-glow);
}

.tank-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tank-number {
  font-size: 14.5px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tank-badge-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.tank-badge-status.status-ready {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.tank-badge-status.status-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.tank-visual-area {
  flex: 1;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(19, 36, 61, 0.6) 0%, rgba(8, 14, 25, 0.85) 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Glass Tank Reflection highlight */
.tank-visual-area::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.tank-svg {
  width: 100%;
  height: 100%;
  max-height: 250px;
  display: block;
}

/* Tank Metrics Summary Chips */
.tank-metrics-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.metric-chip {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
}

.metric-chip.fert-x {
  border-bottom: 2.5px solid #10b981;
}

.metric-chip.fert-y {
  border-bottom: 2.5px solid #3b82f6;
}

.metric-chip.water {
  border-bottom: 2.5px solid #0ea5e9;
}

.chip-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

.chip-val {
  color: #fff;
  font-weight: 800;
  margin-top: 2px;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.btn-configure-tank {
  width: 100%;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-configure-tank:hover {
  background: var(--primary);
  border-color: #34d399;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.tank-growth-stats {
  display: flex;
  justify-content: space-around;
  background: rgba(11, 20, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12.5px;
}

.tank-growth-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
}

.tank-growth-stats strong {
  color: #fff;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* ==========================================================================
   Animated Tomato Flowers, Fruits & Foliage
   ========================================================================== */
.tomato-flower {
  animation: bloomPulse 2s ease-in-out infinite alternate;
  transform-origin: center;
}

@keyframes bloomPulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.12); opacity: 1; filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.8)); }
}

.cherry-tomato {
  animation: fruitSway 2.5s ease-in-out infinite alternate;
  transform-origin: top center;
}

@keyframes fruitSway {
  0% { transform: rotate(-3deg); }
  100% { transform: rotate(3deg); }
}

.plant-group {
  animation: gentleBreeze 4s ease-in-out infinite alternate;
  transform-origin: bottom center;
}

@keyframes gentleBreeze {
  0% { transform: rotate(-0.4deg); }
  100% { transform: rotate(0.6deg); }
}

/* ==========================================================================
   Time-Lapse Controller (Screen 8)
   ========================================================================== */
.timelapse-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.timelapse-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: #fff;
}

.week-counter {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-counter strong {
  color: #38bdf8;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 16px;
}

.timelapse-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.timelapse-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 100%);
  border-radius: 999px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.timelapse-observation-box {
  background: rgba(11, 20, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.timelapse-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-timelapse-play {
  height: 42px;
  padding: 0 20px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.22s ease;
}

.btn-timelapse-play:hover {
  background: var(--primary);
  border-color: #34d399;
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-1px);
}

/* ==========================================================================
   Comparative Bar Charts View
   ========================================================================== */
.simulation-charts-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}

.charts-container-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  flex: 1;
}

.chart-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.chart-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.bars-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  flex: 1;
  min-height: 230px;
  padding: 20px 10px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 29%;
  height: 100%;
}

.bar-value {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.bar-track {
  width: 100%;
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.bar-fill {
  width: 100%;
  border-radius: 8px 8px 0 0;
  transition: height 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.flower-fill {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}

.bar-label {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.3;
}

.bar-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

.chart-legend-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  gap: 26px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legend-color.height-color {
  background: #10b981;
}

.legend-color.flower-color {
  background: #f59e0b;
}

/* ==========================================================================
   Viewport Mode Tabs (Live Simulation vs Video Walkthrough)
   ========================================================================== */
.viewport-mode-tabs {
  display: flex;
  gap: 10px;
  background: rgba(14, 23, 38, 0.95);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  margin-bottom: 12px;
}

.mode-tab-btn {
  flex: 1;
  height: 40px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.22s ease;
}

.mode-tab-btn:hover {
  color: #fff;
}

.mode-tab-btn.active {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Video Walkthrough Player Component
   ========================================================================== */
.video-walkthrough-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-player-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.video-screen-frame {
  background: #080f1d;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  flex: 1;
  min-height: 380px;
}

.video-canvas-stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: radial-gradient(circle at center, #142542 0%, #060b14 100%);
  min-height: 320px;
}

.video-stage-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.live-rec {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-rec i {
  color: #ef4444;
  animation: pulseTimer 1.2s infinite ease-in-out;
}

.vid-step-label {
  color: var(--text-muted);
  font-weight: 600;
}

/* Real Video Player Container & Video Element */
.real-video-frame {
  background: #060b14;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timss-real-video-wrapper {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timss-real-video {
  width: 100%;
  height: auto;
  max-height: 480px;
  display: block;
  object-fit: contain;
  background: #000;
  outline: none;
}

.video-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.video-quality-tag {
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


.video-animated-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 12px 0;
}

.demo-interactive-preview {
  width: 100%;
  max-width: 460px;
  position: relative;
}

.demo-mock-screen {
  background: rgba(19, 34, 56, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.demo-mini-tanks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mini-tank-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.mini-tank-box.highlighted {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

.mini-tank-box .t-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.mini-tank-box .t-val {
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
}

.demo-cursor-pointer {
  position: absolute;
  top: 18%;
  right: 45%;
  font-size: 24px;
  color: #fbbf24;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
  z-index: 20;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Demo Question Screen Mockup in Walkthrough Video */
.demo-question-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.demo-prompt-box {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.5;
  transition: all 0.4s ease;
}

.demo-prompt-box.step-active {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.demo-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-option-item {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: #cbd5e1;
  transition: all 0.35s ease;
}

.demo-option-item .opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 11px;
  color: #38bdf8;
  flex-shrink: 0;
}

.demo-option-item.hovered {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  transform: translateX(-4px);
}

.demo-option-item.selected-glow {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.demo-option-item.selected-glow .opt-letter {
  background: #10b981;
  color: #fff;
}

.demo-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-btn-help {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.35s ease;
}

.demo-btn-help.active-pulse {
  background: #f59e0b;
  color: #0f172a;
  border-color: #fde047;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
  transform: scale(1.05);
}

.demo-btn-submit {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.35s ease;
}

.demo-btn-submit.active-pulse {
  background: #10b981;
  color: #fff;
  border-color: #6ee7b7;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
  transform: scale(1.05);
}

.demo-help-popup {
  position: absolute;
  bottom: 54px;
  right: 18px;
  background: #0f172a;
  border: 1.5px solid #f59e0b;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  animation: fadeInPopup 0.3s ease;
  z-index: 15;
}

@keyframes fadeInPopup {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.video-subtitles-banner {
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.subtitles-text {
  font-size: 13.5px;
  color: #f8fafc;
  line-height: 1.6;
}

.video-controls-bar {
  background: #0e1726;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  direction: ltr;
}

.demo-q-badge {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.demo-option-item .opt-letter {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 800;
  color: #fff;
}

.demo-option-item.selected-glow {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.demo-flower-growth-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 14px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
}

.growth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.growth-step .step-icon {
  font-size: 26px;
}

.growth-step.highlight-flower {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.growth-step .step-tag {
  font-size: 10.5px;
  color: #fbbf24;
  font-weight: 700;
}

.fair-test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.fair-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
}

.fair-num {
  font-size: 20px;
  font-weight: 900;
  color: #34d399;
}

.fair-name {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 4px;
}

.fair-note {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.env-factors-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.env-factor-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ef-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.ef-val {
  font-size: 11px;
  color: #94a3b8;
}

.water-tanks-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.water-tank-chip {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  color: #e2e8f0;
}

.demo-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.demo-summary-table th {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 8px;
  color: #94a3b8;
  text-align: right;
}

.demo-summary-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.chk-tag.ok {
  color: #34d399;
  font-weight: 700;
}

.demo-mini-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 120px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
}

.m-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.m-bar-val {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.m-bar-col {
  width: 38px;
  border-radius: 4px 4px 0 0;
  transition: height 0.4s ease;
}

.m-bar-lbl {
  font-size: 11px;
  color: #94a3b8;
}

.demo-cert-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 16px;
}

.cert-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.cert-score {
  font-size: 13px;
  color: #34d399;
  font-weight: 700;
}

.btn-vid-ctrl {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.18s ease;
}

.btn-vid-ctrl:hover {
  background: rgba(255, 255, 255, 0.1);
}

.vid-time-display {
  font-size: 13px;
  font-family: 'JetBrains Mono', 'Outfit', monospace;
  color: var(--text-muted);
}

.vid-timeline-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
}

.vid-timeline-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width 0.15s linear;
}

.video-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-action-desc {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
}

.desc-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  font-weight: 800;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.desc-text {
  color: var(--text-sub);
  line-height: 1.5;
}

/* ==========================================================================
   Screen 2: Plant Anatomy & Indicator Scientific Comparison
   ========================================================================== */
.plant-anatomy-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.anatomy-header-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.anatomy-header-badge::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #10b981, #3b82f6);
}

.anatomy-main-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 16px;
  flex: 1;
}

@media (max-width: 960px) {
  .anatomy-main-layout {
    grid-template-columns: 1fr;
  }
}

.anatomy-stage-box {
  background: rgba(10, 18, 32, 0.85);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.anatomy-svg-wrapper {
  width: 100%;
  max-width: 400px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.anatomy-side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.indicator-interactive-card {
  background: rgba(15, 25, 45, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.indicator-interactive-card:hover {
  background: rgba(22, 36, 64, 0.9);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.indicator-interactive-card.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.indicator-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

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

.indicator-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-optimal {
  background: #10b981;
  color: #fff;
}

.badge-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.indicator-card-desc {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.45;
}

/* Life cycle timeline at bottom */
.lifecycle-stepper-box {
  background: rgba(13, 22, 38, 0.8);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lifecycle-title {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lifecycle-steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.lifecycle-step-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 4px;
  font-family: inherit;
  font-size: 11px;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  text-align: center;
}

.lifecycle-step-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lifecycle-step-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  font-weight: 700;
}

.step-icon-emoji {
  font-size: 18px;
}

/* Pulsing markers on SVG */
@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 8px #f59e0b); }
  100% { transform: scale(1); opacity: 0.8; }
}

.marker-highlight-pulse {
  animation: pulseGlow 1.8s infinite ease-in-out;
  transform-origin: center;
}

/* ==========================================================================
   Screen 1: Dynamic Fertilizer Role Simulation View
   ========================================================================== */
.fert-role-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.fert-role-stage-box {
  background: rgba(10, 18, 32, 0.9);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.fert-sim-svg-wrapper {
  width: 100%;
  max-width: 440px;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fert-role-pills-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .fert-role-pills-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fert-role-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  text-align: right;
}

.fert-role-pill:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
  transform: translateY(-2px);
}

.fert-role-pill.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.fert-role-pill.active.is-misconception {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.fert-role-feedback-card {
  background: rgba(15, 25, 45, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.fert-role-feedback-card.correct-feedback {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 25, 45, 0.9) 100%);
}

.fert-role-feedback-card.misconception-feedback {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 25, 45, 0.9) 100%);
}

.fert-feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fert-feedback-title {
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fert-feedback-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-sub);
}

/* Animations for floating fertilizer particles */
@keyframes floatNPK {
  0% { transform: translateY(-10px); opacity: 0; }
  30% { opacity: 1; }
  80% { opacity: 0.9; }
  100% { transform: translateY(40px); opacity: 0; }
}

.npk-particle {
  animation: floatNPK 2.5s infinite ease-in;
}

@keyframes xylemFlow {
  0% { stroke-dashoffset: 60; }
  100% { stroke-dashoffset: 0; }
}

.xylem-stream {
  stroke-dasharray: 6, 6;
  animation: xylemFlow 1.2s infinite linear;
}

/* Screen 2: Scenario Executions Animations */
@keyframes ionRiseUp {
  0% { transform: translateY(12px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(-24px); opacity: 0; }
}

.ion-pulse-1 { animation: ionRiseUp 1.8s infinite ease-out; }
.ion-pulse-2 { animation: ionRiseUp 1.8s infinite ease-out 0.6s; }
.ion-pulse-3 { animation: ionRiseUp 1.8s infinite ease-out 1.2s; }

@keyframes bugCrawlMotion {
  0% { transform: translate(0, 0); }
  50% { transform: translate(5px, -3px); }
  100% { transform: translate(0, 0); }
}

@keyframes wormWiggleMotion {
  0% { transform: scaleX(0.85); }
  50% { transform: scaleX(1.15); }
  100% { transform: scaleX(0.85); }
}

.crawl-bug-1 { animation: bugCrawlMotion 2.2s infinite ease-in-out; }
.crawl-bug-2 { animation: wormWiggleMotion 1.5s infinite ease-in-out; }
.crawl-bug-3 { animation: bugCrawlMotion 2.6s infinite ease-in-out reverse; }

@keyframes starTwinkleCycle {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.star-twinkle-1 { animation: starTwinkleCycle 2s infinite ease-in-out; }
.star-twinkle-2 { animation: starTwinkleCycle 2.5s infinite ease-in-out 0.8s; }

@keyframes rayPulseGlow {
  0% { opacity: 0.5; }
  100% { opacity: 0.95; }
}

.sunbeam-ray {
  animation: rayPulseGlow 2s infinite alternate ease-in-out;
}

