.division-selector-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.division-selector-modal {
  background: #111827;
  border: 2px solid #6495ed;
  border-radius: 16px;
  padding: 40px 50px;
  text-align: center;
}

.division-selector-modal h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #6495ed;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 30px;
}

.division-selector-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.div-select-btn {
  padding: 24px 40px;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 2px solid;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.div-select-fire {
  background: rgba(230, 57, 70, 0.15);
  border-color: #e63946;
  color: #e63946;
}
.div-select-fire:hover {
  background: rgba(230, 57, 70, 0.3);
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
}

.div-select-hazmat {
  background: rgba(244, 162, 97, 0.15);
  border-color: #f4a261;
  color: #f4a261;
}
.div-select-hazmat:hover {
  background: rgba(244, 162, 97, 0.3);
  box-shadow: 0 0 20px rgba(244, 162, 97, 0.4);
}

.div-select-rescue {
  background: rgba(100, 149, 237, 0.15);
  border-color: #6495ed;
  color: #6495ed;
}
.div-select-rescue:hover {
  background: rgba(100, 149, 237, 0.3);
  box-shadow: 0 0 20px rgba(100, 149, 237, 0.4);
}

.div-select-ems {
  background: rgba(42, 157, 143, 0.15);
  border-color: #2a9d8f;
  color: #2a9d8f;
}
.div-select-ems:hover {
  background: rgba(42, 157, 143, 0.3);
  box-shadow: 0 0 20px rgba(42, 157, 143, 0.4);
}

.display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d1b2a;
  border-bottom: 3px solid #6495ed;
  padding: 12px 30px;
  height: 60px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link {
  color: #7fa8c9;
  text-decoration: none;
  font-size: 0.85rem;
}
.back-link:hover { color: #fff; }

.division-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #6495ed;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.timer-label {
  font-size: 0.8rem;
  color: #7fa8c9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-value {
  font-size: 2rem;
  font-weight: 800;
  color: #6495ed;
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
}

.wind-header-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.85rem;
  color: #7fa8c9;
}

.wind-header-arrow {
  display: inline-block;
  font-size: 1.2rem;
  color: #6495ed;
  transition: transform 0.5s ease;
}

.header-right {
  display: flex;
  align-items: center;
}

