* { 
  box-sizing: border-box; 
  touch-action: manipulation; 
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Mukta Malar", sans-serif;
  background-color: #121212;
  color: #f0f0f0;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

h1 {
  color: #f1c40f;
  margin: 4px 0 8px 0;
  font-size: 1.4rem;
  text-align: center;
}

#dashboard {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  background: #1e1e1e;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  width: 100%;
  max-width: 600px;
  text-align: center;
  border: 1px solid #333;
}

.stat-box { 
  font-size: 11px; 
  color: #a0a0a0; 
}

.stat-val { 
  font-size: 14px; 
  font-weight: bold; 
  color: #fff; 
  margin-top: 3px; 
  display: block; 
}

#main-area {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  flex-wrap: wrap;
}

#canvas-container {
  border: 3px solid #f1c40f;
  border-radius: 6px;
  background: #2c3e50;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1 / 1;
  position: relative;
}

canvas { 
  display: block; 
  width: 100%; 
  height: 100%; 
}

#passenger-list {
  width: 100%;
  max-width: 320px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
}

#passenger-list h3 {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: #f1c40f;
  border-bottom: 1px solid #444;
  padding-bottom: 4px;
}

.p-card {
  background: #2a2a2a;
  border-left: 4px solid #1abc9c;
  padding: 6px;
  margin-bottom: 6px;
  border-radius: 3px;
}

.p-card.active { 
  border-left-color: #e67e22; 
  background: #332a22; 
}

#status-msg {
  margin-top: 8px;
  font-size: 14px;
  min-height: 22px;
  color: #2ecc71;
  font-weight: bold;
  text-align: center;
}

.accessibility-bar {
  margin: 8px 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  background: #f1c40f;
  color: #000;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.action-btn:hover { 
  background: #d4ac0d; 
}

.keys-guide {
  margin-top: 6px;
  font-size: 12px;
  color: #888;
  text-align: center;
}

/* Mobile Controls */
#mobile-controls {
  display: none;
  margin-top: 10px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dpad-row { 
  display: flex; 
  gap: 8px; 
}

.ctrl-btn {
  width: 54px;
  height: 54px;
  font-size: 20px;
  background: #333;
  color: #fff;
  border: 2px solid #555;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.ctrl-btn:active { 
  background: #555; 
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  #dashboard {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 8px;
  }
  #mobile-controls { 
    display: flex; 
  }
  .keys-guide { 
    display: none; 
  }
}