:root {
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --bg-card: #1e293b;
  --bg-panel: #0f172a;
  --border-color: #334155;
  --border-glow: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #0ea5e9;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --arduino-teal: #00979d;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Top Header & Navbar */
.top-header {
  background: linear-gradient(90deg, #090d16 0%, #0f172a 50%, #091e26 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  flex-wrap: wrap;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--arduino-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(0, 151, 157, 0.5);
}

.brand-title h1 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge-license {
  font-size: 0.66rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}

.brand-title p {
  font-size: 0.73rem;
  color: var(--text-secondary);
}

.main-nav {
  display: flex;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.85);
  padding: 0.3rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  max-width: 100%;
}

.nav-tab {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.48rem 0.82rem;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--arduino-teal), var(--accent-blue));
  color: #fff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.student-selector {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.xp-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Main View Container */
.view-section {
  display: none;
  flex: 1;
  padding: 1.2rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.view-section.active {
  display: block;
}

.view-section.lab-view.active {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 1rem;
  min-height: calc(100vh - 68px);
  max-width: 100%;
}

/* Textbook / Zero-to-Hero Training Set View */
.course-switcher-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.course-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.course-pill.active {
  border-color: var(--arduino-teal);
  background: rgba(0, 151, 157, 0.18);
  color: #fff;
}

.textbook-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.module-nav-list {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 80px;
}

.module-nav-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  padding: 0.7rem 0.8rem;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
}

.module-nav-btn:hover {
  border-color: var(--accent-blue);
}

.module-nav-btn.active {
  background: linear-gradient(135deg, rgba(0, 151, 157, 0.28), rgba(14, 165, 233, 0.2));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

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

.textbook-section-block {
  background: rgba(15, 23, 42, 0.65);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.textbook-section-block h3 {
  color: #38bdf8;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.textbook-section-block p {
  font-size: 0.92rem;
  color: #e2e8f0;
  white-space: pre-line;
}

.activities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-top: 1.35rem;
}

.tf-card,
.fb-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
}

.tf-btn-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.fill-input {
  background: #090d16;
  border: 1.5px solid #475569;
  color: #38bdf8;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  width: 150px;
}

/* Curriculum View */
.curriculum-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.week-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.35rem;
}

.week-card-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--text-primary);
}

.week-card-tab:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.week-card-tab.active {
  background: linear-gradient(180deg, rgba(0, 151, 157, 0.25) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-color: var(--arduino-teal);
  box-shadow: 0 0 20px rgba(0, 151, 157, 0.25);
}

.week-card-tab .week-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: block;
}

.week-card-tab h3 {
  font-size: 0.96rem;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.week-card-tab p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.curriculum-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.2rem;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem;
}

.panel-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #38bdf8;
}

.lesson-step {
  background: rgba(15, 23, 42, 0.65);
  border-left: 4px solid var(--arduino-teal);
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.85rem;
}

