@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
  --font-family: 'Kanit', 'Sarabun', sans-serif;
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border-color: #e2e8f0;
  
  --red-cross: #ef4444;
  --red-cross-hover: #dc2626;
  
  /* Default Theme (Youth Red Cross Primary) */
  --theme-primary: #ef4444;
  --theme-primary-hover: #dc2626;
  --theme-bg-light: #fef2f2;
  --theme-glow: rgba(239, 68, 68, 0.15);
  --theme-accent: #f87171;
}

/* Dynamic Themes */
body.theme-pink {
  --theme-primary: #ec4899;
  --theme-primary-hover: #db2777;
  --theme-bg-light: #fdf2f8;
  --theme-glow: rgba(236, 72, 153, 0.15);
  --theme-accent: #f472b6;
}

body.theme-purple {
  --theme-primary: #8b5cf6;
  --theme-primary-hover: #7c3aed;
  --theme-bg-light: #f5f3ff;
  --theme-glow: rgba(139, 92, 246, 0.15);
  --theme-accent: #a78bfa;
}

body.theme-blue {
  --theme-primary: #3b82f6;
  --theme-primary-hover: #2563eb;
  --theme-bg-light: #eff6ff;
  --theme-glow: rgba(59, 130, 246, 0.15);
  --theme-accent: #60a5fa;
}

body.theme-yellow {
  --theme-primary: #eab308;
  --theme-primary-hover: #ca8a04;
  --theme-bg-light: #fefcbf;
  --theme-glow: rgba(234, 179, 8, 0.15);
  --theme-accent: #facc15;
}

body.theme-orange {
  --theme-primary: #f97316;
  --theme-primary-hover: #ea580c;
  --theme-bg-light: #fff7ed;
  --theme-glow: rgba(249, 115, 22, 0.15);
  --theme-accent: #fb923c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(at 0% 0%, var(--theme-bg-light) 0, transparent 50%),
    radial-gradient(at 100% 100%, var(--theme-bg-light) 0, transparent 50%);
  background-attachment: fixed;
}

header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--red-cross);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: 0.5px;
}

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

.user-badge {
  background: var(--theme-bg-light);
  border: 1px solid var(--theme-primary);
  color: var(--theme-primary);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--theme-primary);
  box-shadow: 0 0 8px var(--theme-primary);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

/* Card */
.card {
  background: var(--white);
  border-radius: 1.25rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
}

.card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-color);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 0.75rem;
  font-size: 1rem;
  outline: none;
  background: #f8fafc;
}

.form-input:focus {
  border-color: var(--theme-primary);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--theme-glow);
}

/* Theme Selection Cards */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.theme-card {
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  background: var(--white);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.05);
}

.theme-card.active {
  border-color: var(--theme-card-color);
  background-color: var(--theme-card-bg-light);
  box-shadow: 0 0 12px var(--theme-card-color-glow);
}

.color-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

/* Week Selector Cards */
.week-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.week-card {
  border: 2px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.5rem;
  cursor: pointer;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.week-card.active {
  border-color: var(--theme-primary);
  background-color: var(--theme-bg-light);
}

.week-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
}

.week-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: var(--theme-primary);
  color: var(--white);
  box-shadow: 0 4px 6px -1px var(--theme-glow);
}

