* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Courier New', monospace, sans-serif;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  color: #fff;
}

#game-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

#dispatch-banner {
  background-color: #990000;
  color: #fff;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 18px;
  white-space: nowrap;
  z-index: 20;
}

#cab-view {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#canvas-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

#next-station-display {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  padding: 12px 24px;
  border: 2px solid #0f0;
  color: #0f0;
  font-size: 22px;
  font-weight: bold;
  z-index: 10;
  border-radius: 4px;
}

#dashboard {
  height: 220px;
  background-color: rgba(30, 30, 30, 0.95);
  border-top: 4px solid #555;
  padding: 15px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  z-index: 10;
}

#gauge-panel {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.gauge {
  background: #000;
  border: 2px solid #aaa;
  padding: 10px 40px;
  text-align: center;
  border-radius: 4px;
}

.gauge-label {
  font-size: 14px;
  color: #aaa;
}

.gauge-value {
  font-size: 36px;
  font-weight: bold;
  color: #0ff;
}

#notch-panel {
  display: flex;
  justify-content: center;
  gap: 60px;
}

.notch-box {
  font-size: 28px;
  font-weight: bold;
  background-color: #111;
  padding: 8px 30px;
  border: 2px solid #888;
  width: 180px;
  text-align: center;
  border-radius: 4px;
}

#controls {
  display: flex;
  justify-content: center;
  gap: 15px;
}

button {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  background: #555;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
}

button:hover {
  background: #777;
}

#eb-btn {
  background: #cc0000;
}
#eb-btn:hover {
  background: #ff0000;
}

/* モーダル表示用 */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  background: #222;
  border: 3px solid #ffcc00;
  padding: 30px;
  text-align: center;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
}

.type-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.type-btn {
  font-size: 20px;
  padding: 15px 30px;
}

.rank-large {
  font-size: 72px;
  font-weight: bold;
  color: #ffcc00;
  margin: 10px 0;
}

#result-details {
  text-align: left;
  margin: 15px 0;
  font-size: 16px;
  line-height: 1.6;
}

/* ロビーモーダル用スタイル追加 */
.tab-buttons {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  justify-content: center;
}

.tab-btn {
  background: #333;
  color: #ccc;
  border: 1px solid #555;
  padding: 8px 16px;
  font-size: 14px;
}

.tab-btn.active {
  background: #ffcc00;
  color: #000;
  font-weight: bold;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.area-btn {
  padding: 10px;
  font-size: 14px;
  background: #444;
}

.area-btn.active {
  background: #0055ff;
  border: 2px solid #00ffff;
}

.area-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.route-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
  max-height: 180px;
  overflow-y: auto;
}

.route-btn {
  background: #333;
  border: 1px solid #666;
  text-align: left;
  padding: 10px 15px;
  font-size: 14px;
}

.route-btn.active {
  background: #cc0000;
  border-color: #ffcc00;
}

#search-input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  background: #111;
  color: #fff;
  border: 1px solid #ffcc00;
  border-radius: 4px;
  margin-bottom: 10px;
}

.primary-btn {
  background: #008000;
  font-size: 18px;
  width: 100%;
  margin-top: 10px;
}
.primary-btn:hover {
  background: #00b300;
}

/* 区間選択用スタイル */
.section-select-box {
  background: #111;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 6px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.station-dropdown {
  background: #222;
  color: #fff;
  border: 1px solid #ffcc00;
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
}

.station-dropdown:focus {
  outline: none;
  border-color: #00ffff;
}