/* 0. FONTS - Always at the top */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;700&display=swap');

/* 1. GLOBAL STYLES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: #0f0f0f;
  color: #f5f5f5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.app-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
}

/* 2. HEADER & LOGO */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: #FFBF00;
  text-shadow: 2px 2px #000, 0 0 10px rgba(255, 191, 0, 0.5);
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: pulse 2s infinite;
}

.logo-emoji {
  display: inline-block;
  line-height: 1;
  font-size: 1.3rem;
}

header {
  margin-top: 20px;
  margin-bottom: 40px;
  text-align: center;
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #ffffff;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 10px; /* Reduced from 50px to keep it tighter */
}

.cheers {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 1.6rem; /* Scaled down for better proportion */
  color: #aaaaaa;
  margin-top: 10px;
  margin-bottom: 0;
  letter-spacing: 1.5px;
  text-transform: uppercase;
padding-top: 20px;
}

#display-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: #FFBF00;
}

/* 3. LEADERBOARD CORE */
.leaderboard-card {
  background: #1a1a1a;
  border-radius: 24px;
  padding: 15px;
  border: 1px solid #2a2a2a;
  margin-bottom: 30px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* Keeps the columns locked so they don't drift */
}

/* Header Styles */
.leaderboard-table th {
  color: #555;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding-bottom: 15px;
}

/* Body Cell Styles */
.leaderboard-table td {
  padding: 18px 0;
  border-bottom: 1px solid #242424;
  vertical-align: middle;
}

/* 4. COLUMN ALIGNMENT & WIDTHS */

/* RANK COLUMN - Centered Header & Number */
.leaderboard-table th:nth-child(1), 
.leaderboard-table td:nth-child(1) { 
  width: 80px;
  text-align: center !important; /* Centers "RANK" and the numbers */
  color: #555;
  font-family: 'Space Grotesk', sans-serif;
}

/* NAME COLUMN - Left Aligned (Best for readability) */
.leaderboard-table th:nth-child(2), 
.leaderboard-table td:nth-child(2) { 
  width: auto; 
  text-align: left !important;
  color: #fff;
  font-weight: 700;
  padding-left: 20px; /* Gives the names some space from the Rank column */
}

/* BEERS COLUMN - Centered Header & Score */
.leaderboard-table th:nth-child(3), 
.leaderboard-table td:nth-child(3) { 
  width: 100px; 
  text-align: center !important; /* Centers "BEERS" and the beer counts */
  font-family: 'Space Grotesk', sans-serif;
  color: #FFBF00;
  font-size: 1.2rem;
}

/* Final cleanup to ensure no rogue padding pushes the centered text off-balance */
.leaderboard-table th, 
.leaderboard-table td {
  padding-left: 0;
  padding-right: 0;
}

/* 5. BUTTONS */
.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-beer-btn {
  width: 100%;
  padding: 24px;
  background: linear-gradient(135deg, #FFBF00 0%, #FF9900 100%);
  color: #000;
  border: none;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(255, 191, 0, 0.2);
}

.add-beer-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(255, 191, 0, 0.4);
  filter: brightness(1.1);
}

.add-beer-btn:active {
  transform: translateY(1px) scale(0.97);
}

.minus-beer-btn {
  width: 100%;
  background: transparent;
  color: #555;
  border: 1px solid #333;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.minus-beer-btn:hover {
  color: #ff4444;
  border-color: #ff4444;
  background: rgba(255, 68, 68, 0.05);
}

/* 6. OVERLAY & MODALS */
.overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  background: #1a1a1a;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  border: 1px solid #FFBF00;
}

.auth-card input {
  width: 100%;
  padding: 12px;
  margin: 20px 0;
  background: #000;
  border: 1px solid #333;
  color: white;
  border-radius: 8px;
}

.auth-card button {
  width: 100%;
  padding: 12px;
  background: #FFBF00;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}