/* Shared chrome for every 3D-table card game (bridge/briscola/burraco/
   poker/ramino/scala-quaranta/scopa/scopone/sette-mezzo). Pairs with
   ../../shared/arcade.css for site-wide tokens (--text etc). Each game's
   own game.css only needs to add whatever is truly game-specific
   (bidding box, betting buttons, scoreTable...). */

body { display: flex; flex-direction: column; align-items: center; }

.topbar { width: 100%; max-width: 960px; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; }
.topbar a { color: #9fb4d6; text-decoration: none; font-size: .9rem; }
.topbar-hint { color: #5c7396; font-size: .85rem; }

h1.title {
  margin: 0 0 6px; font-size: 2rem; text-align: center; letter-spacing: 1px;
  background: linear-gradient(90deg, #3ce7ff, #ffb23c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 30px rgba(60,231,255,.4);
}
.sub { color: #9fb4d6; text-align: center; margin-bottom: 8px; font-size: .9rem; }

.hud {
  width: 720px; max-width: 100%; display: flex; flex-wrap: wrap; row-gap: 4px;
  justify-content: space-between; gap: 16px; margin-bottom: 8px; padding: 0 20px; font-size: .92rem;
}
.fpsHint kbd { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 4px; }

#canvasWrap { position: relative; width: 900px; max-width: 100%; }
#arena {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  border: 2px solid rgba(60,231,255,.35); border-radius: 10px;
  box-shadow: 0 0 40px rgba(60,231,255,.12), inset 0 0 80px rgba(0,0,0,.6);
  cursor: pointer; background: #030814;
}

.controls-hint { font-size: .78rem; color: #7189ab; text-align: center; margin-top: 8px; line-height: 1.5; max-width: 700px; }
.log { width: 720px; max-width: 100%; text-align: center; padding: 8px 20px; min-height: 1.4em; color: #3ce7ff; font-size: .88rem; }

.overlay {
  position: fixed; inset: 0; background: rgba(2,4,12,.85); display: flex;
  align-items: center; justify-content: center; z-index: 10;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility .25s;
}
.overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
.modal {
  background: #0b1230; border: 1px solid rgba(60,231,255,.4); border-radius: 14px;
  padding: 28px 30px; max-width: 400px; width: 90%; text-align: center;
  box-shadow: 0 0 60px rgba(60,231,255,.2);
}
.modal h2 { margin-top: 0; }
.modal input {
  width: 100%; padding: 10px; margin: 8px 0; border-radius: 8px; border: 1px solid #294066;
  background: #050814; color: var(--text); font-size: 1rem;
}
.btn {
  padding: 10px 16px; border-radius: 8px; border: 1px solid #3ce7ff;
  background: rgba(60,231,255,.12); color: var(--text); font-size: .95rem;
  cursor: pointer; transition: .2s; margin: 4px;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:not(:disabled):hover { background: rgba(60,231,255,.28); }
.btn.cyan { border-color: #ffb23c; background: rgba(255,178,60,.1); }
.btn.cyan:not(:disabled):hover { background: rgba(255,178,60,.25); }
.btn.wide { width: 100%; }
.hint { font-size: .8rem; color: #9fb4d6; margin-top: 14px; line-height: 1.4; }

.actionBar { display: flex; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

.callout {
  position: absolute; left: 50%; top: 14%; transform: translate(-50%, -50%); z-index: 8;
  font-size: 1.3rem; font-weight: 700; letter-spacing: 2px; text-shadow: 0 0 16px currentColor;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}

#loadingOverlay {
  position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center;
  background: rgba(3,8,20,.92); border-radius: 10px; transition: opacity .3s ease, visibility .3s;
}
#loadingOverlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loadingBox { width: 70%; max-width: 360px; text-align: center; }
.loadingTitle { color: #9fb4d6; font-size: .9rem; margin-bottom: 10px; letter-spacing: 1px; }
.progressTrack { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.progressFill { height: 100%; width: 0%; background: linear-gradient(90deg, #3ce7ff, #ffb23c); transition: width .15s ease; }
.progressLabel { margin-top: 8px; color: #3ce7ff; font-size: .8rem; font-variant-numeric: tabular-nums; }

.scoreTable { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .85rem; }
.scoreTable td { padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.scoreTable td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
