/* =======================
   BrickFeud v1.1 - style.css
   ======================= */

/* Base body styles */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #0d1b2a, #1b263b);
  color: #fff;
  overflow: hidden;
}

/* Game canvas */
canvas {
  display: block;
  margin: 20px auto;
  background: #000;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
}

/* HUD (top bar) */
.hud {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.7);
  border-bottom: 2px solid #2563eb;
  z-index: 1000;
}

.hud span {
  font-size: 1rem;
  font-weight: bold;
}

/* HUD buttons */
.hud .buttons {
  display: flex;
  gap: 10px;
}

.hud a {
  text-decoration: none;
  color: #fff;
  background: #1e3a8a;
  padding: 6px 12px;
  border-radius: 6px;
  transition: 0.3s;
  font-size: 0.9rem;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.6);
}

.hud a:hover {
  background: #2563eb;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.9);
}

/* Score / Lives / Level text on canvas */
#gameCanvas-text {
  font-size: 16px;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
}

/* Popups (like Game Over, How to Play, etc.) */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 20, 0.9);
  border: 2px solid #2563eb;
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;
  text-align: center;
  display: none;
  color: #fff;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
}

.popup h2 {
  margin-bottom: 10px;
  color: #facc15;
}

.popup button {
  margin-top: 15px;
  padding: 8px 16px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.popup button:hover {
  background: #1e40af;
}


/* =======================
   Landing Page Styles
   ======================= */

.landing-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  padding: 20px;
}

.title {
  font-size: 3rem;
  color: #facc15;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px #000;
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #e2e8f0;
}

.welcome {
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: #facc15;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn {
  text-decoration: none;
  padding: 12px 20px;
  background: #1e3a8a;
  color: #fff;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: 0.3s;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.6);
}

.btn:hover {
  background: #2563eb;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.9);
}

/* =======================
   Auth Pages (Login / Register)
   ======================= */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 300px;
}

.auth-form input {
  padding: 10px;
  border: 2px solid #2563eb;
  border-radius: 6px;
  font-size: 1rem;
}

.auth-form input:focus {
  outline: none;
  border-color: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.7);
}

.auth-form button {
  padding: 12px;
  background: #2563eb;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

.auth-form button:hover {
  background: #1e40af;
}

.error {
  color: #f87171;
  margin-bottom: 15px;
  font-weight: bold;
}

.switch-link {
  margin-top: 10px;
  color: #e2e8f0;
}

.switch-link a {
  color: #facc15;
  text-decoration: none;
}

.switch-link a:hover {
  text-decoration: underline;
}

/* =======================
   Dashboard Page
   ======================= */

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.tab-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background: #1e3a8a;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

.tab-btn:hover {
  background: #2563eb;
}

.tab-btn.active {
  background: #facc15;
  color: #000;
  font-weight: bold;
}

.stats-list {
  list-style: none;
  padding: 0;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.stats-list li {
  background: rgba(0,0,0,0.6);
  padding: 10px;
  margin: 8px 0;
  border-radius: 6px;
  border-left: 4px solid #2563eb;
}

/* =======================
   Leaderboard Styles
   ======================= */

.leaderboard-container {
  max-width: 800px;
  margin: 20px auto;
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
}

.leaderboard-table th, 
.leaderboard-table td {
  padding: 12px;
  text-align: center;
}

.leaderboard-table th {
  background: #2563eb;
  color: #fff;
  font-size: 1.1rem;
}

.leaderboard-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.leaderboard-table tr:hover {
  background: rgba(37, 99, 235, 0.2);
}

.leaderboard-table td {
  color: #e2e8f0;
  font-size: 1rem;
}

/* Leaderboard filter buttons */
.leaderboard-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.leaderboard-filters button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: #1e3a8a;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.3s;
}

.leaderboard-filters button:hover {
  background: #2563eb;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

/* Highlight current player row */
.highlight-row {
  background: rgba(250, 204, 21, 0.3) !important;
  font-weight: bold;
  color: #facc15;
}
