/* ==============================================================================
   STEPPE IN FLAMES — 1v1 ONLINE MULTIPLAYER STYLES
   100% English UI, Military Dark Theme, High-Contrast C4ISR Pacing
   ============================================================================== */

/* Multiplayer Section inside Match Lobby */
.mp-lobby-section {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  backdrop-filter: blur(8px);
}

.mp-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.mp-badge {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  font-weight: 700;
  letter-spacing: 1px;
}

.btn-mp-refresh {
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mp-refresh:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
}

.mp-panels-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .mp-panels-grid {
    grid-template-columns: 1fr;
  }
}

.mp-panel {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.mp-panel-title {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.mp-panel-desc {
  margin: 0 0 14px 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.mp-form-group {
  margin-bottom: 12px;
}

.mp-form-group label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.mp-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #f8fafc;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.mp-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.3);
}

.mp-faction-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  border-radius: 4px;
}

.mp-radio-lbl {
  font-size: 11px !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 0 !important;
}

.btn-mp-create {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  margin-top: auto;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}

.btn-mp-create:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.5);
}

/* Open Rooms Table */
.mp-table-wrapper {
  overflow-x: auto;
  flex: 1;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.mp-rooms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}

.mp-rooms-table th {
  background: rgba(15, 23, 42, 0.95);
  color: #94a3b8;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 2;
}

.mp-rooms-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.mp-room-tr:hover {
  background: rgba(56, 189, 248, 0.08);
}

.mp-scenario-tag {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.mp-host-tag {
  color: #f8fafc;
  font-weight: 700;
}

.mp-vacant-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 10px;
}

.btn-mp-join {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mp-join:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.mp-empty-row, .mp-loading-row, .mp-error-row {
  text-align: center !important;
  padding: 24px 12px !important;
  color: #94a3b8 !important;
  line-height: 1.6;
}

.mp-error-row {
  color: #f87171 !important;
}

/* Join Modal Styling */
.mp-join-dialog {
  max-width: 480px !important;
}

.mp-join-body {
  padding: 10px 0;
}

.mp-join-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 16px;
}

.join-vacant-tag {
  color: #38bdf8;
  font-weight: 800;
}

.btn-mp-cancel {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.btn-mp-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

/* HUD Multiplayer Status Pill */
.mp-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.mp-hud-badge.waiting {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.mp-hud-badge.active-my-turn {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.6);
  color: #4ade80;
  animation: mp-pulse 2s infinite ease-in-out;
}

.mp-hud-badge.active-opp-turn {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.mp-hud-badge.finished {
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(100, 116, 139, 0.4);
  color: #94a3b8;
}

.mp-pulse-dot {
  font-size: 12px;
  line-height: 1;
}

.mp-pulse-dot.green { color: #22c55e; }
.mp-pulse-dot.amber { color: #f59e0b; animation: mp-blink 1.2s infinite; }
.mp-pulse-dot.blue { color: #38bdf8; }
.mp-pulse-dot.gray { color: #94a3b8; }

@keyframes mp-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes mp-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.3); }
  50% { box-shadow: 0 0 16px rgba(34, 197, 94, 0.6); }
}
