/* ============================================================
   ENEMY BASE SCENE — commander-of-war-enemy-base-style.css
   All rules scoped to #scene-enemybase to avoid conflicts
   ============================================================ */

#scene-enemybase {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg, #0d1a0f);
  overflow: hidden;
}

/* ── HUD bar ── */
#eb-hud {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  background: var(--bg2, #111f13);
  border-bottom: 1px solid var(--border, #1e3322);
  flex-shrink: 0;
  z-index: 100;
  padding: 0 12px;
}

/* Top-left: resources */
#eb-resources {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Top-centre: attack button */
#eb-attack-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

#eb-btn-attack {
  background: rgba(200,30,30,0.15);
  border: 2px solid rgba(200,30,30,0.55);
  border-radius: 8px;
  color: #ff4040;
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 7px 28px;
  cursor: pointer;
  transition: all 0.15s;
}
#eb-btn-attack:hover {
  background: rgba(200,30,30,0.3);
  border-color: #ff4040;
  color: #fff;
}

/* Top-right: player info + back */
#eb-player-info {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

#eb-player-name {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  color: #ff8888;
  letter-spacing: 0.5px;
}

#eb-btn-back {
  background: rgba(0,170,255,0.08);
  border: 1px solid rgba(0,170,255,0.25);
  border-radius: 5px;
  color: var(--accent, #00aaff);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
#eb-btn-back:hover { background: rgba(0,170,255,0.16); }

/* ── Map ── */
#eb-main {
  flex: 1;
  overflow: hidden;
  position: relative;
}

#eb-map-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  position: relative;
}

#eb-map-canvas {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
}

#eb-grid {
  display: grid;
  position: relative;
}

#eb-base-outline {
  position: absolute;
  border: 2px solid rgba(255,68,68,0.5);
  pointer-events: none;
  box-shadow: inset 0 0 30px rgba(255,68,68,0.08), 0 0 20px rgba(255,68,68,0.15);
  z-index: 2;
}

/* Enemy tint on buildings */
#scene-enemybase .bld-obj {
  filter: hue-rotate(140deg) saturate(0.75);
}

/* ── World map scene positioning ── */
#scene-worldmap {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ── Attack layout ── */
#eb-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── Platoon panel (left) ── */
#eb-platoon-panel {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg2, #111f13);
  border-right: 1px solid var(--border, #1e3322);
  display: none;  /* shown when Attack is clicked */
  flex-direction: column;
  overflow: hidden;
}

#eb-platoon-title {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  color: #ff8888;
  letter-spacing: 0.5px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border, #1e3322);
  flex-shrink: 0;
}

#eb-platoon-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eb-platoon-card {
  background: rgba(255,68,68,0.06);
  border: 1px solid rgba(255,68,68,0.2);
  border-radius: 7px;
  padding: 9px 10px;
}

.eb-platoon-name {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  color: #ff8888;
  margin-bottom: 5px;
}

.eb-platoon-units {
  font-size: 13px;
  color: var(--text2, #8aaa86);
  margin-bottom: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.eb-platoon-btns {
  display: flex;
  gap: 6px;
}

.eb-deploy-btn {
  flex: 1;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(255,68,68,0.1);
  border: 1px solid rgba(255,68,68,0.35);
  color: #ff6060;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.eb-deploy-btn:hover { background: rgba(255,68,68,0.2); }
.eb-deploy-btn.eb-btn-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.eb-platoon-empty {
  font-size: 12px;
  color: var(--text3, #4a6a46);
  text-align: center;
  padding: 20px 8px;
  line-height: 1.6;
  font-family: 'Rajdhani', sans-serif;
}

#eb-platoon-actions {
  padding: 8px;
  border-top: 1px solid var(--border, #1e3322);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

#eb-select-all-btn, #eb-recall-btn {
  width: 100%;
  padding: 7px;
  border-radius: 6px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
}

#eb-select-all-btn {
  background: rgba(68,136,255,0.1);
  border-color: rgba(68,136,255,0.35);
  color: #4488ff;
}
#eb-select-all-btn:hover { background: rgba(68,136,255,0.2); }

#eb-recall-btn {
  background: rgba(255,220,0,0.08);
  border-color: rgba(255,220,0,0.3);
  color: #ffe060;
}
#eb-recall-btn:hover { background: rgba(255,220,0,0.15); }

/* ── Map takes remaining space ── */
#eb-main {
  flex: 1;
}

/* ── Destroyed building ── */
.eb-bld-destroyed {
  filter: grayscale(1) brightness(0.4) !important;
  border: 1px solid rgba(255,0,0,0.3) !important;
  position: relative;
}

.eb-destroyed-x {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: rgba(255,60,60,0.8);
  font-weight: 900;
  pointer-events: none;
}