/* ============================================================
   dashboard.css — just the front page (the arcade itself).

   Each game's card is built from its entry in games.js, including
   its two block colours, so adding a game needs nothing here.
   ============================================================ */

body {
  background: linear-gradient(180deg, #0b1026 0%, #1a2456 55%, #2b3a7a 100%);
  color: #fff;
}

/* a few stars, same trick as the mining game's night sky */
.star {
  position: fixed;
  width: 4px; height: 4px;
  background: #fff;
  opacity: .85;
  animation: twinkle 3s infinite;
}
@keyframes twinkle { 0%,100% { opacity:.85 } 50% { opacity:.25 } }

main { padding-bottom: 60px; }

.arcade-sub {
  margin-top: 18px;
  color: #9fe3ff;
  font-size: .85rem;
  text-shadow: 1px 1px 0 #000;
  min-height: 1.2em;
}

/* ---------------------------------------------------------- the cards */
.gamegrid {
  margin: 34px auto 0;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  text-align: left;
}

.gamecard {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(0, 0, 0, .55);
  border: 4px solid #2a2a2a;
  border-top-color: #6d6d6d;
  border-left-color: #6d6d6d;
  transition: transform .1s;
}
.gamecard:hover { transform: translateY(-4px); }
.gamecard:active { border-top-color: #2a2a2a; border-left-color: #2a2a2a; }

/* the little picture at the top, built from the game's own colours */
.gamecard .art {
  height: 112px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 4px solid #2a2a2a;
  background: repeating-linear-gradient(90deg,
              var(--a) 0 16px, var(--b) 16px 32px);
}
.gamecard .art .emoji {
  font-size: 3rem;
  filter: drop-shadow(3px 3px 0 rgba(0,0,0,.45));
}

/* "2 playing" — only shown when somebody actually is */
.gamecard .playing {
  position: absolute;
  top: 8px; right: 8px;
  font-size: .62rem;
  font-weight: bold;
  letter-spacing: .06em;
  background: #ff7a28;
  color: #2a1000;
  border: 2px solid #a34608;
  padding: 4px 7px;
  animation: flicker .7s infinite alternate;
}
.gamecard .playing.hidden { display: none; }

.gamecard .cardtext { padding: 14px 16px 16px; }

.gamecard h2 {
  font-size: 1.15rem;
  letter-spacing: .06em;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 6px;
}
.gamecard .tag {
  font-size: .78rem;
  color: #cfd8e8;
  min-height: 2.4em;
  margin-bottom: 10px;
}

.gamecard .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .68rem;
}
.gamecard .stat {
  background: #3a3a3a;
  border: 2px solid #222;
  border-top-color: #5c5c5c;
  border-left-color: #5c5c5c;
  padding: 4px 7px;
  color: #ddd;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.gamecard .stat.hidden { display: none; }
.gamecard .stat.mine { background: #5a4a12; color: #ffe680; border-top-color: #8a7524; border-left-color: #8a7524; }
.gamecard .stat b { color: #fff; }

/* ---------------------------------------------------------- footer note */
.addgame {
  margin: 40px auto 0;
  max-width: 900px;
  font-size: .72rem;
  color: #8fa0c0;
  text-shadow: 1px 1px 0 #000;
  line-height: 1.6;
}
.addgame code {
  background: rgba(0,0,0,.5);
  border: 2px solid #2a2a2a;
  padding: 1px 5px;
  color: #ffe680;
}

@media (max-width: 480px) {
  .gamegrid { gap: 14px; margin-top: 26px; }
  .gamecard .art { height: 92px; }
  .gamecard .art .emoji { font-size: 2.4rem; }
}
