/* ===============================================
   NAVIGATION STYLING - BIOMETRIC THEME
   =============================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(8px); /* Safari support */
  backdrop-filter: blur(8px);
  z-index: 0;
}

#home-btn,
#gamemode-btn {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(0, 255, 255, 0.5);
  color: #00ffff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
  margin-right: 0.5rem;
}

#home-btn::before,
#gamemode-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

#home-btn:hover,
#gamemode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 255, 0.4);
  border-color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

#home-btn:hover::before,
#gamemode-btn:hover::before {
  left: 100%;
}

#home-btn:active,
#gamemode-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
}

/* ===============================================
   BASE BACKGROUND - TECH FACILITY
   =============================================== */
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 255, 255, 0.03) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
}

/* ===============================================
   LOBBY DISPLAY OPTIMIZATION
   =============================================== */

/* Prevent body scrolling and ensure fixed layout */
body.lobby-active {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Main container optimization for projector display */
.main-container {
  margin-top: 4rem;
  height: calc(100vh - 4rem) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  padding-bottom: 2rem !important; /* Extra space to prevent footer overlap */
  overflow: hidden !important;
  z-index: 900; /* Lower than dashboard */
}

/* Card base styling optimization */
.card {
  max-height: 100% !important;
  overflow: hidden !important;
}

/* Responsive layout for smaller screens */
@media (max-width: 1024px) {
  #waiting-card {
    width: 95vw !important;
    min-height: 80vh !important;
    max-height: 80vh !important;
    padding: 1.5rem !important;
  }

  #waiting-card .title {
    font-size: 2rem !important;
  }

  .room-code {
    font-size: 2.5rem !important;
    letter-spacing: 0.3rem !important;
  }

  .player-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .player-item {
    min-height: 60px !important;
    padding: 0.6rem !important;
  }

  .player-name {
    font-size: 1.1rem !important;
  }
}

@media (max-width: 768px) {
  #waiting-card {
    width: 98vw !important;
    min-height: 85vh !important;
    max-height: 85vh !important;
    padding: 1rem !important;
  }

  .player-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    max-height: 350px !important;
    gap: 0.5rem !important;
  }

  .player-item {
    min-height: 55px !important;
    padding: 0.5rem !important;
    gap: 0.75rem !important;
  }

  .player-name {
    font-size: 1rem !important;
  }

  .player-avatar {
    width: 40px !important;
    height: 40px !important;
  }

  .player-number {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.7rem !important;
    top: -4px !important;
    right: -4px !important;
  }

  .start-btn,
  .end-btn {
    font-size: 1.1rem !important;
    padding: 1rem 2rem !important;
    min-width: 150px !important;
  }
}

/* Enhanced visibility for projector display */
.projector-enhanced {
  filter: contrast(1.2) brightness(1.1) !important;
}

/* Empty state styling for when no players are connected */
.player-list-empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 200px !important;
  color: #64748b !important;
  font-family: "Courier New", monospace !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-size: 1.1rem !important;
}

.player-list-empty::before {
  content: "👥";
  font-size: 3rem !important;
  margin-bottom: 1rem !important;
  opacity: 0.5 !important;
}