.lesson-step h4 {
  font-size: 0.93rem;
  color: #f8fafc;
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.lesson-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.code-snippet {
  background: #090d16;
  border: 1px solid #1e293b;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  color: #e2e8f0;
  overflow-x: auto;
  white-space: pre;
}

.interactive-widget-box {
  background: linear-gradient(145deg, #0f172a, #17253b);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 1.1rem;
  margin-bottom: 1.2rem;
}

.widget-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.control-row input[type="range"] {
  flex: 1;
  min-width: 120px;
  accent-color: var(--accent-cyan);
}

.widget-readout {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.83rem;
}

/* Virtual Lab Layout */
.lab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  margin-bottom: 0.65rem;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.btn {
  background: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.8rem;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent-blue);
  background: rgba(14, 165, 233, 0.12);
}

.btn-run {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: #34d399;
  color: #fff;
}

.btn-stop {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border-color: #f87171;
  color: #fff;
}

.btn-grade {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  border-color: #a78bfa;
  color: #fff;
}

.lab-workspace {
  display: grid;
  grid-template-columns: 245px 1fr 410px;
  gap: 0.65rem;
  flex: 1;
  min-height: 540px;
}

.palette-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 0.55rem 0.8rem;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.palette-list {
  padding: 0.55rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.palette-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.palette-item:hover {
  border-color: var(--arduino-teal);
  background: rgba(0, 151, 157, 0.12);
}

.palette-icon { font-size: 1.35rem; margin-bottom: 0.2rem; }
.palette-name { font-size: 0.7rem; font-weight: 600; color: var(--text-primary); }
.palette-desc { font-size: 0.62rem; color: var(--text-muted); }

.canvas-column {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 440px;
}

.circuit-stage-wrapper {
  position: relative;
  flex: 1;
  min-height: 360px;
  background-color: #0b1322;
  background-image:
    radial-gradient(rgba(56, 189, 248, 0.16) 1px, transparent 1px),
    linear-gradient(to right, rgba(30, 41, 59, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 41, 59, 0.35) 1px, transparent 1px);
  background-size: 20px 20px, 100px 100px, 100px 100px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: auto;
  user-select: none;
  touch-action: pan-x pan-y;
}

.wire-svg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 820px;
  min-height: 420px;
  pointer-events: none;
  z-index: 15;
}

.wire-path {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  cursor: pointer;
}

.wire-path:hover {
  stroke-width: 5.5;
  filter: drop-shadow(0 0 6px #fff);
}

.wire-active-flow {
  stroke-dasharray: 8 6;
  animation: currentFlow 0.6s linear infinite;
}

@keyframes currentFlow {
  to { stroke-dashoffset: -14; }
}

.components-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 820px;
  min-height: 420px;
  z-index: 10;
}

.circuit-node {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid #334155;
  border-radius: 10px;
  padding: 0.45rem;
  cursor: grab;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  touch-action: none;
}

.circuit-node.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.35);
}

.circuit-node.erc-error {
  border-color: var(--accent-red);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.7);
}

.node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.69rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.3rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.node-delete-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 0.25rem;
}

.node-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.node-slider-box {
  margin-top: 0.35rem;
  width: 100%;
  background: rgba(9, 13, 22, 0.85);
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #1e293b;
  font-size: 0.68rem;
  color: #38bdf8;
}

.node-slider-box input[type="range"] {
  width: 100%;
  height: 6px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.pins-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  justify-content: center;
  margin-top: 0.4rem;
}

.pin-terminal {
  background: #1e293b;
  border: 1.5px solid #64748b;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.22rem 0.42rem;
  border-radius: 4px;
  cursor: crosshair;
}

.pin-terminal:hover,
.pin-terminal.pin-active-source {
  background: var(--accent-cyan);
  color: #090d16;
  border-color: #fff;
  transform: scale(1.1);
}

