:root {
  --bg-main: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #1a253f;
  --bg-subtle: #1e293b;
  --border-color: #243452;
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.15);
  --accent-amber: #f59e0b;
  --accent-amber-subtle: rgba(245, 158, 11, 0.15);
  --accent-rose: #f43f5e;
  --accent-rose-subtle: rgba(244, 63, 94, 0.15);
  --accent-purple: #8b5cf6;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

/* Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--border-color);
}

.header-left h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 8px 0 6px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 580px;
}

.subtitle strong {
  color: var(--accent-cyan);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pulse-badge {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
  animation: pulse-glow 2s infinite ease-in-out;
}

.bg-emerald {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.bg-rose {
  background: rgba(244, 63, 94, 0.18) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(244, 63, 94, 0.4) !important;
}

.bg-amber {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

/* Header Stats */
.header-stats {
  display: flex;
  gap: 14px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 105px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-card.highlight {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 100%);
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* Navigation Tabs */
.nav-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 28px 0 32px;
}

@media (min-width: 1100px) {
  .nav-tabs {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 560px) {
  .nav-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nav-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
}

.nav-tab:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.nav-tab:hover {
  background: var(--bg-card-hover);
  border-color: #3b4e72;
  transform: translateY(-2px);
}

.nav-tab.active {
  background: linear-gradient(180deg, #1d2b49 0%, var(--bg-card) 100%);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.tab-icon {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.tab-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  overflow-wrap: break-word;
  hyphens: auto;
}

.tab-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Tab Contents */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.tab-content.active {
  display: block;
}

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

/* TAB 1: 30-Sekunden Methode Hero */
.hero-guide {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.guide-header {
  background: linear-gradient(135deg, #162238 0%, #0f172a 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}

.guide-header h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #fff;
}

.guide-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.guide-header strong {
  color: var(--accent-rose);
}

/* 4 Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card.highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
}

.step-number {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--accent-primary);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
}

.step-card.highlight .step-number {
  background: var(--accent-emerald);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.step-card h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-top: 4px;
}

.step-card p, .step-card ul {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.step-card ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.example-box, .formula-box {
  background: var(--bg-subtle);
  border: 1px solid #2a3a58;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.formula-box {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  text-align: center;
  color: #93c5fd;
  font-size: 1rem;
}

.arrow {
  color: var(--accent-cyan);
  font-weight: bold;
}

.micro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.micro-table td {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.micro-table td:first-child {
  color: var(--text-muted);
  width: 45%;
}

.micro-table td:last-child {
  color: var(--text-primary);
}

/* Scratchpad Banner */
.scratchpad-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #172554 100%);
  border: 1px solid #4338ca;
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  display: flex;
  gap: 24px;
  box-shadow: 0 4px 20px rgba(67, 56, 202, 0.2);
}

.banner-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.banner-content {
  flex: 1;
}

.banner-content h3 {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 8px;
}

.banner-content p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.scratchpad-display {
  background: #090d16;
  border: 1px solid #2d3748;
  border-radius: var(--radius-md);
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.scratchpad-display .row {
  display: flex;
  border-bottom: 1px solid #1f2937;
}

.scratchpad-display .row:last-child {
  border-bottom: none;
}

.scratchpad-display .row.highlight {
  background: rgba(16, 185, 129, 0.12);
}

.scratchpad-display .cell {
  flex: 1;
  min-width: 65px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  border-right: 1px solid #1f2937;
}

.scratchpad-display .cell:last-child {
  border-right: none;
}

.scratchpad-display .cell.header {
  flex: 1.5;
  min-width: 120px;
  text-align: left;
  font-weight: 700;
  color: #94a3b8;
  background: #0f172a;
}

.scratchpad-display .row.highlight .cell {
  color: #34d399;
  font-weight: 700;
}

.tip-text {
  color: #fcd34d !important;
  font-size: 0.9rem !important;
  margin-bottom: 0 !important;
}

/* Host Formula Card */
.host-formula-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.host-formula-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #fff;
}

.formula-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.f-step {
  flex: 1;
  min-width: 180px;
  background: var(--bg-subtle);
  border: 1px solid #2e3c59;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.88rem;
  position: relative;
}

.f-step.highlight {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.f-num {
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--accent-primary);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* TAB 2: Trainer / Practice */
.trainer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.trainer-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

/* Question Container */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.question-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.question-difficulty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.question-body h3 {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.4;
}

.ip-highlight-box {
  background: #090d16;
  border: 1px solid #283754;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
}

.ip-highlight-box .ip-text {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.ip-highlight-box .ip-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Inputs Form */
.question-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.input-field-group label .field-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.input-field-group input,
.input-field-group select {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

.input-field-group input:focus,
.input-field-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.input-field-group input.correct {
  border-color: var(--accent-emerald) !important;
  background: var(--accent-emerald-subtle) !important;
  color: #34d399 !important;
}

.input-field-group input.incorrect {
  border-color: var(--accent-rose) !important;
  background: var(--accent-rose-subtle) !important;
  color: #fb7185 !important;
}

/* Multiple choice buttons */
.mc-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.mc-option {
  background: var(--bg-subtle);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc-option:hover {
  background: var(--bg-card-hover);
  border-color: #3b4e72;
}

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

.mc-option.correct {
  border-color: var(--accent-emerald) !important;
  background: var(--accent-emerald-subtle) !important;
  color: #34d399 !important;
}

.mc-option.incorrect {
  border-color: var(--accent-rose) !important;
  background: var(--accent-rose-subtle) !important;
  color: #fb7185 !important;
}

/* Actions */
.question-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.btn-accent:hover {
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: #475569;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.15rem;
  border-radius: var(--radius-lg);
}

/* Feedback message */
.feedback-box {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  animation: fadeIn 0.2s ease-in-out;
}

.feedback-box.correct {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.feedback-box.incorrect {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.feedback-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.feedback-text h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.feedback-text p {
  font-size: 0.9rem;
  opacity: 0.95;
}

/* Solution Explanation Box */
.solution-box {
  background: #090d16;
  border: 1px solid #27354f;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 12px;
}

.solution-box h4 {
  color: var(--accent-amber);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.solution-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.92rem;
  color: #cbd5e1;
}

.solution-step {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.sol-bullet {
  background: #25334d;
  color: #94a3b8;
  font-weight: 800;
  font-size: 0.75rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sol-content strong {
  color: #fff;
}

.sol-content code {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* TAB 3: Exam Mode */
.exam-intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 680px;
  margin: 30px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.exam-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.exam-intro-card h2 {
  font-size: 2rem;
  color: #fff;
}

.exam-intro-card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.exam-rules {
  list-style: none;
  text-align: left;
  background: var(--bg-subtle);
  border: 1px solid #2a3a5a;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.exam-hint-note {
  font-size: 0.85rem;
  color: #7dd3fc;
  max-width: 100%;
}

.exam-active-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.exam-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 18px;
}

.exam-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 250px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

.exam-timer-box {
  background: #090d16;
  border: 1px solid #ef4444;
  color: #f87171;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.exam-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Exam Result Card */
.exam-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 800px;
  margin: 0 auto;
}

.result-summary-box {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid #2e3d5a;
  background: linear-gradient(180deg, #182238 0%, var(--bg-card) 100%);
}

.grade-badge {
  display: inline-block;
  font-size: 2.8rem;
  font-weight: 900;
  font-family: var(--font-mono);
  padding: 10px 28px;
  border-radius: var(--radius-md);
  margin: 12px 0;
}

.grade-badge.grade-1 { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 2px solid #10b981; }
.grade-badge.grade-2 { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 2px solid #3b82f6; }
.grade-badge.grade-3 { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 2px solid #f59e0b; }
.grade-badge.grade-4 { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 2px solid #f97316; }
.grade-badge.grade-5 { background: rgba(244, 63, 94, 0.2); color: #f87171; border: 2px solid #f43f5e; }

.ihk-verdict {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.result-review-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item {
  background: var(--bg-subtle);
  border: 1px solid #2c3a54;
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.review-item.pass { border-left: 4px solid var(--accent-emerald); }
.review-item.fail { border-left: 4px solid var(--accent-rose); }
.review-item.partial { border-left: 4px solid var(--accent-amber); }

/* TAB 4: Calculator */
.calc-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

.calc-input-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.calc-input-bar .input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.calc-input-bar label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.calc-input-bar input,
.calc-input-bar select {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  outline: none;
}

.calc-results-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.calc-data-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calc-data-card .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.calc-data-card .val {
  font-size: 1.25rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.calc-data-card .note {
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

/* TAB 5: Cheatsheet */
.cheatsheet-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cheatsheet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.powers-container h3,
.rfc-container h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 14px;
}

.powers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 10px;
}

.power-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.power-card.highlight {
  border-color: var(--accent-amber);
  background: var(--accent-amber-subtle);
}

.power-card .exp {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.power-card .val {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.cheatsheet-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--bg-card);
  font-size: 0.92rem;
}

.cheatsheet-table th {
  background: #0f172a;
  padding: 14px 18px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.cheatsheet-table td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.cheatsheet-table tr:last-child td {
  border-bottom: none;
}

.cheatsheet-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.cheatsheet-table tr.highlight-row td {
  background: rgba(59, 130, 246, 0.08);
  font-weight: 600;
}

.badge-sw {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* RFC Grid */
.rfc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.rfc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rfc-card.special {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

.rfc-card h4 {
  font-size: 1.05rem;
  color: #fff;
}

.rfc-card .ip-range code {
  color: var(--accent-cyan);
}

.rfc-card .cidr {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.main-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.hidden {
  display: none !important;
}

/* Print Styles */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .main-header, .nav-tabs, .btn, .main-footer {
    display: none !important;
  }

  .tab-content {
    display: none !important;
  }

  #tab-cheatsheet, #tab-method {
    display: block !important;
  }

  .step-card, .cheatsheet-table, .powers-grid, .rfc-card {
    border: 1px solid #999 !important;
    color: #000 !important;
  }

  .cheatsheet-table th {
    background: #eee !important;
    color: #000 !important;
  }

  .cheatsheet-table td, code {
    color: #000 !important;
  }
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .app-container {
    padding: 16px 12px 60px;
  }
  .main-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-stats {
    width: 100%;
    justify-content: space-between;
  }
  .nav-tab {
    padding: 10px 12px;
  }
  .question-card {
    padding: 20px 16px;
  }
  .formula-steps {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   Bit-Labor & Visualizer Styles
   ========================================================================== */
.bitlab-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.bitlab-studio {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.studio-controls {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-subtle);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border: 1px solid #283754;
}

.studio-controls .control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.studio-controls label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.studio-controls input[type="text"] {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-size: 1.1rem;
}

.cidr-slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
  height: 8px;
}

.sub-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* 32-Bit Grid */
.bit-grid-container {
  background: #080c14;
  border: 1px solid #233148;
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legend-bar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-bottom: 1px solid #1c2638;
  padding-bottom: 12px;
}

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

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.legend-color.net { background: #3b82f6; }
.legend-color.host { background: #10b981; }
.legend-line {
  width: 3px;
  height: 16px;
  background: #ef4444;
}

.bit-grid-mount {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.octet-block {
  background: var(--bg-subtle);
  border: 1px solid #273752;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.octet-block-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.octet-block-header .octet-dec {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
}

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

.bit-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  border-radius: 4px;
  font-family: var(--font-mono);
  border: 1px solid transparent;
  position: relative;
  transition: all 0.2s;
}

.bit-box .bit-val {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.bit-box .bit-weight {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.bit-box.is-net {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.bit-box.is-net .bit-weight {
  color: #60a5fa;
}

.bit-box.is-host {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.bit-box.is-host .bit-weight {
  color: #34d399;
}

.bit-box.boundary-bit {
  box-shadow: inset -3px 0 0 #ef4444;
}

/* Bitwise Math Display */
.bitwise-breakdown-card {
  background: #090d16;
  border: 1px solid #233148;
  border-radius: var(--radius-md);
  padding: 20px;
}

.bitwise-breakdown-card h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 14px;
}

.binary-math-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  overflow-x: auto;
}

.math-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  border-radius: 4px;
}

.math-row.and-op {
  border-top: 1px dashed #334155;
  background: rgba(59, 130, 246, 0.08);
}

.math-row.or-op {
  background: rgba(16, 185, 129, 0.08);
}

.math-label {
  width: 140px;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.math-bits {
  color: #f8fafc;
  letter-spacing: 0.08em;
}

.math-bits .bit-1 { color: #60a5fa; font-weight: 700; }
.math-bits .bit-0 { color: #64748b; }
.math-bits .bit-host-1 { color: #34d399; font-weight: 700; }

.math-dec {
  color: var(--accent-cyan);
  font-weight: 700;
  margin-left: auto;
}

/* AHA Card */
.aha-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #172554 100%);
  border: 1px solid #4338ca;
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  display: flex;
  gap: 22px;
}

.aha-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.aha-content h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 8px;
}

.aha-content p {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.bit-weights-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.weight-box {
  flex: 1;
  min-width: 65px;
  background: #090d16;
  border: 1px solid #312e81;
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weight-box .w-label {
  font-size: 0.72rem;
  color: #818cf8;
}

.weight-box .w-val {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

/* Interactive Byte Clicker Widget */
.bit-toggle-trainer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.bit-toggle-trainer h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 6px;
}

.bit-toggle-trainer p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.interactive-byte-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.byte-bits-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bit-toggle-btn {
  flex: 1;
  min-width: 60px;
  background: var(--bg-subtle);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  transition: all 0.2s;
}

.bit-toggle-btn:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.bit-toggle-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.bit-toggle-btn .btn-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-muted);
}

.bit-toggle-btn.active .btn-val {
  color: #60a5fa;
}

.bit-toggle-btn .btn-weight {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.byte-result-box {
  background: #090d16;
  border: 1px solid #233148;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.byte-res-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.byte-res-val {
  font-size: 1.8rem;
  font-family: var(--font-mono);
  font-weight: 900;
  color: var(--accent-cyan);
}

.byte-res-calc {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ==========================================================================
   Storage & Units (kB vs KiB) Styles
   ========================================================================== */
.storage-section, .cases-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.rules-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-card.highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
}

.rule-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.factor-pill {
  display: inline-block;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  width: fit-content;
}

.factor-pill.highlight {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.rule-card ul {
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rule-math-box {
  background: var(--bg-subtle);
  border: 1px solid #293853;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #93c5fd;
  margin-top: auto;
}

/* Storage Converter */
.storage-converter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.converter-input-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.converter-input-row input {
  flex: 1;
  min-width: 160px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  outline: none;
}

.converter-input-row select {
  flex: 1.5;
  min-width: 240px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
  outline: none;
}

.conversion-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.conversion-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--bg-subtle);
  font-size: 0.9rem;
}

.conversion-table th {
  background: #0f172a;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.conversion-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.conversion-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.conversion-table .unit-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}

.conversion-table .unit-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.conversion-table .unit-math {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Curatia Task Breakdown */
.curatia-task-breakdown {
  background: linear-gradient(135deg, #131d33 0%, #0e1626 100%);
  border: 1px solid #2a3d61;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.task-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  width: fit-content;
}

.subtask-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.subtask-card h4 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.task-calc-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.t-step {
  background: var(--bg-subtle);
  border-left: 3px solid #3b82f6;
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
}

.t-step.highlight {
  border-left-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.t-step.res {
  border-left-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
}

.step-lbl {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.res-highlight {
  font-size: 1.25rem;
  font-family: var(--font-mono);
  color: #34d399;
}

/* ==========================================================================
   AP1 Original Cases Styles
   ========================================================================== */
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.case-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.case-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.case-header h3 {
  font-size: 1.3rem;
  color: #fff;
}

.case-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Form Solution (Case 1) */
.form-solution-box {
  background: #090d16;
  border: 1px solid #243553;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-sol {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.form-row-sol:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.form-row-sol .f-label {
  width: 140px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-row-sol .f-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: #34d399;
  min-width: 180px;
}

.form-row-sol .f-why {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Solution Decision (Case 2) */
.solution-decision-box {
  background: var(--bg-subtle);
  border: 1px solid #273854;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.decision-header {
  font-size: 1.1rem;
  color: #fff;
  border-bottom: 1px solid #334155;
  padding-bottom: 10px;
}

.decision-reason h4 {
  color: var(--accent-cyan);
  font-size: 1rem;
  margin-bottom: 6px;
}

.decision-reason p {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ER Diagram Visual (Case 3) */
.er-diagram-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #080c14;
  border: 1px solid #22324e;
  border-radius: var(--radius-md);
  padding: 30px 24px;
  overflow-x: auto;
  gap: 16px;
}

.er-node.entity {
  background: var(--bg-subtle);
  border: 2px solid #3b82f6;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.er-node.entity.highlight {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.er-title {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  border-bottom: 1px solid #334155;
  padding-bottom: 4px;
  width: 100%;
  text-align: center;
}

.er-attr {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.er-attr.pk u {
  color: #fbbf24;
  font-weight: 700;
}

.er-connector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.er-cardinality {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 900;
  color: #f43f5e;
}

.er-rhombus {
  width: 90px;
  height: 90px;
  background: #1e293b;
  border: 2px solid #818cf8;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px;
  position: relative;
}

.er-rhombus > * {
  transform: rotate(-45deg);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  color: #c7d2fe;
}

.er-rhombus.with-attr .rel-attr {
  position: absolute;
  top: -24px;
  right: -24px;
  background: #0f172a;
  border: 1px solid #fbbf24;
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  white-space: nowrap;
}

.er-explanation-box {
  background: var(--bg-subtle);
  border-left: 4px solid var(--accent-amber);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.er-explanation-box h4 {
  color: #fbbf24;
  margin-bottom: 8px;
}

.er-explanation-box ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: #cbd5e1;
}

/* Case 4: Law List */
.qa-block h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.law-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.law-list strong {
  color: #93c5fd;
}

/* ==========================================================================
   AP1 Master-Akademie Styles
   ========================================================================== */
.nav-tab.highlight-academy {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, var(--bg-card) 100%);
}

.nav-tab.highlight-academy.active {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

.academy-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.academy-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  background: linear-gradient(135deg, #1e1b4b 0%, #172554 100%);
  border: 1px solid #4338ca;
}

.academy-hero .hero-text {
  flex: 1;
  min-width: 300px;
}

.academy-top-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-circle {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #fbbf24;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 140px;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.academy-progress-bar {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.academy-progress-bar .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  transition: width 0.3s ease;
}

/* JSON Actions Bar */
.json-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.actions-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-danger:hover {
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

.json-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Topic Selector */
.academy-topic-selector {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.topic-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s;
}

.topic-tab-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.topic-tab-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.topic-badge-count {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

/* Topic Content Mount */
.academy-topic-mount {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analogy-card {
  background: linear-gradient(135deg, #182238 0%, #111a2c 100%);
  border: 1px solid #283957;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.analogy-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analogy-header h3 {
  font-size: 1.25rem;
  color: #fcd34d;
}

.analogy-story {
  color: #cbd5e1;
  font-size: 0.96rem;
  line-height: 1.6;
}

.analogy-story ul {
  padding-left: 20px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analogy-trick {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: #93c5fd;
}

/* Pitfalls Card */
.pitfalls-card {
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.pitfalls-card h4 {
  color: #fb7185;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.pitfalls-card ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #fda4af;
  font-size: 0.9rem;
}

/* Academy Tasks Container */
.academy-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.academy-task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s;
}

.academy-task-card.is-completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, var(--bg-card) 100%);
}

.academy-task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.academy-task-header h4 {
  font-size: 1.1rem;
  color: #fff;
}

.task-status-pill {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
}

.task-status-pill.open {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.task-status-pill.done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.academy-task-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.academy-task-interactive {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.task-action-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* ==========================================================================
   Netzplantechnik (DIN 69900) Styles
   ========================================================================== */
.netzplan-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.netzplan-scroll-area {
  width: 100%;
  overflow-x: auto;
  padding: 16px 0 24px;
  -webkit-overflow-scrolling: touch;
}

.netzplan-canvas {
  min-width: 950px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  padding: 16px;
  background: #080d1a;
  border-radius: var(--radius-md);
  border: 1px solid #1e293b;
}

.np-flow-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* DIN 69900 Node Box */
.np-node-box {
  width: 140px;
  background: #111827;
  border: 2px solid #334155;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-template-rows: 28px 28px 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.2s ease;
}

.np-node-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.np-node-box.critical {
  border-color: #f43f5e;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.35);
}

.np-node-box.critical::before {
  content: 'KRITISCH';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #f43f5e;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.np-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #243452;
  border-bottom: 1px solid #243452;
  color: #cbd5e1;
  padding: 2px;
}

.np-cell:nth-child(3n) {
  border-right: none;
}

.np-cell:nth-child(n+7) {
  border-bottom: none;
}

.np-cell.name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(59, 130, 246, 0.15);
}

.np-node-box.critical .np-cell.name {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

.np-cell.faz, .np-cell.saz {
  color: #38bdf8;
  font-weight: 600;
}

.np-cell.fez, .np-cell.sez {
  color: #34d399;
  font-weight: 600;
}

.np-cell.dauer {
  color: #fbbf24;
}

.np-cell.puffer {
  color: #a78bfa;
  font-weight: 700;
}

.np-cell input {
  width: 100%;
  height: 100%;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 3px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  padding: 0;
}

.np-cell input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #0f172a;
}

.np-cell input.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.np-cell input.incorrect {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

.np-arrow {
  display: flex;
  align-items: center;
  color: #64748b;
  font-size: 1.2rem;
  font-weight: bold;
}

.np-arrow.critical {
  color: #f43f5e;
}

/* Legend Node */
.np-legend-container {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.np-legend-desc {
  flex: 1;
  min-width: 260px;
}

.np-legend-desc ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 16px;
  margin-top: 8px;
}

.np-legend-desc li {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.np-legend-desc li strong {
  color: #fff;
}

/* Crypto Workflow Visualizer */
.crypto-workflow-card {
  background: #080d19;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 16px 0;
}

.crypto-flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.crypto-flow-step {
  background: #111827;
  border: 1px solid #2d3748;
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.crypto-flow-step.step-sender {
  border-top: 4px solid #3b82f6;
}

.crypto-flow-step.step-transit {
  border-top: 4px solid #f59e0b;
}

.crypto-flow-step.step-receiver {
  border-top: 4px solid #10b981;
}

.crypto-step-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  width: fit-content;
}

.crypto-flow-step.step-sender .crypto-step-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.crypto-flow-step.step-transit .crypto-step-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.crypto-flow-step.step-receiver .crypto-step-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.crypto-key-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.key-public {
  background: rgba(6, 182, 212, 0.18);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.key-private {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.crypto-text-preview {
  background: #090d16;
  border: 1px solid #1f293d;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-all;
}

/* ==========================================================================
   Interactive Step-by-Step Walkthrough & Node Inspector
   ========================================================================== */
.np-walkthrough-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.np-step-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.np-step-counter {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.np-step-title {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}

.np-walkthrough-box {
  background: #090e1a;
  border: 1px solid #233454;
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.np-walkthrough-box h4 {
  color: var(--accent-cyan);
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.np-walkthrough-box code {
  background: #172033;
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: var(--font-mono);
}

.np-node-box.highlight-active {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6) !important;
  transform: scale(1.06);
  z-index: 10;
}

.np-node-box.highlight-focus {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.6) !important;
  transform: scale(1.06);
  z-index: 10;
}

.np-node-box.clickable {
  cursor: pointer;
}

.np-node-box.clickable:hover {
  border-color: var(--accent-cyan);
}

/* Node Inspector Card */
.np-inspector-panel {
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.np-inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.np-inspector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.np-calc-card {
  background: #111827;
  border: 1px solid #2d3748;
  border-radius: 6px;
  padding: 14px;
  font-size: 0.9rem;
}

.np-calc-card h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.np-calc-card.faz-card h5 { color: #38bdf8; }
.np-calc-card.sez-card h5 { color: #34d399; }
.np-calc-card.puffer-card h5 { color: #a78bfa; }
.np-calc-card.critical-card h5 { color: #f43f5e; }

/* ================================
   AP1 Cases: Aufdeck-Mechanik
   ================================ */

.case-reveal {
  margin-top: 14px;
  border: 1px solid var(--border-color, #243553);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.06);
  overflow: hidden;
}

.case-reveal summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--accent-cyan);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-reveal summary::-webkit-details-marker {
  display: none;
}

.case-reveal summary::after {
  content: '▾';
  margin-left: auto;
  transition: transform 0.2s ease;
  font-size: 1rem;
}

.case-reveal[open] summary::after {
  transform: rotate(180deg);
}

.case-reveal[open] summary {
  border-bottom: 1px solid var(--border-color, #243553);
}

.case-reveal > *:not(summary) {
  padding: 4px 18px 14px;
}

.case-reveal > div:first-of-type {
  padding-top: 14px;
}

/* Self-check input box (Case 8) */
.case-self-check {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}

.case-self-check input {
  background: #0d1424;
  border: 1px solid #33456b;
  border-radius: 8px;
  padding: 10px 14px;
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.case-self-check input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.case-self-check input.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.case-self-check input.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* ================================
   Method-Tab: Verstehens-Quiz
   ================================ */

.method-quiz-section {
  margin-top: 28px;
  background: var(--bg-card, #131b2e);
  border: 1px solid var(--border-color, #243553);
  border-radius: 14px;
  padding: 24px;
}

.method-quiz-card {
  border: 1px solid var(--border-color, #243553);
  border-radius: 10px;
  padding: 18px;
  margin-top: 16px;
  background: rgba(13, 20, 36, 0.5);
}

.method-quiz-q {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.method-quiz-q p {
  margin: 0;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.5;
}

.method-quiz-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-primary, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.method-quiz-card .mc-option {
  width: 100%;
}

.method-quiz-card .mc-option:disabled {
  cursor: default;
  opacity: 0.85;
}

.method-quiz-explain {
  margin-top: 12px;
}

.method-quiz-explain .solution-box {
  margin: 0;
}

.method-quiz-result {
  margin-top: 16px;
}

.method-quiz-result .feedback-box {
  border-width: 1px;
  border-style: solid;
}

/* ================================
   Practice: Wiederholung & Diagnose
   ================================ */

.repeat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f43f5e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  margin-left: 4px;
}

.repeat-banner {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: #fda4af;
}

.field-diagnosis-list {
  margin: 8px 0 0;
  padding-left: 18px;
  line-height: 1.6;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.field-diagnosis-list li {
  margin-bottom: 4px;
}

#practice-hint-mount .feedback-box {
  border: 1px solid rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.07);
  margin-bottom: 14px;
}

/* ================================
   Fehlende Basis-Klassen (Default-Styling)
   ================================ */

.subnet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.subnet-table th,
.subnet-table td {
  border: 1px solid #243553;
  padding: 10px 12px;
  text-align: left;
}

.subnet-table th {
  background: rgba(59, 130, 246, 0.1);
  color: #e2e8f0;
  font-weight: 700;
}

.subnet-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.method-card {
  background: rgba(13, 20, 36, 0.55);
  border: 1px solid #243553;
  border-radius: 10px;
  padding: 18px;
}

.method-card h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.method-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 0.92rem;
}

.guide-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Print: Aufgedeckte Lösungen immer sichtbar machen */
@media print {
  .case-reveal > *:not(summary) {
    display: block !important;
  }
  details.case-reveal {
    display: block;
  }
  details.case-reveal > * {
    display: block !important;
  }
}

/* ================================================================
   VISUAL UPGRADE: Cyberpunk/Arcade Level-Up
   ================================================================ */

/* --- Netzwerk-Hintergrund --- */

#bg-network-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
}

body {
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(59, 130, 246, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 85% 5%, rgba(6, 182, 212, 0.08), transparent),
    radial-gradient(ellipse 50% 60% at 50% 110%, rgba(139, 92, 246, 0.07), transparent);
}

/* --- Header: XP-Bar & Level-Badge --- */

.level-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.level-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #bfdbfe;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.22);
}

.xp-bar-wrap {
  position: relative;
  width: 200px;
  height: 12px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
  flex-shrink: 0;
}

.xp-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
  background-size: 200% 100%;
  animation: xp-shimmer 2.4s linear infinite;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.55);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes xp-shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.xp-amount {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #7dd3fc;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Streak-Karten-Effekte --- */

.streak-card {
  transition: box-shadow 0.4s ease, transform 0.3s ease;
}

.streak-card.streak-hot-1 {
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.5);
}

.streak-card.streak-hot-2 {
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.5);
  border-color: rgba(245, 158, 11, 0.7);
}

.streak-card.streak-hot-3 {
  box-shadow: 0 0 30px rgba(244, 63, 94, 0.55);
  border-color: rgba(244, 63, 94, 0.8);
  animation: streak-pulse 1.6s ease-in-out infinite;
}

@keyframes streak-pulse {
  0%, 100% { box-shadow: 0 0 22px rgba(244, 63, 94, 0.45); }
  50% { box-shadow: 0 0 34px rgba(244, 63, 94, 0.75); }
}

.streak-value.stat-pop {
  animation: stat-pop 0.45s cubic-bezier(0.18, 1.4, 0.4, 1);
}

@keyframes stat-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); color: #fbbf24; }
  100% { transform: scale(1); }
}

/* --- Achievements-Karte im Header --- */

.achievements-card {
  cursor: pointer;
  border: 1px solid rgba(245, 158, 11, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
}

.achievements-card:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* --- Achievements-Modal --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.25s ease;
}

.modal-card {
  background: linear-gradient(160deg, #131b2e 0%, #0d1424 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 16px;
  padding: 24px;
  max-width: 720px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(59, 130, 246, 0.15);
  animation: modal-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-in {
  from { transform: translateY(24px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-header h3 {
  font-size: 1.4rem;
}

.modal-close-btn {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fda4af;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.achievement-tile {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(13, 20, 36, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.achievement-tile:hover {
  transform: translateY(-2px);
}

.achievement-tile.unlocked {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(13, 20, 36, 0.5));
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.12);
}

.achievement-tile.locked {
  opacity: 0.55;
  filter: grayscale(0.6);
}

.achievement-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.3));
}

.achievement-tile.locked .achievement-icon {
  filter: none;
}

.achievement-info strong {
  display: block;
  color: #e2e8f0;
  font-size: 0.92rem;
  margin-bottom: 3px;
}

.achievement-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* --- Level-Up-Overlay --- */

.levelup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 16, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.3s ease;
}

.levelup-card {
  position: relative;
  text-align: center;
  padding: 48px 56px;
  border-radius: 20px;
  background: linear-gradient(160deg, #16213c 0%, #0d1424 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.5),
    0 0 50px rgba(59, 130, 246, 0.25),
    0 30px 80px rgba(0, 0, 0, 0.7);
  animation: levelup-in 0.55s cubic-bezier(0.18, 1.35, 0.4, 1);
  overflow: hidden;
  max-width: 92vw;
}

.levelup-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4, #10b981, #3b82f6);
  background-size: 300% 300%;
  animation: border-flow 3s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes levelup-in {
  from { transform: scale(0.6) rotate(-3deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.levelup-badge {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 24px rgba(251, 191, 36, 0.6));
  animation: badge-bounce 1.2s ease-in-out infinite;
}

@keyframes badge-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.06); }
}

.levelup-card h2 {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #7dd3fc, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

.levelup-rank {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 10px;
}

.levelup-card p {
  color: var(--text-secondary);
  margin-bottom: 22px;
}

/* --- Toasts --- */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: linear-gradient(160deg, #16213c, #0d1424);
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 240px;
  max-width: 340px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.15);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

.toast-achievement {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(245, 158, 11, 0.25);
}

.toast-xp {
  border-color: rgba(6, 182, 212, 0.6);
  min-width: 180px;
}

.toast-xp .toast-title {
  color: #7dd3fc;
  font-family: var(--font-mono);
}

.toast-title {
  font-weight: 800;
  color: #fbbf24;
  font-size: 0.95rem;
}

.toast-xp .toast-title {
  font-size: 1rem;
}

.toast-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

/* --- Konfetti-Canvas --- */

#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 1300;
  pointer-events: none;
}

/* --- Prüfungsmodus: Timer-Ring --- */

.exam-timer-box {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: rgba(148, 163, 184, 0.15);
  stroke-width: 4;
}

.timer-ring-fill {
  fill: none;
  stroke: #06b6d4;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.5));
}

.timer-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #7dd3fc;
  z-index: 1;
}

.exam-timer-box.timer-warning .timer-text {
  color: #fbbf24;
}

.exam-timer-box.timer-warning .timer-ring-fill {
  stroke: #f59e0b;
}

.exam-timer-box.timer-critical .timer-text {
  color: #f87171;
  animation: timer-blink 1s ease-in-out infinite;
}

.exam-timer-box.timer-critical .timer-ring-fill {
  stroke: #ef4444;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.7));
}

@keyframes timer-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Micro-Interactions: Buttons --- */

.btn {
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.btn-accent:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

/* --- Micro-Interactions: Nav-Tabs --- */

.nav-tab {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.nav-tab:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 18px rgba(59, 130, 246, 0.12);
}

.nav-tab.active {
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.18), 0 0 0 1px rgba(59, 130, 246, 0.35);
  animation: tab-glow 2.8s ease-in-out infinite;
}

@keyframes tab-glow {
  0%, 100% { box-shadow: 0 8px 28px rgba(59, 130, 246, 0.18), 0 0 0 1px rgba(59, 130, 246, 0.35); }
  50% { box-shadow: 0 8px 32px rgba(59, 130, 246, 0.32), 0 0 0 1px rgba(59, 130, 246, 0.55); }
}

/* --- Micro-Interactions: Stat-Cards --- */

.stat-card {
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), 0 0 16px rgba(59, 130, 246, 0.08);
}

/* --- Feedback-Boxen mit Einflug-Animation --- */

.feedback-box {
  animation: feedback-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes feedback-in {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* --- Question-Card mit subtiler Fade-in --- */

.question-card {
  animation: card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes card-in {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Reduced Motion: Animationen respektieren --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================
   INTERAKTIVER SUBNETZ-LOTSE
   ================================================================ */

.sublotse-section {
  margin-top: 28px;
  background: linear-gradient(160deg, rgba(19, 27, 46, 0.9), rgba(13, 20, 36, 0.95));
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.08), inset 0 1px 0 rgba(255,255,255,0.03);
}

.sublotse-controls {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
}

.sublotse-controls select,
.sublotse-controls input[type="range"] {
  width: 100%;
}

.sublotse-controls .control-group {
  flex: 1;
  min-width: 240px;
}

.lotse-strahl {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.lotse-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: rgba(13, 20, 36, 0.6);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-mono);
  animation: lotse-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.lotse-block:nth-child(-n+16) { animation-delay: calc(var(--i, 0) * 0.02s); }

@keyframes lotse-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lotse-block:hover {
  border-color: rgba(6, 182, 212, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.lotse-block.active {
  border-color: rgba(16, 185, 129, 0.7);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.14), rgba(13, 20, 36, 0.6));
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.18);
}

.lb-start {
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
}

.lotse-block.active .lb-start {
  color: #6ee7b7;
}

.lb-mid {
  font-size: 0.78rem;
  color: #fbbf24;
  font-weight: 700;
  min-height: 1.1em;
}

.lb-end {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.lotse-readout {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.readout-card {
  flex: 1;
  min-width: 150px;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  animation: card-in 0.3s ease;
}

.readout-card strong {
  display: block;
  font-size: 1.35rem;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.readout-card.net strong { color: #38bdf8; }
.readout-card.net { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.3); }

.readout-card.bcast strong { color: #f87171; }
.readout-card.bcast { background: rgba(244, 63, 94, 0.08); border-color: rgba(244, 63, 94, 0.3); }

.readout-card.hosts strong { color: #34d399; font-size: 1.05rem; }
.readout-card.hosts { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.3); }

.lotse-erklärung {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.07);
  border: 1px dashed rgba(6, 182, 212, 0.35);
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ================================================================
   SPICKZETTEL: CIDR-Live-Demo & Potenzen-Selbsttest
   ================================================================ */

.cidr-table-hint {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #7dd3fc;
}

.cidr-row {
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.cidr-row:hover {
  background: rgba(59, 130, 246, 0.08) !important;
}

.cidr-row.demo-selected {
  background: rgba(6, 182, 212, 0.14) !important;
  outline: 2px solid rgba(6, 182, 212, 0.55);
  outline-offset: -2px;
}

.cidr-live-demo {
  margin-top: 20px;
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(16, 185, 129, 0.1), rgba(13, 20, 36, 0.7));
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.1);
  animation: card-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cidr-live-demo h4 {
  color: #6ee7b7;
  font-family: var(--font-mono);
  margin: 8px 0 14px;
}

.demo-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.demo-step {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.15);
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.demo-step:last-child {
  border-bottom: none;
}

.powers-hint {
  font-size: 0.88rem;
  color: #7dd3fc;
  margin: 8px 0 12px;
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.power-card {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.power-card:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.5);
}

.power-card .val.masked {
  color: transparent;
  background: rgba(251, 191, 36, 0.15);
  border-radius: 6px;
  text-shadow: none;
  position: relative;
}

.power-card .val.masked::after {
  content: '?';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  font-weight: 800;
}

/* ================================================================
   EINHEITEN-DUELL
   ================================================================ */

.unit-duell-card {
  margin-top: 28px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.07), rgba(13, 20, 36, 0.8));
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 26px rgba(245, 158, 11, 0.07);
}

.unit-duell-card h3 {
  color: #fbbf24;
  margin-bottom: 6px;
}

.unit-duell-card > p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.duell-topbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.duell-score {
  color: #7dd3fc;
}

.duell-streak {
  color: #fbbf24;
}

.duell-question p {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 14px;
  line-height: 1.55;
}

.duell-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.duell-option {
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(13, 20, 36, 0.6);
  color: var(--text-primary);
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s ease;
}

.duell-option:hover:not(:disabled) {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.duell-option.correct {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.14);
}

.duell-option.incorrect {
  border-color: rgba(244, 63, 94, 0.7);
  background: rgba(244, 63, 94, 0.12);
}

.duell-option:disabled {
  cursor: default;
  opacity: 0.85;
}