.btn:hover {
  background: var(--theme-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 12px -1px var(--theme-glow);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #e2e8f0;
  color: #475569;
  box-shadow: none;
}

.btn-secondary:hover {
  background: #cbd5e1;
  box-shadow: none;
}

.btn-disabled {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Lesson Area */
.lesson-navigation {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
}

.lesson-tab {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.lesson-tab:hover {
  color: var(--theme-primary);
}

.lesson-tab.active {
  color: var(--theme-primary);
  border-bottom-color: var(--theme-primary);
}

.lesson-content-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}

.lesson-content-pane.active {
  display: block;
}

.content-section {
  margin-bottom: 2rem;
}

.content-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--theme-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.content-section p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.illustration-box {
  background: var(--theme-bg-light);
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
  border: 1px dashed var(--theme-primary);
}

/* Quiz Interface */
.quiz-question {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

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

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .options-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.option-card {
  border: 1.5px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: var(--white);
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.option-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.option-card.selected {
  border-color: var(--theme-primary);
  background-color: var(--theme-bg-light);
  color: var(--theme-primary);
  font-weight: 600;
}

.option-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
}

.option-card.selected .option-badge {
  background: var(--theme-primary);
  color: var(--white);
}

/* Game Interface */
.game-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.game-card {
  border: 2px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2rem;
  cursor: pointer;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.game-card.active {
  border-color: var(--theme-primary);
  background-color: var(--theme-bg-light);
}

.game-card-icon {
  font-size: 3rem;
}

.game-container {
  border: 2px solid var(--theme-primary);
  border-radius: 1rem;
  padding: 1.5rem;
  background: #f8fafc;
  min-height: 400px;
  position: relative;
  margin-top: 1.5rem;
}

/* Game 1: Matching Game */
.matching-game {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.matching-items, .matching-targets {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.match-item {
  background: var(--white);
  border: 2px solid var(--border-color);
  padding: 1rem;
  border-radius: 0.75rem;
  cursor: grab;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.match-item:active {
  cursor: grabbing;
}

.match-target {
  background: var(--white);
  border: 2px dashed var(--border-color);
  padding: 1.25rem;
  border-radius: 0.75rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.match-target.dragover {
  border-color: var(--theme-primary);
  background: var(--theme-bg-light);
}

.match-target.matched {
  border-style: solid;
  border-color: #22c55e;
  background-color: #f0fdf4;
  color: #15803d;
  font-weight: 600;
}

/* Game 2: Safe Room Builder */
.room-game-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
}

.room-canvas {
  background: #e2e8f0;
  border-radius: 0.75rem;
  height: 350px;
  position: relative;
  border: 2px solid #cbd5e1;
  overflow: hidden;
  background-image: 
    linear-gradient(#cbd5e1 1px, transparent 1px),
    linear-gradient(90deg, #cbd5e1 1px, transparent 1px);
  background-size: 20px 20px;
}

.room-zone {
  position: absolute;
  border: 2.5px dashed var(--theme-primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--theme-primary);
  background: rgba(255,255,255,0.7);
  padding: 5px;
}

.room-zone.dragover {
  background: var(--theme-bg-light);
  transform: scale(1.02);
}

.room-zone.filled {
  border-style: solid;
  border-color: #22c55e;
  background-color: #f0fdf4;
  color: #15803d;
}

.room-items-panel {
  background: var(--white);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 350px;
  overflow-y: auto;
}

.room-draggable-item {
  background: var(--theme-bg-light);
  border: 1.5px solid var(--theme-primary);
  color: var(--theme-primary);
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: grab;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Game 3: Wound Care Step Sorter */
.sorting-game-container {
  max-width: 600px;
  margin: 0 auto;
}

.sorting-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.sorting-item {
  background: var(--white);
  border: 2px solid var(--border-color);
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.sorting-item:hover {
  border-color: var(--theme-primary);
}

.sorting-item-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--theme-bg-light);
  color: var(--theme-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Game 4: First Aid Hero */
.hero-game-panel {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.scenario-card {
  background: var(--white);
  border-radius: 0.75rem;
  border: 1.5px solid var(--border-color);
  padding: 2rem;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.hero-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media(min-width: 600px) {
  .hero-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-btn {
  background: var(--white);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.hero-btn:hover {
  border-color: var(--theme-primary);
  background: var(--theme-bg-light);
  color: var(--theme-primary);
}

.game-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.game-progress-inner {
  height: 100%;
  background: var(--theme-primary);
  width: 0%;
  transition: width 0.3s ease;
}

/* Score Screen */
.score-screen {
  text-align: center;
  animation: scaleUp 0.4s ease;
}

.score-badge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--theme-bg-light);
  color: var(--theme-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  margin: 1.5rem auto;
  border: 4px solid var(--theme-primary);
  box-shadow: 0 0 20px var(--theme-glow);
}

/* Admin Dashboard Table */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.stat-val {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--theme-primary);
}

.stat-lbl {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
  background: var(--white);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.admin-table th {
  background: #f8fafc;
  padding: 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-color);
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: #475569;
}

.admin-table tr:hover {
  background: #f8fafc;
}

.badge-color {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-pink { background: #fdf2f8; color: #db2777; border: 1px solid #fbcfe8; }
.badge-purple { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.badge-blue { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-yellow { background: #fef9e7; color: #ca8a04; border: 1px solid #fde047; }
.badge-orange { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }

.search-bar-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Footer */
footer {
  margin-top: auto;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
}

/* SVGs inside the app */
.svg-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* --- Mobile vertical layout optimization --- */
@media (max-width: 768px) {
  /* Container & Card Padding */
  .container {
    padding: 1rem 0.5rem;
  }
  .card {
    padding: 1.5rem 1rem;
    border-radius: 1rem;
  }
  .card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  /* Step Indicator */
  .step-indicator {
    margin-bottom: 1.5rem !important;
  }
  .step-dot {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
    border-width: 2px !important;
  }
  .step-label {
    font-size: 0.75rem !important;
    margin-top: 0.25rem !important;
  }
  .step-indicator::before {
    top: 16px !important;
  }

  /* Matching Game (Make it single column for easy vertical dragging) */
  .matching-game {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .match-item {
    padding: 0.85rem;
    font-size: 0.95rem;
  }
  .match-target {
    padding: 0.85rem;
    min-height: 70px;
    font-size: 0.85rem;
  }

  /* Room & Hazard Sorter Game Layout */
  .room-game-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .room-canvas-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    background: #e2e8f0;
    border-radius: 0.75rem;
    border: 2px solid #cbd5e1;
    display: flex;
    justify-content: flex-start;
  }
  .room-canvas {
    min-width: 340px;
    border: none;
    margin: 0 auto;
    flex-shrink: 0;
  }
  
  /* Flex wrap items panel on bottom for easy upwards dragging */
  .room-items-panel {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-height: none;
    overflow-y: visible;
    padding: 0.75rem;
    gap: 0.5rem;
  }
  .room-draggable-item {
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    flex-grow: 1;
    max-width: 48%;
    text-align: center;
  }

  /* Hazard Bin Sorter Optimization */
  #hazardCanvasArea {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  #hazardCanvasArea .room-zone {
    width: 145px !important;
    height: 190px !important;
    padding: 0.5rem;
  }
  #hazardCanvasArea .room-zone div {
    font-size: 2.2rem !important;
  }
  #hazardCanvasArea .room-zone strong {
    font-size: 0.75rem !important;
  }

  /* Wound Dressing Step Sorter */
  .sorting-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    gap: 0.75rem;
  }
  .sorting-item-index {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  /* First Aid Hero scenario */
  .scenario-card {
    padding: 1.25rem 1rem;
    font-size: 1.05rem;
  }
  .hero-btn {
    padding: 0.85rem;
    font-size: 0.9rem;
  }

  /* Game Selector Cards Grid */
  .game-selector-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .game-card {
    padding: 1.25rem;
    gap: 0.5rem;
  }
  .game-card-icon {
    font-size: 2.25rem;
  }
  .game-card h3 {
    font-size: 1.1rem;
  }
  
  /* Result Section Score Boxes */
  .result-section .score-screen h2 {
    font-size: 1.6rem !important;
  }
  .result-section div[style*="display: flex; justify-content: center; gap: 2rem;"] {
    flex-direction: column;
    align-items: center;
    gap: 1rem !important;
  }
  .result-section div[style*="width: 180px;"] {
    width: 100% !important;
    max-width: 280px;
    padding: 1rem !important;
  }
}

@media (max-width: 480px) {
  /* Compacting header for very small screens */
  header {
    padding: 0.75rem 1rem;
  }
  .logo-title {
    font-size: 1.1rem;
  }
  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
  .header-actions {
    flex-direction: column;
    gap: 0.5rem !important;
  }
  .user-badge {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    width: 100%;
    justify-content: center;
  }
  .header-actions a.btn {
    font-size: 0.8rem !important;
    padding: 0.5rem 1rem !important;
    width: 100%;
    justify-content: center;
  }
  #hazardCanvasArea .room-zone {
    width: 135px !important;
    height: 180px !important;
  }
}
