/* Player screens. Values come from the Claude Design mock-ups ("Double Up Poker — Player
   Screen Mockups"); the screens are drawn at 1180 × 820 and scaled to fit the window. */

@font-face { font-family: 'Archivo Black'; src: url(/fonts/archivo-black.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'VT323'; src: url(/fonts/vt323.woff2) format('woff2'); font-display: swap; }

html, body { margin: 0; height: 100%; background: #0B2416; overflow: hidden; }
body { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* The 1180 × 820 stage, scaled by main.js to fit the window and centred. */
#stage {
  position: absolute; left: 50%; top: 50%; width: 1180px; height: 820px; transform-origin: 50% 50%;
  background: radial-gradient(ellipse at 50% 40%, #2E8B57 0%, #1E6B42 55%, #134A2D 100%);
  font-family: 'VT323', monospace; color: #FFE27A; overflow: hidden;
}
.screen { position: absolute; inset: 0; box-sizing: border-box; padding: 32px 40px; display: flex; flex-direction: column; gap: 24px; }

/* Top row: meters on the left, result or INFO on the right. */
.top { display: flex; justify-content: space-between; align-items: flex-start; height: 160px; flex-shrink: 0; }
.meters { display: grid; grid-template-columns: 170px auto; align-items: baseline; row-gap: 2px; }
.meter-label { font-family: 'Archivo Black', sans-serif; font-size: 26px; color: #E6F4EA; letter-spacing: .08em; }
.meter { font-size: 64px; line-height: 1; }
.result { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.result-text { font-size: 96px; line-height: 1; color: #FFFFFF; }
.hand-name { font-size: 52px; line-height: 1; color: #FFFFFF; }
.hot { animation: blink 1s steps(1, end) infinite; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
@keyframes blink { 0% { color: #FFFFFF; } 50% { color: rgb(230, 0, 0); } }

/* Arcade buttons: bevelled, the bevel flips when pressed. */
.arc {
  position: relative; font-family: 'Archivo Black', sans-serif; font-size: 22px; letter-spacing: .05em;
  height: 66px; width: 170px; padding: 0 24px; border: 5px solid; border-radius: 0; box-sizing: border-box;
  border-color: color-mix(in srgb, var(--c), #FFF 40%) color-mix(in srgb, var(--c), #000 40%) color-mix(in srgb, var(--c), #000 40%) color-mix(in srgb, var(--c), #FFF 40%);
  background: var(--c); color: #FFFFFF; text-shadow: 0 1px 1px rgba(0, 0, 0, .4); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; user-select: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4);
}
.arc:active:not(:disabled) {
  border-color: color-mix(in srgb, var(--c), #000 40%) color-mix(in srgb, var(--c), #FFF 40%) color-mix(in srgb, var(--c), #FFF 40%) color-mix(in srgb, var(--c), #000 40%);
}
.arc:disabled { cursor: default; filter: brightness(.45) saturate(.6); }
.red { --c: rgb(215, 11, 11); }
.wbtn { --c: #FFFFFF; color: #1B1B1B; text-shadow: none; }
.yellow { --c: rgb(229, 172, 5); color: #1B1B1B; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.yellow.on, .yellow.picked { --c: rgb(255, 196, 23); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 0 18px 4px rgba(255, 212, 88, .8); }
.yellow.picked:disabled { filter: none; }

/* The five cards and their DISCARD buttons. */
.cards { flex: 1; display: flex; justify-content: center; align-items: center; gap: 28px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.disc { width: 140px; height: 54px; padding: 0 8px; font-size: 15px; }
.buttons { display: flex; align-items: center; gap: 24px; padding: 0 6px 6px; }
.spacer { flex: 1; }

/* Cards. Sizes are variables so the Double Up card can be a little smaller. */
.card {
  --w: 190px; --h: 266px; --corner-rank: 24px; --corner-suit: 20px; --corner-at: 7px;
  --pip: 40px; --ace: 110px; --frame: 36px; --face-rank: 70px; --face-suit: 48px;
  width: var(--w); height: var(--h); border-radius: 12px; padding: 0; position: relative; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; font-family: 'Archivo Black', sans-serif;
  border: 2px solid #2B2B2B; background: #FFFFFF; color: #1B1B1B; box-shadow: 0 8px 16px rgba(0, 0, 0, .35);
}
button.card { cursor: pointer; }
.card.small {
  --w: 170px; --h: 238px; --corner-rank: 22px; --corner-suit: 19px; --corner-at: 8px;
  --pip: 36px; --ace: 96px; --frame: 32px; --face-rank: 62px; --face-suit: 42px; border-radius: 14px;
}
.card.red-suit { color: #C62828; }
.card.back {
  background-color: #9E1B1B; border: 6px solid #FFFDF6;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .18) 0 6px, transparent 6px 14px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .18) 0 6px, transparent 6px 14px);
}
.card.glow { border: 4px solid #FFD54A; box-shadow: 0 0 0 4px rgba(255, 213, 74, .5), 0 0 28px rgba(255, 213, 74, .9); }
.corner { position: absolute; top: var(--corner-at); left: var(--corner-at); width: 26px; line-height: 1; text-align: center; }
.corner.flip { top: auto; left: auto; bottom: var(--corner-at); right: var(--corner-at); transform: rotate(180deg); }
.corner-rank { font-size: var(--corner-rank); letter-spacing: -1px; }
.corner-suit { font-size: var(--corner-suit); }
.pip { position: absolute; transform: translate(-50%, -50%); font-size: var(--pip); line-height: 1; }
.pip.flip { transform: translate(-50%, -50%) rotate(180deg); }
.ace { font-size: var(--ace); line-height: 1; }
.frame {
  position: absolute; inset: var(--frame); border: 2px solid currentColor; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.frame-rank { font-size: var(--face-rank); line-height: 1; }
.frame-suit { font-size: var(--face-suit); line-height: 1; }

/* Dark overlays: the pay table dialog, Tilt, Waiting and Reconnecting. */
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dim { background: rgba(4, 18, 10, .72); }
.dialog {
  box-sizing: border-box; width: 560px; border: 3px solid #F4D35E; border-radius: 18px; background: #12402A;
  display: flex; flex-direction: column;
}
.pay { padding: 28px 36px; gap: 6px; }
.dialog-title { font-family: 'Archivo Black', sans-serif; font-size: 26px; color: #E6F4EA; letter-spacing: .06em; margin-bottom: 8px; }
.pay-row { display: flex; justify-content: space-between; font-size: 34px; line-height: 36px; color: #FFFFFF; }
.pay .arc { margin-top: 16px; align-self: center; width: 200px; }

/* Double Up. */
.gamble { flex: 1; display: flex; justify-content: center; align-items: center; gap: 56px; }
.gamble .arc { width: 190px; height: 80px; font-size: 28px; }
.gamble-mid { width: 340px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gamble-label { width: 100%; text-align: center; white-space: nowrap; font-family: 'Archivo Black', sans-serif; font-size: 20px; color: #E6F4EA; letter-spacing: .1em; }

/* Tilt: confirm cash-out. */
.tilt-credits { position: absolute; top: 32px; left: 40px; display: flex; align-items: baseline; gap: 16px; opacity: .45; }
.tilt-credits .meter { font-size: 72px; }
.tilt-credits .meter-label { font-size: 22px; }
.confirm { padding: 40px 44px; align-items: center; gap: 18px; text-align: center; }
.confirm-title { font-family: 'Archivo Black', sans-serif; font-size: 30px; color: #E6F4EA; letter-spacing: .06em; }
.confirm-amount { font-size: 88px; line-height: 1; }
.note { font-size: 32px; color: #E6F4EA; }
.confirm-buttons { display: flex; gap: 20px; margin-top: 10px; }
.btn {
  font-family: 'Archivo Black', sans-serif; font-size: 22px; letter-spacing: .04em; height: 64px; width: 200px; padding: 0 28px;
  border: 0; border-radius: 10px; background: #F4D35E; color: #1B1B1B; box-shadow: 0 6px 0 #B8901F; cursor: pointer; box-sizing: border-box;
}
.btn.tilt { background: #C8372D; color: #FFFFFF; box-shadow: 0 6px 0 #7E1E18; }
.btn.ghost { background: transparent; color: #F4D35E; border: 3px solid #F4D35E; box-shadow: none; }

/* Waiting for dealer, and Reconnecting (same look). */
.locked { background: rgba(4, 18, 10, .7); flex-direction: column; gap: 22px; text-align: center; }
.locked-title { font-family: 'Archivo Black', sans-serif; font-size: 44px; color: #E6F4EA; letter-spacing: .06em; }
.locked-amount { font-size: 64px; line-height: 1; }
.dots { display: flex; gap: 14px; margin-top: 8px; }
.dots span { width: 14px; height: 14px; border-radius: 50%; background: #F4D35E; animation: dot 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* A short message from the server (not in the design; kept small and out of the way). */
.message {
  position: absolute; left: 50%; bottom: 112px; transform: translateX(-50%); padding: 6px 18px; border-radius: 8px;
  background: rgba(4, 18, 10, .85); color: #FFE27A; font-size: 30px; white-space: nowrap;
}
