:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --border: #334155;
  --radius: 12px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 105px;
}

/* Header & Navigation */
.app-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-top {
  max-width: 1400px;
  margin: 0 auto 0.8rem auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.brand-badge {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.header-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.nav-tabs {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.nav-btn {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.nav-btn.audio-highlight {
  border-color: #8b5cf6;
  color: #ddd6fe;
}
.nav-btn.audio-highlight.active {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
}

/* Main Content */
.main-container {
  max-width: 1400px;
  margin: 1.5rem auto;
  padding: 0 1.5rem 2rem 1.5rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

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

/* Cards & Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-green { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-red { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-purple { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.45); }

/* Buttons & Inputs */
.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #059669; }
.btn-warning { background: var(--warning); color: #000; }
.btn-purple { background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; }
.btn-purple:hover { opacity: 0.92; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg-hover); }

input[type="text"], select, input[type="number"] {
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

/* Progress Bars */
.progress-wrap {
  background: #0f172a;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0;
  border: 1px solid var(--border);
}

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

/* Checklist Items */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s;
}

.check-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--success);
  cursor: pointer;
}

.check-item.completed span {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Topic Cards */
.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.topic-card ul {
  margin: 0.65rem 0 0.65rem 1.25rem;
}

.topic-card li {
  margin-bottom: 0.35rem;
}

.trap-box {
  background: rgba(245, 158, 11, 0.12);
  border-left: 4px solid var(--warning);
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 0.65rem;
}

/* STUDIO AUDIO PLAYER DECK */
.audio-studio-deck {
  background: linear-gradient(145deg, #090d16 0%, #1e1b4b 100%);
  border: 2px solid #6366f1;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.audio-now-playing {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.audio-title-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.audio-subtitle-main {
  font-size: 0.9rem;
  color: #a5b4fc;
}

.audio-timeline-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0;
}

.audio-time-lbl {
  font-family: Consolas, monospace;
  font-size: 0.92rem;
  font-weight: 700;
  min-width: 52px;
  color: #e2e8f0;
}

.audio-seek-slider {
  flex: 1;
  height: 8px;
  accent-color: #8b5cf6;
  cursor: pointer;
}

.audio-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.audio-transport-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.speed-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.speed-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.speed-btn.active {
  background: #8b5cf6;
  color: #fff;
  border-color: #a78bfa;
}

.audio-part-row {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  transition: all 0.15s;
}

.audio-part-row:hover {
  border-color: #6366f1;
}

.audio-part-row.playing-now {
  border: 2px solid #8b5cf6;
  background: rgba(139, 92, 246, 0.16);
}

.audio-transcript-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e2e8f0;
}

/* Sticky Bottom Mini-Player */
.sticky-audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.97);
  border-top: 2px solid #6366f1;
  padding: 0.6rem 1.5rem;
  z-index: 200;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

.sticky-audio-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Cockpit & Pedal Simulator */
.cockpit-box {
  background: #090d16;
  border: 2px solid #334155;
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.gauges-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.gauge-circle {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  border: 5px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.gauge-val {
  font-size: 1.65rem;
  font-weight: 800;
}

.gauge-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pedals-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 650px;
  margin: 0 auto;
}

.pedal-col {
  background: #1e293b;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.pedal-bar-outer {
  width: 48px;
  height: 120px;
  background: #0f172a;
  border: 2px solid #475569;
  border-radius: 8px;
  margin: 0.6rem auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.pedal-bar-inner {
  width: 100%;
  transition: height 0.25s ease;
}

/* Road Signs Grid */
.signs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.sign-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.15s, border-color 0.15s;
}

.sign-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.sign-img-wrap {
  width: 110px;
  height: 110px;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.sign-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sign-code {
  font-weight: 800;
  color: #60a5fa;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.sign-info {
  font-size: 0.86rem;
  color: var(--text);
}

/* Exam Simulator */
.exam-header-bar {
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.q-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.q-num-btn {
  background: #1e293b;
  border: 1px solid var(--border);
  color: var(--text);
  height: 36px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.q-num-btn.current {
  border: 2px solid #fff;
  background: var(--primary);
}

.q-num-btn.answered {
  background: rgba(59, 130, 246, 0.35);
  border-color: var(--primary);
}

.q-num-btn.correct {
  background: var(--success);
  color: #fff;
}

.q-num-btn.wrong {
  background: var(--danger);
  color: #fff;
}

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

.exam-q-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.exam-q-text {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.exam-media-box {
  text-align: center;
  margin-bottom: 1.25rem;
}

.exam-media-box img, .exam-media-box video {
  max-width: 100%;
  max-height: 340px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: #000;
}

.answer-item {
  background: #0f172a;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  transition: all 0.15s;
}

.answer-item:hover {
  border-color: #60a5fa;
}

.answer-item.selected {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.18);
}

.answer-item.reveal-correct {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.2);
}

.answer-item.reveal-wrong {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.2);
}

.answer-check {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.answer-item.selected .answer-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Tables */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

table.data-table th, table.data-table td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

table.data-table th {
  background: #0f172a;
  color: #60a5fa;
}

pre.diagram-pre {
  background: #090d16;
  color: #38bdf8;
  padding: 1rem;
  border-radius: 8px;
  font-family: Consolas, monospace;
  overflow-x: auto;
  margin: 0.75rem 0;
  border: 1px solid var(--border);
}

/* ============================================================================
   INTERACTIVE VISUAL STAGE FOR AUDIO LESSONS & KARAOKE TRANSCRIPT
   ============================================================================ */
.audio-multimedia-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.15rem;
  margin-top: 1.1rem;
}

@media (max-width: 980px) {
  .audio-multimedia-grid {
    grid-template-columns: 1fr;
  }
}

.visual-stage-panel {
  background: rgba(9, 13, 22, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.55);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.visual-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.visual-stage-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.visual-stage-tab-btn {
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 0.32rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.visual-stage-tab-btn:hover {
  background: #334155;
  color: #fff;
}

.visual-stage-tab-btn.active {
  background: linear-gradient(135deg, #6366f1, #2563eb);
  color: #fff;
  border-color: #818cf8;
}

.visual-canvas-wrap {
  text-align: center;
}

#audio-stage-canvas {
  width: 100%;
  max-width: 760px;
  height: auto;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #090f1d;
  display: block;
  margin: 0 auto;
}

.visual-canvas-caption {
  font-size: 0.8rem;
  color: #a5b4fc;
  margin-top: 0.4rem;
}

.stage-infographic-wrap, .stage-signs-wrap {
  padding: 0.35rem;
}

.stage-infographic-heading {
  font-size: 1rem;
  color: #fde047;
  margin-bottom: 0.65rem;
}

.stage-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.65rem;
}

.stage-info-card {
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.stage-info-icon {
  font-size: 1.55rem;
  line-height: 1;
}

.stage-info-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f8fafc;
  margin-bottom: 0.2rem;
}

.stage-info-text {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.stage-image-wrap {
  text-align: center;
}

.stage-hero-img {
  width: 100%;
  max-height: 310px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #475569;
}

.stage-image-caption {
  font-size: 0.84rem;
  color: #fde047;
  margin-top: 0.45rem;
  font-weight: 600;
}

.stage-signs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.6rem;
  max-height: 300px;
  overflow-y: auto;
}

.stage-sign-item {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.55rem;
  text-align: center;
}

.stage-sign-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border-radius: 6px;
}

.stage-sign-code {
  font-weight: 800;
  color: #60a5fa;
  font-size: 0.84rem;
  margin-top: 0.25rem;
}

.stage-sign-desc {
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.3;
}

/* Karaoke Synchronized Transcript Sentences */
.karaoke-sentence {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
  transition: background 0.18s, color 0.18s;
}

.karaoke-sentence:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
}

.karaoke-sentence.karaoke-active {
  background: rgba(250, 204, 21, 0.22);
  color: #fde047;
  font-weight: 700;
  border-bottom: 2px solid #facc15;
}

/* ============================================================================
   SMART INFOGRAPHIC CARDS FOR EXAM QUESTIONS
   ============================================================================ */
.exam-infographic-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.35));
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 10px;
  padding: 0.95rem 1.1rem;
  margin-top: 1rem;
}

