/* Funny Las Vegas - free demo betting page ("Vegas Postcard" look, same tokens as the home page). */
@font-face { font-family: 'Shrikhand'; src: url('../games/fl-frame/fonts/shrikhand-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Bowlby One'; src: url('../games/fl-frame/fonts/bowlby-one-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../games/fl-frame/fonts/dm-sans-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../games/fl-frame/fonts/dm-sans-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../games/fl-frame/fonts/dm-sans-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
:root {
  --cream: #f6ead2; --paper: #fff8ea; --paper-2: #fbefd8; --ink: #2b1d1a; --ink-2: #6b5248;
  --red: #d7263d; --red-d: #a8172b; --teal: #13807e; --teal-d: #0b5a59; --mustard: #f2b134; --mustard-d: #d8901a;
  --black: #26212b; --green: #1f9d55;
  --font-ui: 'DM Sans', 'Helvetica Neue', Arial, sans-serif; --font-num: 'Bowlby One', 'Arial Black', sans-serif; --font-brand: 'Shrikhand', Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 500 16px/1.45 var(--font-ui); color: var(--ink); overflow-x: hidden;
  background: var(--cream) radial-gradient(rgba(43, 29, 26, .07) 1px, transparent 1.4px) 0 0 / 16px 16px;
}
button { font: inherit; color: inherit; }
a { color: inherit; }

/* header (same as the home page) */
.top { position: sticky; top: 0; z-index: 20; background: rgba(246, 234, 210, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 3px solid var(--teal); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; max-width: 1440px; margin: 0 auto; padding: 0 16px; }
.logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; white-space: nowrap; }
.logo-star { width: 26px; height: 26px; fill: var(--mustard); align-self: center; }
.logo-funny { font: 400 28px/1 var(--font-brand); color: var(--red); }
.logo-lv { font: 400 18px/1 var(--font-num); color: var(--teal-d); letter-spacing: .03em; text-transform: uppercase; }
.top-nav { display: flex; align-items: center; gap: 16px; font-weight: 800; font-size: 14px; }
.top-nav a { text-decoration: none; letter-spacing: .06em; text-transform: uppercase; }
.top-nav a:hover { color: var(--red); }
.wallet { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.wallet i { width: 24px; height: 24px; border-radius: 50%; background: var(--mustard); box-shadow: inset 0 0 0 3px var(--mustard-d), inset 0 0 0 5px var(--mustard), inset 0 0 0 6px var(--paper); }
.wallet b { font: 400 16px/1 var(--font-num); letter-spacing: .02em; }
@media (min-width: 720px) { .top-in { padding: 0 28px; } }
@media (max-width: 520px) { .top-nav a { display: none; } .logo-funny { font-size: 24px; } .logo-lv { font-size: 15px; } }

/* layout: game screen on top, bet table under it, both the same width.
 * The width follows the window height so screen + table fit without scrolling on a laptop. */
.play { --rail-h: 250px; --top: 64px; padding: 20px 16px 40px; }
.play-roulette { --rail-h: 360px; }
html.is-embed .play { --top: 0px; padding: 14px; }
html.is-embed .top { display: none; }
html.is-embed body { background: var(--cream); }
.play > section { width: 100%; margin: 0 auto; }
@media (min-width: 980px) {
  .play { padding: 22px 28px 36px; }
  .play > section { width: min(1240px, 100%, max(760px, calc((100vh - var(--top) - 70px - var(--rail-h)) * 16 / 9))); }
}
.screen { border-radius: 22px 22px 0 0; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--teal); position: relative; z-index: 1; }
.screen iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--cream); }
@media (max-width: 979px) { .screen iframe { aspect-ratio: 3 / 4; max-height: 66vh; } }
@media (max-width: 979px) and (min-width: 600px) { .screen iframe { aspect-ratio: 16 / 10; } }

/* bet table: a felt rail fixed under the screen */
.rail {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 0 0 22px 22px; margin-top: 7px !important;
  background: var(--teal-d) radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.4px) 0 0 / 10px 10px;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--teal), 0 18px 34px rgba(43, 29, 26, .22);
  color: var(--paper);
}
@media (min-width: 980px) { .rail { grid-template-columns: 250px minmax(0, 1fr); padding: 16px 18px; } }

