/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
  /* New FLB Brand Colors */
  --flb-cyan: #0086cb;
  /* RGB 0, 134, 203 */
  --flb-blue: #00255e;
  /* RGB 0, 40, 94 */

  /* Semantic Variables - Default (Dark Mode) */
  --bg-color: var(--flb-blue);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --primary: var(--flb-cyan);
  --secondary: #10b981;
  /* Keeping green for success/correct/secondary actions */
  --quiz-accent: #f59e0b;
  --card-bg: rgba(255, 255, 255, 0.1);
  --card-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Light Mode Overrides */
body.light-mode {
  --bg-color: #ffffff;
  --text-main: var(--flb-blue);
  --text-muted: rgba(0, 37, 94, 0.75);
  --card-bg: rgba(0, 134, 203, 0.05);
  /* Very light cyan tint */
  --card-border: rgba(0, 40, 94, 0.15);
  --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Calibri', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  /* Mobile Default: Stacked */
  min-height: 100vh;
  overflow-x: hidden;
  /* Prevent horizontal scroll */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sidebar (Mobile Header) */
.sidebar {
  width: 100%;
  background: var(--card-bg);
  /* Use variable for adaptability */
  border-bottom: 1px solid var(--card-border);
  /* Separator for mobile */
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex-shrink: 0;
  /* Don't shrink */
}

.logo-area h1 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.control-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Slider Customization */
input[type=range] {
  width: 100%;
  accent-color: var(--primary);
  margin-bottom: 0.5rem;
  height: 24px;
  /* Touchable height */
}

.level-indicator {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: bold;
  text-align: center;
}

/* Mode Switcher */
.mode-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem;
  border-radius: 0.5rem;
}

.mode-btn {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-muted);
  padding: 0.75rem;
  /* Larger touch target */
  cursor: pointer;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 1rem;
}

.mode-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Light Mode Button Styles */
body.light-mode .mode-btn {
  background: #f1f5f9;
  /* Light Gray */
  color: var(--flb-blue);
  border: 1px solid #e2e8f0;
}

body.light-mode .mode-btn.active {
  background: var(--flb-cyan);
  color: white;
  border-color: var(--flb-cyan);
}

body.light-mode .mode-switch {
  background: transparent;
  gap: 0.5rem;
  /* Gap for separate buttons */
}

#viz-mode-btn {
  width: 100%;
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  text-align: center;
}

body.light-mode #viz-mode-btn {
  background: #f1f5f9;
  color: var(--flb-blue);
  border: 1px solid #e2e8f0;
}

body.light-mode #viz-mode-btn.active {
  background: var(--flb-cyan);
  color: white;
  border-color: var(--flb-cyan);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 1.5rem;
  position: relative;
  width: 100%;
}

.main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 20%);
  pointer-events: none;
  z-index: -1;
}

.section {
  display: none;
  max-width: 100%;
  /* Full width on mobile */
  margin: 0 auto;
  animation: fadeIn 0.5s ease-out;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Learning Cards */
.scenario-box {
  background: linear-gradient(135deg, rgba(0, 134, 203, 0.1), rgba(0, 134, 203, 0.05));
  /* FLB-Cyan */
  border: 1px solid rgba(0, 134, 203, 0.2);
  padding: 1.25rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

.layer-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--glass-shadow);
}

/* Disabled hover on touch devices usually, keeping for consistency */
.layer-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.layer-header {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
  /* Allow wrapping on very small screens */
  gap: 0.5rem;
  cursor: pointer;
  /* Clickable */
  user-select: none;
}

.layer-header::after {
  content: '▼';
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  margin-left: auto;
}

.layer-card.collapsed .layer-header::after {
  transform: rotate(-90deg);
}

.layer-card.collapsed .layer-header {
  border-bottom: none;
  /* Remove border when collapsed */
}

.layer-num {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  margin-right: 0.5rem;
}

.layer-content {
  padding: 1.25rem;
  transition: all 0.3s ease-in-out;
  max-height: 3000px;
  /* Increased for grid */
  overflow: hidden;
  opacity: 1;
}

.layer-card.collapsed .layer-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

/* New Grid Layout System */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
}

.layer-title-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

body.light-mode .layer-title-text {
  color: var(--flb-blue);
}

.info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
}

body.light-mode .info-card:hover {
  background: white;
}

