/* ===== Go Fish — game-specific styles =====
   Generic glass chrome comes from shared/css/glass.css (cards reuse .c-card
   wholesale). This file lays out the four-seat table on a deep-ocean blue:
   opponents' card-back stacks along the top (click one to ask it for a rank),
   the last exchange in the middle well, the ocean pile, and your 5-card
   hand at the bottom. */

:root {
  /* Go Fish swims on ocean blue — buttons wear a bright lagoon teal. */
  --accent-1: #1f8fbf;
  --accent-2: #45c6e8;
  --on-accent: #04222f;
  --back-1: #2f7fb8;
  --back-2: #123a63;
  /* glass.css paints .c-app from these — surface-to-depths water gradient */
  --bg-1: #0e5f8a;
  --bg-2: #062d4a;
  --bg-glow-a: rgba(14, 95, 138, .55);
  --bg-glow-b: rgba(69, 198, 232, .22);
  /* blue-tinted text tones instead of the indigo defaults */
  --c-text: #e8f4fa;
  --c-muted: #b3d4e6;
}

.c-app { --fpad: clamp(12px, 4vw, 36px); }
/* overscroll / letterbox behind the water */
body { background: #062d4a; }

/* glass.css hardcodes the frosted modal panel to an indigo tint; recolor it
   (and the backdrop) to deep-sea blue so the Rules / game-over modals match
   this table. Scoped here so no other game is affected. */
.c-modal__backdrop { background: rgba(2, 16, 28, .5); }
.c-modal__panel { background: rgba(6, 38, 62, .72); }

/* ---------- Table stack ---------- */
.gf-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.8vh, 16px);
  width: 100%;
  /* grows with big monitors instead of stopping at a small-table width */
  max-width: 1160px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}

/* ---------- Opponent seats ---------- */
.gf-opps { display: flex; justify-content: space-around; gap: 12px; width: 100%; }
.gf-seat {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border-radius: 12px; padding: 4px 8px;
  cursor: default; transition: background .2s ease, transform .12s ease;
}
/* while you hold a picked rank, the opponents light up as drop targets */
.gf-seat--askable { cursor: pointer; }
.gf-seat--askable:hover { background: rgba(69, 198, 232, .14); transform: translateY(-2px); }
.gf-seat__label {
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--c-muted);
  display: flex; align-items: center; gap: 8px;
}
/* Card-count pill, like big2's. */
.gf-count {
  min-width: 26px; padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: #fff; font-size: 12px; font-weight: 800;
  text-align: center; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
/* Books collected so far — gold, so it reads as the score of this game. */
.gf-books {
  min-width: 26px; padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(230, 184, 0, .45);
  background: rgba(230, 184, 0, .16);
  color: #ffd97a; font-size: 12px; font-weight: 800;
  text-align: center; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.gf-books::before { content: "\1F4DA "; font-size: 10px; }
/* Gold ring marks whose turn it is. */
.gf-seat--turn > .gf-seat__label { color: var(--accent-2); }
.gf-seat--turn .gf-backs, .gf-seat--turn .gf-well--hand { box-shadow: 0 0 0 2px rgba(69, 198, 232, .6), 0 0 16px rgba(69, 198, 232, .25); border-radius: 12px; }

/* Up to four overlapping card backs per opponent (fewer as cards move).
   Card widths scale with the viewport (vw) but are vh-capped so a short
   window never overflows; small screens keep the old compact sizes. */
.gf-backs {
  --cw: clamp(34px, min(6vw, 9vh), 54px);
  --ch: calc(var(--cw) * 1.42);
  position: relative;
  height: var(--ch);
  width: calc(var(--cw) * (1 + 3 * 0.34));
  transition: box-shadow .2s ease;
}
.gf-backs .c-card { transform: rotate(var(--r, 0deg)); }

/* ---------- Exchange well (last cards that moved) ---------- */
.gf-trick { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 0; flex: 1; justify-content: center; }
.gf-well { position: relative; transition: box-shadow .2s ease; }
.gf-well--table {
  --cw: clamp(46px, min(8vw, 13vh), 88px);
  --ch: calc(var(--cw) * 1.42);
  width: 100%;
  min-width: var(--cw);
  height: var(--ch);
}
.gf-well--table:not(:empty) .c-card {
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--card-edge);
  animation: gfDrop .22s ease;
}
@keyframes gfDrop {
  from { transform: translateY(-26px) scale(.85); opacity: 0; }
}
.gf-trick__caption { font-size: 13px; color: var(--c-muted); min-height: 17px; text-align: center; }

/* ---------- Center status ---------- */
.gf-mid { min-height: 34px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.gf-status {
  padding: 7px 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 700; letter-spacing: .01em;
  color: var(--c-text);
  text-align: center;
  transition: color .2s ease, border-color .2s ease;
}
.gf-status--win  { color: #7ef0a4; border-color: rgba(126, 240, 164, .5); }
.gf-status--lose { color: #ff8b94; border-color: rgba(255, 139, 148, .5); }

/* ---------- Ocean (draw pile) ---------- */
.gf-ocean { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gf-ocean__pile {
  --cw: clamp(34px, min(6vw, 9vh), 54px);
  --ch: calc(var(--cw) * 1.42);
  position: relative;
  height: var(--ch);
  width: calc(var(--cw) * (1 + 3 * 0.18));
}
.gf-ocean__pile .c-card { transform: rotate(var(--r, 0deg)); }
.gf-ocean__pile--empty {
  border-radius: calc(var(--cw) * .09);
  border: 2px dashed rgba(255, 255, 255, .18);
  width: var(--cw);
}
.gf-ocean__count { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--c-muted); }

/* ---------- Your hand ---------- */
.gf-side { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.gf-well--hand {
  --cw: clamp(52px, min(9vw, 15vh), 96px);
  --ch: calc(var(--cw) * 1.42);
  min-width: var(--cw);
  height: var(--ch);
  width: 100%;
  transition: box-shadow .2s ease;
}
.gf-well--hand .c-card {
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--card-edge);
  cursor: pointer;
  transition: transform .12s ease;
}
/* Lifted (selected) cards ride above the row. */
.gf-well--hand .c-card.gf-sel { transform: translateY(-14px); }
.gf-well--hand .c-card.gf-sel::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2.5px var(--accent-1);
}

/* ---------- Action row ---------- */
.gf-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; padding-bottom: 8px; }
.gf-actions .c-btn { min-width: 88px; text-align: center; font-size: 14px; padding: 9px 16px; }
/* Deal only shows between games; explicit display rules need the escape hatch. */
.gf-actions .c-btn[hidden] { display: none; }
.gf-hint { font-size: 13px; color: var(--c-muted); text-align: center; }

/* ---------- Result list in the game-over modal ---------- */
.gf-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gf-results li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--glass-line); background: var(--glass);
  font-size: 14px; font-weight: 600;
}
.gf-results .gf-out { color: #7ef0a4; }
.gf-results .gf-pen { color: var(--c-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 430px) {
  .gf-seat__label { font-size: 11px; gap: 5px; }
  .gf-books::before { content: ""; }
}

@media (prefers-reduced-motion: reduce) {
  .gf-well--table:not(:empty) .c-card { animation: none; }
  .gf-well--hand .c-card, .gf-well--hand .c-card.gf-sel { transition: none; }
  .gf-seat--askable { transition: none; }
}
