/* ============================================================
   NABU MULTIPLAYER — lobby, session cards, spectator view.
   Layered on retro-theme.css; reuses its --retro-* tokens.
   ============================================================ */

/* ----- Hero / counters ----- */
.mp-hero {

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 240, 255, 0.5);
  background:
    linear-gradient(90deg, rgba(0, 180, 255, 0.18), rgba(0, 18, 51, 0.6) 60%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 240, 255, 0.05) 3px 4px);
  box-shadow: 0 0 24px rgba(0, 180, 255, 0.3);
}

.mp-hero-title {

  font-family: "Press Start 2P", "Orbitron", monospace;
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: var(--retro-cyan);
  text-shadow: var(--retro-glow-cyan);
  letter-spacing: 0.08em;
  margin: 0;
}

.mp-hero-sub {

  color: var(--retro-ice);
  margin-top: 0.5rem;
}

.mp-counters {

  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.mp-counter {

  text-align: center;
  min-width: 90px;
}

.mp-counter-value {

  font-family: "Press Start 2P", monospace;
  font-size: 1.6rem;
  color: var(--retro-white);
  text-shadow: var(--retro-glow-white);
}

.mp-counter-label {

  font-family: "Orbitron", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--retro-blue);
}

.mp-live-dot {

  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00ffd1;
  box-shadow: 0 0 8px #00ffd1;
  margin-right: 0.4rem;
  animation: mp-pulse 1.6s ease-in-out infinite;
}

@keyframes mp-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* ----- Session grid + cards ----- */
.mp-grid {

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.mp-card-link,
.mp-card-link:hover {

  color: inherit;
  text-decoration: none;
  text-shadow: none;
  display: block;
}

.mp-card {

  height: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(0, 180, 255, 0.5);
  background: rgba(0, 18, 51, 0.78);
  box-shadow: 0 0 14px rgba(0, 180, 255, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.mp-card:hover {

  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 240, 255, 0.4);
}

.mp-card-ingame {

  border-color: rgba(0, 255, 209, 0.7);
}

.mp-card-head {

  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.mp-card-title {

  flex: 1;
  min-width: 0;
}

.mp-card-game {

  font-family: "Orbitron", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--retro-blue);
}

.mp-card-name {

  font-family: "Orbitron", monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--retro-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-card-host {

  font-size: 0.85rem;
  color: var(--retro-ice);
}

.mp-card-badges {

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.mp-badge {

  font-family: "Press Start 2P", monospace;
  font-size: 0.5rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid currentColor;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.mp-badge-lobby  { color: var(--retro-blue); }
.mp-badge-ingame { color: #00ffd1; box-shadow: 0 0 8px rgba(0, 255, 209, 0.5); }
.mp-badge-dev    { color: #ffd166; }
.mp-lock         { color: #ffd166; }

.mp-card-desc {

  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--retro-ice);
}

.mp-slots {

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.mp-slot {

  position: relative;
  padding: 0.35rem 0.4rem;
  min-height: 2.4rem;
  border: 1px solid rgba(0, 240, 255, 0.6);
  background: rgba(0, 180, 255, 0.15);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.mp-slot-name {

  color: var(--retro-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-slot-host {

  border-color: #ffd166;
  box-shadow: inset 0 0 6px rgba(255, 209, 102, 0.4);
}

.mp-slot-away {

  opacity: 0.45;
  border-style: dashed;
}

.mp-slot-empty {

  border-style: dashed;
  border-color: rgba(0, 180, 255, 0.35);
  background: transparent;
  color: rgba(0, 180, 255, 0.5);
  align-items: center;
}

.mp-slot-score {

  color: #00ffd1;
  font-size: 0.75rem;
}

.mp-slot-ready {

  color: #5edc78;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.mp-card-foot {

  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--retro-ice);
}

.mp-card-id {

  font-family: "Share Tech Mono", monospace;
  color: var(--retro-blue);
}

.mp-card-status {

  margin-top: 0.4rem;
  padding: 0.3rem 0.5rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  color: #00ffd1;
  border-left: 2px solid #00ffd1;
  background: rgba(0, 255, 209, 0.06);
}

/* ----- Empty state ----- */
.mp-empty {

  text-align: center;
  padding: 2.5rem 1rem;
  border: 1px dashed rgba(0, 180, 255, 0.5);
}

.mp-empty-title {

  font-family: "Press Start 2P", monospace;
  font-size: 0.9rem;
  color: var(--retro-cyan);
  margin-bottom: 1rem;
}

/* ----- Game tiles ----- */
.mp-game-grid {

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.mp-game-tile {

  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 180, 255, 0.45);
  background: rgba(0, 18, 51, 0.72);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.mp-game-tile:hover {

  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 180, 255, 0.35);
}

.mp-game-tile-body {

  padding: 0.75rem 0.9rem;
  flex: 1;
}

.mp-game-live {

  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  color: #00ffd1;
}

.mp-game-id {

  font-family: "Press Start 2P", monospace;
  font-size: 1.3rem;
  color: var(--retro-white);
  text-shadow: var(--retro-glow-white);
}

/* ----- Recent matches ----- */
.mp-recent {

  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.mp-recent-item {

  flex: none;
  min-width: 220px;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(0, 180, 255, 0.35);
  background: rgba(0, 8, 20, 0.6);
  font-size: 0.85rem;
}

.mp-recent-winner {

  color: #ffd166;
}

/* ----- Spectator page ----- */
.mp-log,
.mp-chat {

  font-family: "Share Tech Mono", monospace;
  font-size: 0.9rem;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 8, 20, 0.7);
  border: 1px solid rgba(0, 180, 255, 0.35);
}

.mp-log-time,
.mp-chat-time {

  color: rgba(0, 180, 255, 0.6);
  margin-right: 0.5rem;
}

.mp-chat-name {

  color: var(--retro-cyan);
  margin-right: 0.4rem;
}

.mp-chat-web .mp-chat-name {

  color: #ffd166;
}

.mp-chat-system {

  color: rgba(168, 216, 255, 0.7);
  font-style: italic;
}

.mp-hex {

  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  max-height: 420px;
  overflow-y: auto;
  white-space: pre;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 209, 102, 0.4);
  color: #e6ce80;
}

.nabu-icon {

  flex: none;
  image-rendering: pixelated;
  background: rgba(0, 8, 20, 0.6);
  border: 1px solid rgba(0, 180, 255, 0.4);
}

.nabu-icon-empty {

  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 240, 255, 0.6);
}

/* Nav link live badge */
.mp-nav-badge {

  margin-left: 0.4rem;
  padding: 0 0.35rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.55rem;
  line-height: 1.4rem;
  color: var(--retro-deeper);
  background: #00ffd1;
  box-shadow: 0 0 6px #00ffd1;
}