.card-head {
  background: rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1rem;
  font-weight: bold;
  color: var(--primary);
  border-bottom: 1px solid var(--card-border);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.light-mode .card-head {
  background: rgba(0, 0, 0, 0.03);
}

.card-body {
  padding: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Semantics for specific cards */
.info-card.pros .card-head {
  color: var(--secondary);
  border-bottom-color: rgba(16, 185, 129, 0.3);
}

.info-card.cons .card-head {
  color: #f87171;
  border-bottom-color: rgba(248, 113, 113, 0.3);
}

.info-card.security .card-head {
  color: #fbbf24;
  border-bottom-color: rgba(251, 191, 36, 0.3);
}


code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 0.3rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #fbbf24;
  word-break: break-word;
  /* Handle long codes on mobile */
}

/* Quiz Styles */
.quiz-header {
  display: flex;
  flex-direction: column;
  /* Stacked header on mobile */
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.score-badge {
  background: var(--quiz-accent);
  color: black;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: bold;
  align-self: flex-start;
}

.question-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  border-radius: 1rem;
}

.question-text {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* Quiz Options Layout */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 1rem;
  /* Good touch target */
  border-radius: 0.5rem;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.option-btn.selected {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.2);
}

.option-btn.correct {
  border-color: var(--secondary);
  background: rgba(16, 185, 129, 0.2);
}

.option-btn.wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.feedback-area {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  animation: fadeIn 0.3s;
}

.feedback-correct {
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

.feedback-wrong {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid #ef4444;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  /* Larger touch area */
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  margin-top: 1.5rem;
  width: 100%;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Utils */
.hidden {
  display: none !important;
}

/* Interactive Elements */
.interactive-item {
  cursor: pointer;
  border-bottom: 1px dashed var(--text-muted);
  transition: all 0.2s;
  margin-right: 0.5rem;
  display: inline-block;
  padding: 2px 0;
  /* Slight padding for touch */
}

.interactive-item:hover {
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
}

.interactive-item.hardware {
  color: #e0f2fe;
}

body.light-mode .interactive-item.hardware {
  color: var(--flb-blue);
  font-weight: bold;
}

.interactive-item.protocol {
  font-family: 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fce7f3;
  border-bottom: none;
}

body.light-mode .interactive-item.protocol {
  color: var(--flb-blue);
  background: rgba(0, 134, 203, 0.1);
  /* Light Cyan background */
  font-weight: bold;
}

.interactive-item.protocol:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.light-mode .interactive-item.protocol:hover {
  background: rgba(0, 134, 203, 0.2);
}

/* Detail Views */
.detail-container {
  padding: 0 1.25rem 1.25rem 1.25rem;
  animation: slideDown 0.3s ease-out;
}

.detail-box {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--card-border);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 0.5rem;
  position: relative;
  box-shadow: var(--glass-shadow);
}

.detail-box.hardware {
  border-left: 3px solid var(--primary);
}

.detail-box.protocols {
  border-left: 3px solid #f472b6;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-main);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  /* Easy to tap */
  cursor: pointer;
  line-height: 1;
  padding: 0 0.5rem;
}

.close-btn:hover {
  color: white;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glossary & Tooltips */
.glossary-term {
  border-bottom: 1px dotted var(--text-muted);
  cursor: help;
  position: relative;
  color: #a5f3fc;
  font-weight: 500;
}

body.light-mode .glossary-term {
  color: var(--flb-blue);
  border-bottom-color: var(--flb-blue);
}

/* Visualization Tooltips */
.viz-info-content .interactive-item {
  position: relative;
  cursor: help;
  /* Question mark cursor */
  border-bottom: 1px dotted rgba(255, 255, 255, 0.8);
  text-decoration: none !important;
  /* No underline */
  display: inline-block;
  color: white !important;
  /* Inherit white */
}

/* Tooltip container must allow overflow if needed, but absolute positioning relates to nearest positioned ancestor. 
   If interactive-item is relative, tooltip is relative to IT. */

.viz-info-content .interactive-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  /* Move up a bit more */
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: white;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  /* Very high z-index */
  border: 1px solid var(--primary);
  text-align: center;
  pointer-events: none;
  display: block;
  /* Ensure display */
}

.glossary-term::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: normal;
  width: max-content;
  max-width: 200px;
  /* Smaller max width for mobile */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
  margin-bottom: 5px;
  font-weight: normal;
  text-align: center;
}

.glossary-term:hover::after {
  opacity: 1;
}

/* AI Prompt Box */
.ai-prompt-box {
  margin-top: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.8rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-label {
  font-weight: bold;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prompt-text {
  font-family: 'Courier New', monospace;
  background: #0f172a;
  padding: 0.6rem;
  border-radius: 4px;
  color: #e2e8f0;
  user-select: all;
  border-left: 3px solid var(--primary);
  overflow-x: auto;
  /* Scroll if too wide on mobile */
}

/* Quiz Badges & Progress */
.quiz-progress {
  display: flex;
  flex-wrap: wrap;
  /* Wrap on mobile */
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  gap: 0.5rem;
}

.badge {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  color: #1e293b;
}

.badge-easy {
  background-color: #86efac;
}

.badge-medium {
  background-color: #fca5a5;
}

.badge-hard {
  background-color: #f87171;
  color: white;
  border: 1px solid #ef4444;
}

/* End Screen Summary */
.summary-list {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

.summary-item.summary-correct {
  border-left: 3px solid var(--secondary);
}

.summary-item.summary-wrong {
  border-left: 3px solid #ef4444;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.summary-details {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.text-green {
  color: var(--secondary);
  font-weight: bold;
}

.text-red {
  color: #ef4444;
  font-weight: bold;
}

.summary-explanation {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

/* ------------------------------------------------------------------ */
/* DESKTOP OVERRIDES                                                  */
/* ------------------------------------------------------------------ */

@media (min-width: 768px) {
  body {
    flex-direction: row;
    /* Side-by-side */
    height: 100vh;
    overflow: hidden;
    /* Scroll in containers */
  }

  /* Sidebar Fixed Width */
  .sidebar {
    width: 300px;
    height: 100%;
    /* Full height */
    border-right: 1px solid var(--card-border);
    border-bottom: none;
    padding: 2rem;
    gap: 2rem;
    overflow-y: auto;
  }

  /* Main Content Area */
  .main-content {
    overflow-y: auto;
    /* Scroll inside main content */
    padding: 2rem;
  }

  .section {
    max-width: 1000px;
    /* Limit width for reading comfort */
  }

  .layer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }

  .layer-header {
    padding: 1rem 1.5rem;
  }

  .layer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Split layout for cards */
    gap: 2rem;
    padding: 1.5rem;
  }

  .quiz-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .score-badge {
    align-self: center;
  }

  .question-card {
    padding: 2rem;
  }

  .question-text {
    font-size: 1.25rem;
  }

  .detail-container {
    padding: 0 1.5rem 1.5rem 1.5rem;
  }

  .close-btn {
    font-size: 1.5rem;
  }

  .glossary-term::after {
    max-width: 250px;
  }
}

/* Impressum Link */
.impressum-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
  transition: color 0.2s, border-bottom 0.2s;
}

.impressum-link:hover {
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--glass-shadow);
}

/* Visualization Module Styles */
.viz-stage {
  display: grid;
  grid-template-columns: 1fr 0.5fr 1fr;
  gap: 1rem;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  padding: 2rem;
  border-radius: 1rem;
  min-height: 400px;
  align-items: center;
  border: 1px solid var(--card-border);
}

.viz-col-title {
  text-align: center;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Light Mode Override for specific Viz Elements if needed, 
   but Stage has dark background so white text is good. 
   Unless user meant OUTSIDE the stage? */
body.light-mode .viz-header h3 {
  color: var(--flb-blue);
}

.stack-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.viz-layer {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.5rem;
  text-align: center;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all 0.3s;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.viz-layer.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.viz-middle {
  position: relative;
  height: 100%;
  display: flex;
  justify-content: center;
}

.viz-connection-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.3;
}

.data-packet {
  position: absolute;
  font-size: 1.5rem;
  z-index: 10;
  transition: all 0.5s ease-in-out;
  /* Default position hidden or centered */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.data-packet.visible {
  opacity: 1;
}

/* Info Popup */
/* Info Popup */
.viz-info-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--primary);
  border-radius: 0.5rem;
  padding: 1.5rem;
  width: 300px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 20;
  backdrop-filter: blur(10px);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: white !important;
  /* Force white text */
}

@keyframes popIn {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }

  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.viz-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
  color: white !important;
  /* Force white header */
}

.viz-info-row {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.viz-select {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  padding: 0.5rem;
  border-radius: 0.5rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .viz-stage {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 2rem;
  }

  .viz-middle {
    height: 50px;
    /* Space for packet to travel between stacks visually if we stacked them vertically */
    display: none;
    /* Hide middle line on mobile for simpler vertical stacking? Or keep it? */
  }

  /* On mobile, maybe better to just use absolute positioning relative to container for packet? 
       Actually, the grid columns 1fr 0.5fr 1fr is hard on mobile.
       Let's stack: Client Top, Server Bottom.
    */

  .viz-stage {
    display: flex;
    flex-direction: column;
  }

  .viz-middle {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--card-border);
    margin: 1rem 0;
  }

  .data-packet {
    /* Packet will need custom positioning logic on mobile or simple center */
  }
}