/* ═══ LOBBY ═══ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

html, body {
  overflow-x: hidden;
  overflow-y: auto !important;
  touch-action: auto !important;
  user-select: auto !important;
  -webkit-user-select: auto !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

#lobbyScreen {
  position: relative;
  min-height: 100vh;
  background-color: #050505;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-start; z-index: 200; padding: 48px 48px 24px;
  box-sizing: border-box;
}

.lobby-header { 
  display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 40px; 
  width: 100%;
}

.connect-logo { 
  font-family: 'Playfair Display', serif; 
  font-size: 48px; font-weight: 700; color: #fff; 
  letter-spacing: 8px; margin-bottom: 4px; 
  text-transform: uppercase;
}

.header-divider {
  width: 100%; height: 2px; background: #fff; margin-bottom: 8px;
}

.connect-subtitle { 
  font-size: 14px; color: #fff; letter-spacing: 3px; text-transform: uppercase; font-family: 'Geist Mono', monospace; 
  display: flex; align-items: center; gap: 12px; font-weight: 600;
}
.connect-subtitle .square {
  display: inline-block; width: 12px; height: 12px; border: 1px solid #fff;
}

.match-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
}

.match-card {
  background-color: #fff;
  color: #000;
  padding: 16px;
  cursor: default;
  border: 2px solid #fff;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  min-height: 140px;
  gap: 16px;
}

/* Left block: Map banner with image background and centered icon */
.match-card-left.match-map-banner {
  display: flex;
  position: relative;
  flex: 1.6;
  min-width: 360px;
  min-height: 140px;
  background-size: cover;
  background-position: center;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 14px 18px;
  overflow: hidden;
}
.map-icon-center {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(0,0,0,0.9));
  pointer-events: none;
  z-index: 1;
}
.match-info-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
  position: relative;
  color: #fff;
  text-shadow: 0 1px 5px rgba(0,0,0,0.95);
}
.map-badge-line {
  display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', monospace; font-size: 20px; font-weight: 700; text-transform: uppercase;
}
.map-badge { font-family: 'Impact', sans-serif; font-size: 26px; font-weight: normal; letter-spacing: 2px; color: #fff; }
.match-meta {
  font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; line-height: 1.6; color: #eee;
}
.match-quote {
  font-family: 'Playfair Display', serif; font-style: italic; font-size: 13px; font-weight: 700; margin-top: 8px; color: #fff;
}

/* Middle block: Score */
.match-card-middle {
  background: #000; color: #fff; padding: 12px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Geist Mono', monospace; font-size: 14px;
  border: 2px solid #000; min-width: 160px; text-align: center; font-weight: bold;
}
.score-line { font-size: 16px; margin: 8px 0; color: #ccc; }
.score-line span { color: #fff; }

/* Right block: Players */
.match-card-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: flex-start;
  gap: 8px;
  flex: 1;
  max-width: 320px;
}
.player-pill {
  background: #fff;
  border: 2px solid #000;
  padding: 4px 10px; font-size: 12px; color: #000; font-weight: bold;
  font-family: 'Geist Mono', monospace; cursor: pointer; transition: all 0.15s;
}
.player-pill:hover, .player-pill.active {
  background: #000; color: #fff;
}

.lobby-empty {
  margin-top: 32px; color: #fff; font-size: 12px; font-family: 'Geist Mono', monospace; letter-spacing: 1px;
  border: 1px solid #fff; padding: 12px 24px; font-weight: bold;
}

.lobby-connected-card {
  background-color: transparent;
  color: #fff;
  padding: 24px;
  border: 2px dashed #333;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 100px;
  font-family: 'Geist Mono', monospace;
  text-transform: uppercase;
}

.lobby-connected-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: #fff;
  margin-bottom: 8px;
}

.lobby-connected-desc {
  font-size: 13px;
  color: #999;
}

@media (max-width: 900px) {
  .match-card {
    flex-direction: column;
    min-height: auto;
  }
  .match-card-left.match-map-banner {
    min-width: 0;
    width: 100%;
  }
  .match-card-middle {
    min-width: 0;
    width: 100%;
  }
  .match-card-right {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 600px) {
  #lobbyScreen {
    padding: 24px 16px;
  }
  .connect-logo {
    font-size: 32px;
  }
  .map-icon-center {
    width: 48px;
    height: 48px;
    right: 16px;
  }
}