.pin-terminal.pin-power { border-color: #ef4444; color: #fca5a5; }
.pin-terminal.pin-gnd { border-color: #94a3b8; background: #090d16; }
.pin-terminal.pin-high { background: rgba(16, 185, 129, 0.28); border-color: #10b981; color: #6ee7b7; }

.canvas-overlay-top {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 25;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mission-active-banner,
.erc-alert-banner {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.76rem;
  max-width: 480px;
}

.erc-alert-banner {
  border-color: var(--accent-red);
  background: rgba(127, 29, 29, 0.94);
  color: #fecaca;
  display: none;
}

.erc-alert-banner.visible { display: block; }

.telemetry-bar {
  height: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 215px 1fr;
  overflow: hidden;
}

.multimeter-box {
  padding: 0.6rem 0.75rem;
  border-right: 1px solid var(--border-color);
  background: #090d16;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dmm-screen {
  background: #1a2e1a;
  border: 2px solid #334155;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  font-family: var(--font-mono);
  color: #4ade80;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.dmm-value { font-size: 1.2rem; font-weight: 800; }
.scope-box { position: relative; background: #060b14; display: flex; flex-direction: column; }
#scopeCanvas { width: 100%; height: 105px; display: block; }

.code-column {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 420px;
}

.editor-panel {
  flex: 1.3;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 240px;
}

.editor-container {
  position: relative;
  flex: 1;
  display: flex;
  background: #090d16;
  overflow: hidden;
}

.line-numbers {
  width: 36px;
  padding: 0.7rem 0.35rem;
  background: #0f172a;
  color: #475569;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: right;
  user-select: none;
  border-right: 1px solid #1e293b;
}

#arduinoCodeEditor {
  flex: 1;
  background: transparent;
  color: #e2e8f0;
  border: none;
  padding: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.45;
  resize: none;
  outline: none;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}

.serial-panel {
  flex: 0.75;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 140px;
}

.serial-output {
  flex: 1;
  background: #05080f;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #34d399;
  overflow-y: auto;
  white-space: pre-wrap;
}

.missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.mission-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mission-card.completed {
  border-color: var(--accent-green);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, var(--bg-card) 100%);
}

.mission-difficulty {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.diff-easy { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.diff-medium { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.diff-hard { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.classroom-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.2rem;
}

.leaderboard-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.leaderboard-table th, .leaderboard-table td {
  padding: 0.6rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}
.leaderboard-table th { color: var(--text-secondary); font-size: 0.74rem; text-transform: uppercase; }
.leaderboard-table tr.active-student-row { background: rgba(14, 165, 233, 0.15); }

.rank-badge {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.74rem;
  background: #334155;
}
.rank-1 { background: #f59e0b; color: #090d16; }
.rank-2 { background: #94a3b8; color: #090d16; }
.rank-3 { background: #b45309; color: #fff; }

.badges-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.badge-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  opacity: 0.45;
}
.badge-item.unlocked {
  opacity: 1;
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  max-width: 540px;
  width: 100%;
  padding: 1.4rem;
}
.check-list { list-style: none; margin: 1rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.check-item { padding: 0.55rem 0.75rem; border-radius: 8px; font-size: 0.84rem; display: flex; align-items: center; gap: 0.5rem; }
.check-pass { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.check-fail { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); color: #fca5a5; }

/* Mobil & Tablet Tam Uyumluluk (Responsive) */
@media (max-width: 1150px) {
  .lab-workspace {
    grid-template-columns: 1fr;
  }
  .palette-list {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    max-height: 170px;
  }
  .textbook-layout,
  .curriculum-grid,
  .classroom-layout,
  .activities-grid {
    grid-template-columns: 1fr;
  }
  .module-nav-list {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }
  .module-nav-btn {
    min-width: 200px;
  }
  .week-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .top-header {
    padding: 0.55rem 0.75rem;
  }
  .main-nav {
    order: 3;
    width: 100%;
  }
  .week-tabs,
  .badges-grid,
  .telemetry-bar {
    grid-template-columns: 1fr;
  }
  .telemetry-bar {
    height: auto;
  }
  .pin-terminal {
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
  }
}

/* =========================================================
   AÇIK TEMA (LIGHT THEME) STİLLERİ & TEMATİK DEĞİŞKENLER
   ========================================================= */
body[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-panel: #ffffff;
  --border-color: #cbd5e1;
  --border-glow: #0284c7;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --arduino-teal: #007f86;
}

body[data-theme="light"] .top-header {
  background: #ffffff;
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .nav-tab {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

body[data-theme="light"] .nav-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body[data-theme="light"] .nav-tab.active {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

body[data-theme="light"] .panel-card,
body[data-theme="light"] .palette-panel,
body[data-theme="light"] .editor-panel,
body[data-theme="light"] .serial-panel,
body[data-theme="light"] .module-content-card,
body[data-theme="light"] .module-nav-list,
body[data-theme="light"] .course-switcher-bar,
body[data-theme="light"] .modal-card,
body[data-theme="light"] .interactive-widget-box,
body[data-theme="light"] .lesson-step,
body[data-theme="light"] .week-card-tab {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body[data-theme="light"] .circuit-stage-wrapper {
  background-color: #f8fafc;
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  border-color: #cbd5e1;
}

body[data-theme="light"] .sim-node {
  background: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .sim-node-header {
  background: #f1f5f9;
  border-bottom-color: #cbd5e1;
  color: #0f172a;
}

body[data-theme="light"] .btn {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

body[data-theme="light"] .btn:hover {
  background: #e2e8f0;
}

body[data-theme="light"] .btn-run {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

body[data-theme="light"] .btn-run:hover {
  background: #0369a1;
}

body[data-theme="light"] .btn-grade {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

body[data-theme="light"] .btn-grade:hover {
  background: #047857;
}

body[data-theme="light"] .multimeter-box {
  background: #ffffff;
  border-color: #cbd5e1;
}

body[data-theme="light"] .dmm-screen {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0284c7;
}

body[data-theme="light"] .dmm-value {
  color: #0369a1;
}

body[data-theme="light"] .scope-box {
  border-color: #cbd5e1;
}

body[data-theme="light"] .student-selector {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

body[data-theme="light"] .editor-container {
  background: #f8fafc;
}

body[data-theme="light"] #arduinoCodeEditor {
  background: #ffffff;
  color: #0f172a;
}

body[data-theme="light"] .line-numbers {
  background: #f1f5f9;
  color: #64748b;
  border-right-color: #cbd5e1;
}

body[data-theme="light"] .serial-output {
  background: #f8fafc;
  color: #0f172a;
}

body[data-theme="light"] .code-snippet {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

body[data-theme="light"] .course-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

body[data-theme="light"] .course-pill.active {
  background: #e0f2fe;
  border-color: #0284c7;
}

body[data-theme="light"] .module-nav-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

body[data-theme="light"] .module-nav-btn:hover {
  background: #f1f5f9;
}

body[data-theme="light"] .module-nav-btn.active {
  background: #e0f2fe;
  border-color: #0284c7;
  border-left-color: #0284c7;
}

body[data-theme="light"] .leaderboard-table th {
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-color: #cbd5e1;
}

body[data-theme="light"] .leaderboard-table td {
  border-bottom-color: #e2e8f0;
  color: #1e293b;
}

body[data-theme="light"] .leaderboard-table tr:hover {
  background: #f8fafc;
}

/* =========================================================
   GÖRSEL VE İLLÜSTRASYON KARTLARI (GERÇEK FOTOĞRAFLAR)
   ========================================================= */
.real-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.real-photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.real-photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.real-photo-img-wrapper {
  background: #ffffff;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  border-bottom: 1px solid var(--border-color);
}

.real-photo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.real-photo-body {
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.real-photo-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.real-photo-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Tema Değiştirme Butonu */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
}

/* Örnek Projeler Çubuğu */
.project-gallery-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.2rem;
  margin-bottom: 0.75rem;
}

.project-preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.project-preset-pill:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  transform: translateY(-1px);
}


/* ==========================================================================
   V6 EKLENTİLERİ: ZOOM & PAN, SERIAL PLOTTER, PATLAMA EFEKTİ, ETKİNLİKLER & HESAPLAYICILAR
   ========================================================================== */

/* Zoom & Pan Dönüşüm Katmanı */
.stage-transform-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: top left;
  pointer-events: auto;
}

/* Güvenli Patlama / Yanma Uyarısı (Aşırı Akım Alan LED / Bileşen) */
.blown-component {
  animation: componentBlownShake 0.4s infinite alternate ease-in-out !important;
  filter: drop-shadow(0 0 16px #ef4444) !important;
  border-radius: 8px;
  outline: 2px dashed #ef4444;
}

.blown-component::after {
  content: "💥 YANDI! (Aşırı Akım)";
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@keyframes componentBlownShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-2px, 1px) rotate(-1.5deg); }
  100% { transform: translate(2px, -1px) rotate(1.5deg); }
}

/* Seri Port / Plotter Sekme Butonları */
.serial-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.serial-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.serial-tab-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.serial-plotter-box {
  background: #060911;
  padding: 0.75rem;
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#plotterCanvas {
  width: 100%;
  height: 140px;
  background: #090e1a;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: block;
}

.plotter-tip {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Etkinlik Sekmeleri */
.activity-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.activity-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.activity-tab-btn:hover {
  color: var(--text-primary);
  border-color: #38bdf8;
}

.activity-tab-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.activity-sub-section {
  width: 100%;
}

.activity-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
}

/* 1. Etkinlik: Çarkıfelek Düzeni */
.wheel-activity-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .wheel-activity-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

.wheel-display-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.wheel-canvas-container {
  position: relative;
  display: inline-block;
  padding: 8px;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  color: #ef4444;
  z-index: 20;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

#wheelCanvas {
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 6px #1e293b, 0 0 0 8px #38bdf8;
  max-width: 100%;
  height: auto;
  display: block;
  background: #090e1a;
}

.wheel-result-col {
  width: 100%;
}

.wheel-answer-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid #10b981;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

/* 2. Etkinlik: Kelime Bulmacası (Scramble) */
.letter-tiles-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.letter-tile {
  width: 44px;
  height: 48px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid #0ea5e9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  user-select: none;
  transition: transform 0.15s ease;
}

.letter-tile:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
}

/* 3. Etkinlik: Hafıza Kartları (Memory Match) */
.memory-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .memory-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.memory-card {
  height: 105px;
  perspective: 1000px;
  cursor: pointer;
  user-select: none;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.45s ease;
  transform-style: preserve-3d;
  border-radius: 8px;
}

.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.memory-card-front {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  color: #38bdf8;
  font-size: 1.6rem;
}

.memory-card-front:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.memory-card-back {
  background: var(--bg-panel);
  border: 2px solid #38bdf8;
  transform: rotateY(180deg);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.memory-card.matched .memory-card-back {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

/* 4. Etkinlik: Hızlı Flaş Kartlar (Flashcards) */
.flashcard-flipper {
  position: relative;
  min-height: 240px;
  width: 100%;
  cursor: pointer;
  perspective: 1000px;
  margin: 1.25rem 0;
  user-select: none;
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.5s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.flashcard-front {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #38bdf8;
  transform: rotateY(0deg);
}

.flashcard-back {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  border: 1px solid #10b981;
  transform: rotateY(180deg);
}

.flashcard-flipper.flipped .flashcard-front {
  transform: rotateY(-180deg);
}

.flashcard-flipper.flipped .flashcard-back {
  transform: rotateY(0deg);
}

/* Canlı Hesaplayıcılar Modal Sekmeleri */
.calc-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.calc-tab-btn:hover {
  border-color: #38bdf8;
  color: var(--text-primary);
}

.calc-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.calc-panel {
  width: 100%;
}

/* ========================================================
   Üst Logo Alanı Açık / Koyu Tema Butonu
======================================================== */
.theme-logo-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--text-primary);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-left: 0.6rem;
  user-select: none;
}

.theme-logo-badge-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.theme-badge-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.theme-badge-text {
  letter-spacing: 0.3px;
}

body[data-theme="light"] .theme-logo-badge-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .theme-logo-badge-btn:hover {
  background: #e2e8f0;
  border-color: #0284c7;
  color: #0284c7;
}

/* ========================================================
   5. Etkinlik: İnteraktif Kahoot-Tarzı Sınıf Quiz Arenası
======================================================== */
.quiz-arena-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.quiz-timer-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.quiz-timer-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  transition: width 0.1s linear;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  .quiz-options-grid {
    grid-template-columns: 1fr;
  }
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.quiz-option-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

.quiz-option-btn.opt-0 { border-left-width: 6px; border-left-color: #ef4444; }
.quiz-option-btn.opt-1 { border-left-width: 6px; border-left-color: #3b82f6; }
.quiz-option-btn.opt-2 { border-left-width: 6px; border-left-color: #f59e0b; }
.quiz-option-btn.opt-3 { border-left-width: 6px; border-left-color: #10b981; }

.quiz-option-btn.correct {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

.quiz-option-btn.wrong {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

.quiz-opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ========================================================
   6. Etkinlik: Şematik Sembol Avı (Symbol Hunt)
======================================================== */
.symbol-hunt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: 1.25rem;
}

@media (max-width: 800px) {
  .symbol-hunt-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.symbol-card {
  background: var(--bg-panel);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.symbol-card:hover:not(.answered) {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  transform: translateY(-2px);
}

.symbol-card.answered {
  opacity: 0.85;
  cursor: default;
}

.symbol-card.answered.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.symbol-card.answered.wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.symbol-svg-box {
  width: 80px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.symbol-svg-box svg {
  max-width: 100%;
  max-height: 100%;
}

/* ========================================================
   7. Etkinlik: Doğru / Yanlış Hızlı Seri Maratonu
======================================================== */
.marathon-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.marathon-prompt-box {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
  padding: 1rem;
}

.marathon-btn-row {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.marathon-btn {
  flex: 1;
  max-width: 220px;
  padding: 0.95rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.marathon-btn-true {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.marathon-btn-true:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.55);
}

.marathon-btn-false {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.marathon-btn-false:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.55);
}

body[data-theme="light"] .quiz-arena-box,
body[data-theme="light"] .marathon-card,
body[data-theme="light"] .symbol-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body[data-theme="light"] .quiz-option-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

body[data-theme="light"] .quiz-option-btn:hover:not(:disabled) {
  background: #f1f5f9;
}