/* left: status, sums, buttons (a paper ticket) */
.rail-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; align-content: start; background: var(--paper); color: var(--ink); border-radius: 18px; padding: 14px; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
@media (max-width: 979px) and (min-width: 600px) { .rail-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; } .rail-side .sums { border: 0; padding: 0; } }
.status { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; }
.status small { grid-column: 1 / -1; font: 800 11px/1 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.st-row { display: flex; align-items: center; gap: 7px; min-width: 0; font: 800 14px/1.2 var(--font-ui); color: var(--teal-d); white-space: nowrap; }
.status .dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); animation: blink 1.2s steps(2) infinite; }
.status b { display: flex; align-items: baseline; gap: 3px; font: 400 30px/1 var(--font-num); color: var(--teal-d); }
.status b i { font: 800 11px/1 var(--font-ui); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.status.is-hurry .st-row, .status.is-hurry b { color: var(--mustard-d); }
.status.is-hurry .dot { background: var(--mustard-d); }
.status.is-closed .st-row, .status.is-closed b { color: var(--red); }
.status.is-closed .dot { background: var(--red); }
@keyframes blink { 50% { opacity: .25; } }
.sums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0; border-top: 2px dashed rgba(43, 29, 26, .14); border-bottom: 2px dashed rgba(43, 29, 26, .14); }
.sum small { display: block; font: 800 10px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.sum b { display: block; margin-top: 5px; font: 400 18px/1 var(--font-num); white-space: nowrap; }
.actions { display: flex; gap: 8px; }
.btn { flex: 1 1 0; border: 0; cursor: pointer; border-radius: 999px; padding: 11px 10px; font: 800 13px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; }
.btn-ghost { background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--teal); color: var(--teal-d); }
.btn-red { background: var(--red); color: var(--paper); box-shadow: 0 3px 0 var(--red-d); }
.btn:disabled { opacity: .4; cursor: default; }
.btn[hidden] { display: none; }

