/* ============================================================
   games.css — Games grid, game modal, all mini-game UI
   ============================================================ */

/* ── GAMES GRID ───────────────────────────────────────────── */
.ggrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.gc {
  background: var(--sur);
  border: 1px solid var(--bdr);
  border-radius: 19px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, border-color .2s;
  display: flex; flex-direction: column;   /* equal-height cards */
}
.gc:hover     { transform: translateY(-3px); border-color: rgba(224,25,121,.4); }
.gc-ban       { height: 115px; display: flex; align-items: center; justify-content: center; font-size: 60px; }
.gc-body      { padding: 15px; flex: 1 1 auto; display: flex; flex-direction: column; }
.gc-name      { font-size: 15px; font-weight: 800; }
.gc-desc      { font-size: 12px; color: var(--mut); margin-top: 3px; margin-bottom: 9px; line-height: 1.5; }
.gc-rew       { display: flex; align-items: center; gap: 5px; margin-top: auto;   /* reward + Play Now pinned to the bottom */ font-size: 11.5px; color: var(--gold2); font-weight: 600; }
.gc-play {
  margin-top: 11px; width: 100%; padding: 9px;
  border: none; border-radius: 9px;
  background: linear-gradient(135deg, #e01979, #f472b6);
  color: #fff; font-weight: 700; font-size: 12px;
  cursor: pointer;
}

/* ── SPIN WHEEL ───────────────────────────────────────────── */
.spin-c { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ww     { position: relative; width: 220px; height: 220px; }
.wptr   { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 26px; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }

/* ── MEMORY MATCH ─────────────────────────────────────────── */
.mgrid { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin: 13px 0; }
.mc {
  aspect-ratio: 1;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: var(--sur2);
  border: 1px solid var(--bdr);
  transition: all .15s;
  user-select: none;
  font-size: 0;
}
.mc.fl, .mc.mt { background: rgba(224,25,121,.2); border-color: #e01979; font-size: 22px; }
.mc.mt         { opacity: .55; cursor: default; }

/* ── NUMBER GAME ──────────────────────────────────────────── */
.ng         { text-align: center; }
.ng-disp    { font-size: 46px; font-weight: 900; color: #f979b7; margin: 8px 0; }
.ng-row     { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.ng-row input {
  background: var(--sur2);
  border: 1px solid var(--bdr);
  border-radius: 9px;
  padding: 10px 13px;
  color: var(--txt);
  font-size: 15px;
  width: 95px;
  text-align: center;
  outline: none;
  font-family: inherit;
}
.ng-hint { font-size: 12.5px; color: var(--mut); min-height: 19px; margin-top: 7px; }

/* ── REACTION GAME ────────────────────────────────────────── */
.rbox     { text-align: center; }
.rcircle {
  width: 135px; height: 135px;
  border-radius: 50%;
  margin: 18px auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  cursor: pointer;
  border: 3px solid var(--bdr);
  transition: all .1s;
  background: var(--sur2);
}
.rcircle.rdy   { background: rgba(16,185,129,.2); border-color: var(--grn); animation: rpulse .5s ease-in-out 3; }
.rcircle.early { background: rgba(239,68,68,.2);   border-color: var(--red); }
@keyframes rpulse { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.09); } }

/* ── SHARED GAME RESULT STYLES ────────────────────────────── */
.sres      { text-align: center; padding: 13px; border-radius: 13px; font-size: 14px; font-weight: 700; }
.sres.win  { background: rgba(16,185,129,.15); color: #10b981; border: 1px solid rgba(16,185,129,.28); }
.sres.lose { background: rgba(239,68,68,.1);   color: #f87171;  border: 1px solid rgba(239,68,68,.2); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .gopts { grid-template-columns: 1fr 1fr; }
}