.conn-status {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.conn-status.connected { color: #2a9d8f; }
.conn-status.disconnected { color: #e63946; }

.display-body {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
}

.display-left {
  width: 300px;
  padding: 16px;
  overflow-y: auto;
  border-right: 2px solid #1e3a5f;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.my-division-panel,
.situation-panel,
.score-panel {
  background: #111827;
  border-radius: 10px;
  padding: 14px 18px;
  border: 1px solid #1e3a5f;
}

.my-division-panel {
  border-color: #6495ed;
}

.my-division-panel h3,
.situation-panel h3,
.score-panel h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7fa8c9;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1e3a5f;
}

.my-division-panel h3 {
  color: #6495ed;
  border-bottom-color: #6495ed;
}

.my-div-info {
  margin-bottom: 10px;
}

.my-div-personnel-section {
  margin-top: 8px;
}

.score-big-display {
  text-align: center;
  padding: 10px;
}

.score-big-number {
  font-size: 3rem;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
}

.score-big-label {
  font-size: 1rem;
  color: #5a8aaa;
  font-weight: 600;
}

.score-log-division {
  max-height: 120px;
  overflow-y: auto;
}

.score-log-entry {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  margin-bottom: 3px;
}
.score-log-entry.deduction {
  background: rgba(230, 57, 70, 0.08);
  color: #e63946;
}
.score-log-entry.addition {
  background: rgba(42, 157, 143, 0.08);
  color: #2a9d8f;
}
.score-log-entry.neutral {
  background: rgba(127, 168, 201, 0.08);
  color: #7fa8c9;
}
.sle-amount { font-weight: 800; min-width: 32px; }
.sle-reason { flex: 1; color: #8aa; }

.score-good { color: #2a9d8f; }
.score-warn { color: #f4a261; }
.score-bad { color: #e63946; }

.sit-row {
  padding: 5px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(30, 58, 95, 0.3);
}
.sit-row:last-child { border-bottom: none; }

.sit-label {
  color: #5a8aaa;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}

.sit-value {
  color: #e0e6f0;
  font-size: 0.95rem;
}

.div-personnel {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.div-person-tag {
  display: inline-block;
  background: #1a2f4a;
  border: 1px solid #2a5f8f;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.7rem;
  color: #c0d4e8;
}

.display-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.board-header {
  padding: 10px 18px;
  background: #111827;
  border-bottom: 1px solid #1e3a5f;
  font-size: 0.85rem;
  font-weight: 700;
  color: #7fa8c9;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.board-area {
  flex: 1;
  position: relative;
  background:
    linear-gradient(rgba(30, 58, 95, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 95, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow: auto;
}

.wind-compass-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 50;
  text-align: center;
  pointer-events: none;
}

.compass-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(30, 58, 95, 0.6);
  background: rgba(10, 14, 26, 0.85);
  position: relative;
}

.compass-ring .compass-n,
.compass-ring .compass-e,
.compass-ring .compass-s,
.compass-ring .compass-w {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 700;
  color: #5a8aaa;
}
.compass-n { top: 4px; left: 50%; transform: translateX(-50%); }
.compass-s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 6px; top: 50%; transform: translateY(-50%); }
.compass-w { left: 6px; top: 50%; transform: translateY(-50%); }

.compass-arrow-large {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 32px;
  background: #6495ed;
  transform-origin: 50% 0%;
  margin-left: -1.5px;
  transition: transform 0.5s ease;
}
.compass-arrow-large::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -5px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #6495ed;
}

.compass-speed {
  font-size: 0.75rem;
  color: #7fa8c9;
  margin-top: 4px;
  font-weight: 600;
}

.scene-obj {
  position: absolute;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  user-select: none;
  z-index: 5;
  border: 1px solid;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: left 0.4s ease, top 0.4s ease;
  transform-origin: center center;
}

.scene-icon {
  font-size: 1.2rem;
  line-height: 1;
}
.scene-label {
  font-size: 0.7rem;
  line-height: 1.1;
}

.scene-tank, .scene-tank-small {
  background: rgba(100, 140, 180, 0.2);
  border-color: #648cb4;
  color: #8ab4d4;
}
.scene-pump {
  background: rgba(120, 160, 100, 0.2);
  border-color: #78a064;
  color: #98c084;
}
.scene-pipe {
  background: rgba(140, 140, 140, 0.15);
  border-color: #888;
  color: #aaa;
  min-width: 90px;
}
.scene-valve {
  background: rgba(200, 180, 60, 0.15);
  border-color: #c8b43c;
  color: #d4c854;
}
.scene-building, .scene-control-room {
  background: rgba(100, 120, 160, 0.2);
  border-color: #6478a0;
  color: #8498c0;
}
.scene-cooling-tower {
  background: rgba(80, 160, 200, 0.15);
  border-color: #50a0c8;
  color: #70c0e8;
}
.scene-flare {
  background: rgba(240, 160, 40, 0.15);
  border-color: #f0a028;
  color: #f0b040;
}
.scene-reactor {
  background: rgba(180, 100, 200, 0.15);
  border-color: #b464c8;
  color: #c880d8;
}
.scene-column {
  background: rgba(160, 140, 200, 0.15);
  border-color: #a08cc8;
  color: #b8a0d8;
}
.scene-loading-rack {
  background: rgba(140, 120, 100, 0.2);
  border-color: #8c7864;
  color: #b09880;
}
.scene-road {
  background: rgba(80, 80, 80, 0.3);
  border-color: #555;
  color: #999;
  min-width: 90px;
  border-style: dashed;
}
.scene-fence {
  background: rgba(60, 60, 60, 0.2);
  border-color: #444;
  color: #888;
  min-width: 90px;
  border-style: dotted;
}
.scene-gate {
  background: rgba(60, 100, 60, 0.2);
  border-color: #3c643c;
  color: #68a068;
}
.scene-dike {
  background: rgba(100, 80, 60, 0.2);
  border-color: #64503c;
  color: #a08060;
  min-width: 90px;
  border-style: double;
  border-width: 3px;
}
.scene-custom {
  background: rgba(160, 160, 160, 0.15);
  border-color: #aaa;
  color: #ccc;
}

.hazard-marker {
  position: absolute;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  user-select: none;
  z-index: 15;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: left 0.4s ease, top 0.4s ease;
}

.hazard-fire {
  background: rgba(230, 57, 70, 0.3);
  border: 2px solid #e63946;
  color: #ff6b6b;
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.5);
  animation: hazardPulse 1.5s infinite;
}
.hazard-smoke {
  background: rgba(120, 120, 120, 0.3);
  border: 2px solid #888;
  color: #bbb;
  box-shadow: 0 0 12px rgba(120, 120, 120, 0.4);
}
.hazard-vapor {
  background: rgba(155, 89, 182, 0.25);
  border: 2px solid #9b59b6;
  color: #c39bd3;
  box-shadow: 0 0 15px rgba(155, 89, 182, 0.4);
  animation: hazardPulse 2s infinite;
}
.hazard-spill {
  background: rgba(244, 162, 97, 0.25);
  border: 2px solid #f4a261;
  color: #f4a261;
  box-shadow: 0 0 12px rgba(244, 162, 97, 0.4);
}
.hazard-leak {
  background: rgba(243, 156, 18, 0.25);
  border: 2px solid #f39c12;
  color: #f5b041;
  box-shadow: 0 0 12px rgba(243, 156, 18, 0.4);
  animation: hazardPulse 2s infinite;
}
.hazard-explosion {
  background: rgba(255, 68, 68, 0.3);
  border: 2px solid #ff4444;
  color: #ff6666;
  box-shadow: 0 0 25px rgba(255, 68, 68, 0.6);
  animation: hazardPulse 1s infinite;
}
.hazard-radiation {
  background: rgba(231, 76, 60, 0.25);
  border: 2px solid #e74c3c;
  color: #ec7063;
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
  animation: hazardPulse 1.5s infinite;
}
.hazard-hot-zone {
  background: rgba(230, 57, 70, 0.12);
  border: 2px dashed #e63946;
  color: #e63946;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.hazard-warm-zone {
  background: rgba(244, 162, 97, 0.08);
  border: 2px dashed #f4a261;
  color: #f4a261;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}
.hazard-cold-zone {
  background: rgba(42, 157, 143, 0.08);
  border: 2px dashed #2a9d8f;
  color: #2a9d8f;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

@keyframes hazardPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.plume-cone {
  position: absolute;
  z-index: 12;
  transition: left 0.4s ease, top 0.4s ease;
}

.plume-origin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e63946;
  border: 2px solid #fff;
  position: absolute;
  top: -7px;
  left: -7px;
  z-index: 14;
}

.plume-shape {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transition: transform 0.5s ease;
}

.plume-gas .plume-shape {
  background: linear-gradient(180deg, rgba(155, 89, 182, 0.85) 0%, rgba(155, 89, 182, 0.15) 100%);
}
.plume-smoke .plume-shape {
  background: linear-gradient(180deg, rgba(120, 120, 120, 0.85) 0%, rgba(120, 120, 120, 0.15) 100%);
}
.plume-thermal .plume-shape {
  background: linear-gradient(180deg, rgba(230, 57, 70, 0.8) 0%, rgba(244, 162, 97, 0.15) 100%);
}
.plume-chemical .plume-shape {
  background: linear-gradient(180deg, rgba(244, 162, 97, 0.85) 0%, rgba(244, 162, 97, 0.15) 100%);
}

.plume-label {
  position: absolute;
  top: -22px;
  left: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c39bd3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.plume-thermal .plume-label { color: #e63946; }
.plume-smoke .plume-label { color: #aaa; }
.plume-chemical .plume-label { color: #f4a261; }

.unit-token {
  position: absolute;
  min-width: 80px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  user-select: none;
  z-index: 20;
  border: 2px solid;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: left 0.4s ease, top 0.4s ease;
}

.unit-token.fire {
  background: rgba(230, 57, 70, 0.2);
  border-color: #e63946;
  color: #e63946;
}
.unit-token.hazmat {
  background: rgba(244, 162, 97, 0.2);
  border-color: #f4a261;
  color: #f4a261;
}
.unit-token.ems {
  background: rgba(42, 157, 143, 0.2);
  border-color: #2a9d8f;
  color: #2a9d8f;
}
.unit-token.command {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  color: #ffd700;
}
.unit-token.police {
  background: rgba(100, 149, 237, 0.2);
  border-color: #6495ed;
  color: #6495ed;
}
.unit-token.other {
  background: rgba(200, 200, 200, 0.15);
  border-color: #aaa;
  color: #ccc;
}

.display-right {
  width: 340px;
  padding: 16px;
  overflow-y: auto;
  border-left: 2px solid #1e3a5f;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.radio-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #111827;
  border-radius: 10px;
  padding: 14px 18px;
  border: 1px solid #1e3a5f;
}

.radio-panel h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7fa8c9;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1e3a5f;
}

.radio-send-form {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-shrink: 0;
}

.radio-send-form textarea {
  flex: 1;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 7px 10px;
  color: #e0e6f0;
  font-size: 0.82rem;
  font-family: inherit;
  resize: none;
}

.radio-send-form textarea:focus {
  outline: none;
  border-color: #6495ed;
}

.send-radio-btn {
  padding: 8px 16px;
  background: #6495ed;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  align-self: flex-end;
}
.send-radio-btn:hover {
  background: #4a7ad7;
}

.log-panel {
  background: #111827;
  border-radius: 10px;
  padding: 14px 18px;
  border: 1px solid #1e3a5f;
  max-height: 200px;
  display: flex;
  flex-direction: column;
}

.log-panel h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7fa8c9;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1e3a5f;
  flex-shrink: 0;
}

.incident-log-panel h3 { color: #e63946; }

.log-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-entry {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.4;
  animation: fadeIn 0.4s ease;
}

.log-time {
  font-size: 0.68rem;
  color: #5a8aaa;
  margin-right: 6px;
}

.log-escalation {
  background: rgba(230, 57, 70, 0.1);
  color: #e63946;
  border-left: 3px solid #e63946;
  font-weight: 600;
}

.log-environmental {
  background: rgba(244, 162, 97, 0.1);
  color: #f4a261;
  border-left: 3px solid #f4a261;
}

.log-update {
  background: rgba(42, 157, 143, 0.08);
  color: #2a9d8f;
  border-left: 3px solid #2a9d8f;
}

.log-custom {
  background: rgba(127, 168, 201, 0.08);
  color: #c0d4e8;
  border-left: 3px solid #7fa8c9;
}

.log-level {
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  border-left: 3px solid #ffd700;
  font-weight: 600;
}

.log-evacuation {
  background: rgba(230, 57, 70, 0.08);
  color: #ff6b6b;
  border-left: 3px solid #e63946;
  font-weight: 600;
}

.log-tactical {
  background: rgba(100, 149, 237, 0.08);
  color: #6495ed;
  border-left: 3px solid #6495ed;
}

.log-decision {
  background: rgba(127, 168, 201, 0.08);
  color: #c0d4e8;
  border-left: 3px solid #7fa8c9;
}

.log-event {
  background: rgba(127, 168, 201, 0.08);
  color: #c0d4e8;
  border-left: 3px solid #7fa8c9;
}

.radio-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.radio-msg {
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.5;
  animation: fadeIn 0.4s ease;
}

.radio-msg .radio-time {
  font-size: 0.7rem;
  color: #5a8aaa;
  margin-right: 6px;
}

.radio-msg .radio-sender {
  font-weight: 700;
  margin-right: 4px;
}

.radio-msg.incoming {
  background: rgba(30, 58, 95, 0.5);
  border-left: 3px solid #7fa8c9;
  color: #c0d4e8;
}

.radio-msg.outgoing {
  background: rgba(42, 157, 143, 0.15);
  border-left: 3px solid #2a9d8f;
  color: #2a9d8f;
}

.radio-msg.alert {
  background: rgba(230, 57, 70, 0.1);
  border-left: 3px solid #e63946;
  color: #e63946;
  font-weight: 600;
}

.radio-msg.update {
  background: rgba(244, 162, 97, 0.1);
  border-left: 3px solid #f4a261;
  color: #f4a261;
}

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