/* right: the betting layout and the chip tray */
.rail-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.board { flex: 1 1 auto; }
.spot {
  position: relative; border: 0; cursor: pointer; border-radius: 14px; background: rgba(255, 248, 234, .1); color: var(--paper);
  box-shadow: inset 0 0 0 2px rgba(255, 248, 234, .55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px;
  transition: transform .12s, box-shadow .2s, background .2s;
}
.spot:hover { background: rgba(255, 248, 234, .2); }
.spot:active { transform: translateY(1px); }
.spot:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.spot-l { font: 400 20px/1 var(--font-num); text-transform: uppercase; letter-spacing: .02em; }
.spot-s { display: flex; gap: 4px; font: 800 13px/1 var(--font-ui); letter-spacing: .1em; }
.spot-s svg { width: 20px; height: 20px; fill: currentColor; }
.spot-s em { font-style: normal; padding: 4px 10px; border-radius: 999px; background: rgba(255, 248, 234, .2); }
.spot-p { font: 800 11px/1 var(--font-ui); letter-spacing: .06em; opacity: .8; }
.spot.is-red { background: var(--red); }
.spot.is-black { background: var(--black); }
.spot.is-teal { background: var(--teal); }
.spot.is-green { background: var(--green); }
.spot.is-red:hover, .spot.is-black:hover, .spot.is-teal:hover, .spot.is-green:hover { filter: brightness(1.12); }
.spot.has-bet { box-shadow: inset 0 0 0 3px var(--mustard); }
.spot.is-win { animation: win .5s ease-in-out 8 alternate; box-shadow: inset 0 0 0 3px var(--mustard), 0 0 0 3px var(--mustard), 0 0 18px rgba(242, 177, 52, .7); z-index: 1; }
@keyframes win { to { transform: scale(1.05); } }
.stack { position: absolute; right: -8px; top: -10px; width: 34px; height: 34px; z-index: 2; pointer-events: none; }
.stack i { position: absolute; inset: 0; border-radius: 50%; background: var(--mustard); box-shadow: inset 0 0 0 3px var(--mustard-d), inset 0 0 0 5px var(--mustard), inset 0 0 0 7px var(--paper), 0 3px 0 var(--mustard-d), 0 4px 8px rgba(0, 0, 0, .3); }
.stack b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 400 10px/1 var(--font-num); color: var(--ink); }
.stack.is-pop { animation: pop .35s cubic-bezier(.2, .9, .3, 1.5); }
@keyframes pop { 0% { transform: translateY(-16px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* two-spot tables (Black & Red, Winner) */
.board-blackred, .board-winner { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; height: 100%; }
.board-blackred .spot, .board-winner .spot { min-height: 120px; border-radius: 18px; flex-direction: row; gap: 14px; }
.board-blackred .spot-l, .board-winner .spot-l { font-size: 34px; }
.board-blackred .spot-s svg { width: 26px; height: 26px; }
.board-blackred .spot-p, .board-winner .spot-p { position: absolute; left: 12px; top: 10px; }
@media (max-width: 599px) { .board-blackred .spot, .board-winner .spot { flex-direction: column; gap: 6px; min-height: 110px; } .board-blackred .spot-l, .board-winner .spot-l { font-size: 28px; } }

/* roulette table: zero | 3 x 12 numbers, dozens and even-money bets underneath */
.rb-table { display: grid; gap: 6px; grid-template-columns: 46px minmax(0, 1fr); grid-template-areas: "zero nums" ". dozens" ". even"; }
.rb-zero { grid-area: zero; display: grid; }
.rb-nums { grid-area: nums; display: grid; gap: 5px; grid-template-rows: repeat(3, 44px); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.rb-dozens { grid-area: dozens; display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rb-even { grid-area: even; display: grid; gap: 6px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rb-table .spot { border-radius: 10px; padding: 4px 2px; }
.rb-nums .spot-l { font-size: 17px; }
.rb-zero .spot { border-radius: 22px 10px 10px 22px; }
.rb-dozens .spot, .rb-even .spot { min-height: 46px; flex-direction: row; gap: 6px; }
.rb-dozens .spot-l, .rb-even .spot-l { font-size: 15px; white-space: nowrap; }
.rb-even .spot-p { display: none; }
.rb-table .stack { width: 26px; height: 26px; right: -7px; top: -9px; }
.rb-table .stack b { font-size: 8px; }
/* phones: the table stands upright (12 rows of 1 2 3) */
@media (max-width: 599px) {
  .rb-table { grid-template-columns: minmax(0, 1fr) 64px 64px; grid-template-areas: "zero zero zero" "nums dozens even"; }
  .rb-zero .spot { min-height: 40px; border-radius: 20px 20px 10px 10px; }
  .rb-nums { grid-template-rows: none; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 40px; direction: rtl; }
  .rb-nums .spot { direction: ltr; }
  .rb-dozens { grid-template-columns: none; grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .rb-even { grid-template-columns: none; grid-template-rows: repeat(6, minmax(0, 1fr)); }
  .rb-dozens .spot, .rb-even .spot { flex-direction: column; gap: 3px; min-height: 0; }
  .rb-dozens .spot-l { writing-mode: vertical-rl; transform: rotate(180deg); }
  .rb-even .spot-l { font-size: 12px; }
  .rb-table { grid-template-columns: minmax(0, 1fr) 52px 60px; }
}

/* chip tray */
.tray { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 12px; border-radius: 999px; background: rgba(0, 0, 0, .18); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25); }
.tray .lbl { font: 800 11px/1 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 248, 234, .7); }
.chips { display: flex; gap: 10px; }
.chip {
  width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer; position: relative; color: var(--paper);
  background: var(--c); box-shadow: inset 0 0 0 4px var(--c), inset 0 0 0 6px rgba(255, 248, 234, .85), 0 3px 0 rgba(0, 0, 0, .3);
  transition: transform .15s;
}
.chip::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 4px dashed rgba(255, 248, 234, .9); }
.chip span { position: relative; font: 400 13px/1 var(--font-num); }
.chip.c10 { --c: #5b8c86; } .chip.c50 { --c: var(--red); } .chip.c100 { --c: var(--black); } .chip.c500 { --c: var(--mustard-d); } .chip.c1000 { --c: #6b3fa0; }
.chip[aria-pressed="true"] { transform: translateY(-5px) scale(1.08); box-shadow: inset 0 0 0 4px var(--c), inset 0 0 0 6px rgba(255, 248, 234, .85), 0 0 0 3px var(--mustard), 0 6px 0 rgba(0, 0, 0, .3); }
.chip:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
@media (max-width: 400px) { .chip { width: 42px; height: 42px; } .chips { gap: 7px; } .tray .lbl { display: none; } }

/* my bets: a strip of result tickets under the table */
.mylog { margin-top: 18px !important; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mylog h2 { margin: 0; font: 800 11px/1 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.mylog ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mylog li { flex: 0 0 auto; display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 2px rgba(43, 29, 26, .1); font-size: 13px; white-space: nowrap; }
.mylog li.empty { color: var(--ink-2); background: none; box-shadow: none; padding-left: 0; }
.mylog .r { color: var(--ink-2); font-size: 11px; font-weight: 700; }
.mylog .x { font-weight: 800; }
.mylog .n { font: 400 14px/1 var(--font-num); }
.mylog li.up .n { color: var(--teal); }
.mylog li.down .n { color: var(--red); }
.fine { margin: 0; width: 100%; font-size: 12px; color: var(--ink-2); }
@media (min-width: 980px) { .fine { width: auto; margin-left: auto; } }

/* result toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 40; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  min-width: 260px; max-width: calc(100% - 32px); padding: 14px 22px; border-radius: 20px; text-align: center;
  background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); font-weight: 700;
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), opacity .3s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast small { display: block; font: 800 12px/1.2 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin-bottom: 4px; }
.toast b { font: 400 24px/1.15 var(--font-num); }
.toast.is-win { background: var(--teal); box-shadow: 0 0 0 4px var(--mustard), 0 12px 30px rgba(0, 0, 0, .3); }
.toast.is-lose { background: var(--ink); }

@media (prefers-reduced-motion: reduce) { .spot.is-win, .stack.is-pop, .status .dot { animation: none; } }
