/* TheHempire Arcade Lobby — Matches TheHempire design language */

/* ============ WRAPPER ============ */
.arcade-wrapper {
  position: relative;
  min-height: 60vh;
  padding: 20px 20px 40px;
}

/* ============ HEADER ============ */
.arcade-header {
  text-align: center;
  padding: 60px 20px 30px;
}

.arcade-header h1 {
  color: rgb(220, 211, 202);
  text-transform: uppercase;
  font-weight: bold;
  font-size: 38px;
  margin-bottom: 10px;
}

.arcade-header .subtitle {
  font-size: 16px;
  color: rgb(173, 168, 162);
}

/* ============ PLAYER NAME ============ */
.player-name-display {
  font-size: 14px;
  color: #a6cd63;
  margin-top: 10px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.2s;
  font-weight: bold;
}

.player-name-display:hover {
  color: rgb(193, 193, 193);
}

/* ============ GAME GRID ============ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  padding: 10px 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============ GAME CARDS ============ */
.game-card {
  background: rgb(31, 32, 26);
  border: 1px solid rgba(142, 145, 142, 0.15);
  padding: 20px 16px;
  text-decoration: none;
  color: rgb(173, 168, 162);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: block;
  opacity: 0;
  transform: translateY(15px);
  animation: cardEntrance 0.4s ease forwards;
  animation-delay: calc(var(--card-index, 0) * 0.05s);
}

@keyframes cardEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #a6cd63;
  opacity: 0;
  transition: opacity 0.3s;
}

.game-card:hover::before {
  opacity: 1;
}

.game-card:hover {
  background: rgb(37, 41, 37);
  border-color: rgba(166, 205, 99, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
  text-decoration: none;
  color: rgb(198, 192, 186);
}

.game-card .game-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
  transition: transform 0.3s;
}

.game-card:hover .game-icon {
  transform: scale(1.1);
}

.game-card h2 {
  font-size: 15px;
  margin-bottom: 6px;
  color: #a6cd63;
  font-weight: bold;
  text-transform: uppercase;
}

.game-card p {
  font-size: 13px;
  color: rgb(142, 145, 142);
  line-height: 1.6;
  font-weight: 300;
}

/* ============ LEADERBOARD (in-card) ============ */
.card-leaderboard {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  font-family: 'Roboto Condensed', Arial, sans-serif;
}

.lb-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
  font-size: 12px;
  color: rgb(142, 145, 142);
  transition: background 0.2s;
}

.lb-entry:hover {
  background: rgba(255, 255, 255, 0.03);
}

.lb-rank {
  min-width: 18px;
  text-align: center;
  font-weight: bold;
}

.lb-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  min-width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Medal colors with left accent */
.lb-entry.lb-gold {
  border-left: 2px solid #ffd700;
}
.lb-entry.lb-gold .lb-rank,
.lb-entry.lb-gold .lb-name,
.lb-entry.lb-gold .lb-score {
  color: #ffd700;
}

.lb-entry.lb-silver {
  border-left: 2px solid #c0c0c0;
}
.lb-entry.lb-silver .lb-rank,
.lb-entry.lb-silver .lb-name,
.lb-entry.lb-silver .lb-score {
  color: #c0c0c0;
}

.lb-entry.lb-bronze {
  border-left: 2px solid #cd7f32;
}
.lb-entry.lb-bronze .lb-rank,
.lb-entry.lb-bronze .lb-name,
.lb-entry.lb-bronze .lb-score {
  color: #cd7f32;
}

/* Toggle & expand */
.lb-toggle {
  display: block;
  width: 100%;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 11px;
  padding: 5px;
  margin-top: 6px;
  background: transparent;
  border: 1px solid rgba(166, 205, 99, 0.2);
  color: #a6cd63;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
}

.lb-toggle:hover {
  background: rgba(166, 205, 99, 0.08);
  border-color: rgba(166, 205, 99, 0.4);
}

.lb-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.lb-expanded.open {
  max-height: 200px;
}

.lb-empty {
  font-size: 12px;
  color: rgb(105, 107, 102);
  padding: 6px 0;
  font-style: italic;
}

/* ============ NAME PROMPT MODAL ============ */
.arcade-name-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.anm-box {
  background: rgb(31, 32, 26);
  border: 2px solid #a6cd63;
  padding: 40px 30px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.anm-title {
  font-size: 22px;
  font-weight: bold;
  text-transform: uppercase;
  color: rgb(220, 211, 202);
  margin-bottom: 12px;
  letter-spacing: 1px;
  font-family: 'Roboto Condensed', Arial, sans-serif;
}

.anm-sub {
  font-size: 14px;
  color: rgb(142, 145, 142);
  margin-bottom: 24px;
  line-height: 1.6;
  font-family: 'Roboto Condensed', Arial, sans-serif;
}

.anm-input {
  width: 100%;
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 18px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(166, 205, 99, 0.5);
  color: rgb(220, 211, 202);
  text-align: center;
  outline: none;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

.anm-input::placeholder {
  color: rgb(105, 107, 102);
}

.anm-input:focus {
  border-color: #a6cd63;
  box-shadow: 0 0 10px rgba(166, 205, 99, 0.2);
}

.anm-btn {
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 12px 24px;
  background: rgb(61, 75, 39);
  border: none;
  color: rgb(166, 205, 99);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
}

.anm-btn:hover {
  background: rgb(88, 108, 57);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .arcade-wrapper {
    padding: 10px 10px 30px;
  }
  .arcade-header {
    padding: 40px 15px 20px;
  }
  .arcade-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .game-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .arcade-header h1 {
    font-size: 22px;
  }
}