.exam-info-header {
  font-weight: 800;
  color: #fde047;
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.exam-info-grid {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.exam-info-thumb {
  width: 190px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #475569;
  flex-shrink: 0;
}

/* ============================================================================
   3D DRIVING GAME & SIMULATOR (TAB-SIM3D)
   ============================================================================ */
.nav-btn.sim3d-highlight {
  border-color: #10b981;
  color: #a7f3d0;
}

.nav-btn.sim3d-highlight.active {
  background: linear-gradient(135deg, #059669, #2563eb);
  color: #fff;
}

.sim3d-modes-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.sim3d-mode-btn {
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s;
}

.sim3d-mode-btn:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
}

.sim3d-mode-btn.active {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(37, 99, 235, 0.22));
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25);
}

.sim-mode-box {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}

.sim-mode-box.mode-free {
  background: rgba(16, 185, 129, 0.12);
  border-left: 4px solid #10b981;
}

.sim-mode-box.mode-points {
  background: rgba(245, 158, 11, 0.14);
  border-left: 4px solid #f59e0b;
}

.sim-mode-box.mode-exam {
  background: rgba(239, 68, 68, 0.14);
  border-left: 4px solid #ef4444;
}

.sim3d-alert-banner {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sim3d-alert-banner.info {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.sim3d-alert-banner.success {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.sim3d-alert-banner.warning {
  background: rgba(245, 158, 11, 0.25);
  color: #fde047;
}

.sim3d-alert-banner.danger {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.sim3d-main-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 1rem;
}

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

.sim3d-viewport-wrap {
  position: relative;
  background: #050914;
  border: 2px solid #334155;
  border-radius: 14px;
  overflow: hidden;
  min-height: 490px;
}

#sim3d-viewport {
  width: 100%;
  height: 490px;
}

.sim3d-hud-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  pointer-events: none;
}

.sim3d-hud-pill {
  background: rgba(9, 13, 22, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  backdrop-filter: blur(6px);
}

.sim3d-hud-bottom {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.sim3d-dash-cluster {
  background: rgba(9, 13, 22, 0.9);
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.sim-log-item {
  background: #0f172a;
  border-left: 3px solid #f59e0b;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

