/* Julie's Plinko & Pachinko, dressed like julie2dfd.com:
   black fading into wine red with a scatter of little hearts, near-black cards with a rosy edge,
   white serif headings with a hot-pink offset shadow, plain sans text. */
:root {
  --bg: #0c0707;
  --card: rgba(12, 7, 7, 0.94);
  --raised: #1a0f10;
  --raised-2: #2a1719;
  --fg: #ffffff;
  --fg-2: #dcc6c7;
  --muted: #a3898b;
  --line: rgba(255, 214, 216, 0.10);
  --line-2: rgba(255, 214, 216, 0.22);
  --rose: #ce7576;          /* the card outline on her site */
  --pink: #ff0068;          /* the heading shadow on her site */
  --pink-hover: #ff3385;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #000;
  color: var(--fg);
  font: 400 15px/1.5 var(--sans);
}
button, a.topup { font: inherit; cursor: pointer; }

/* Backdrop: black at the top fading into wine red, with small tilted hearts all over */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='92'%3E%3Cg fill='%23ff4d6d' fill-opacity='0.09'%3E%3Cpath transform='translate(14 18) rotate(-28) scale(0.62)' d='M10 18 C-4 9 0 -2 6 0 C8 0.6 9.4 2.2 10 3.6 C10.6 2.2 12 0.6 14 0 C20 -2 24 9 10 18Z'/%3E%3Cpath transform='translate(60 64) rotate(-28) scale(0.62)' d='M10 18 C-4 9 0 -2 6 0 C8 0.6 9.4 2.2 10 3.6 C10.6 2.2 12 0.6 14 0 C20 -2 24 9 10 18Z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(to bottom, #000000 0%, #140b0b 22%, #301b1b 46%, #4c2b2b 70%, #6a3135 100%);
}
/* the old floating glyphs are not part of this look */
.chalk { display: none; }

/* Left card, board card; the game tabs run across the top */
.app {
  position: relative;
  display: grid; grid-template-columns: 360px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 16px 24px;
  max-width: 1800px; min-height: 100vh; margin: 0 auto; padding: 16px 24px 20px;
}
.side, .stage {
  background: var(--card); border: 1px solid var(--rose); border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.side { display: flex; flex-direction: column; gap: 32px; min-width: 0; padding: 28px; align-self: start; }

/* Game tabs */
.games {
  grid-column: 1 / -1; justify-self: center; display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  width: min(440px, 100%); padding: 6px; background: var(--card); border: 1px solid var(--rose); border-radius: 999px;
}
.games button {
  height: 46px; border: 0; border-radius: 999px; background: transparent; color: var(--fg-2);
  font: 400 21px/1 var(--serif); letter-spacing: 0.01em;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.games button:hover:not(:disabled) { color: var(--fg); }
.games button[aria-selected="true"] { background: var(--pink); color: #fff; }
.games button[aria-selected="true"]:hover { background: var(--pink-hover); }
.games button[aria-selected="true"]::before, .games button[aria-selected="true"]::after { content: "✦"; font-size: 0.7em; margin: 0 8px; vertical-align: 0.15em; }

.brand { display: flex; align-items: center; gap: 12px; }
.logo-coin { width: 40px; height: 40px; }
/* White serif with the hot-pink offset shadow, like "Mommy Julie" */
h1 {
  margin: 0; font: 400 32px/1.05 var(--serif); color: #fff;
  text-shadow: 3px 3px 0 var(--pink);
}
.mode { font-size: 12px; color: var(--muted); }

.label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.value {
  display: inline-block; font: 400 46px/1.05 var(--serif);
  font-variant-numeric: tabular-nums; transform-origin: left center;
}
.value.bump { animation: bump 240ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.04); } }

.wallet { display: flex; flex-direction: column; gap: 16px; }
.taken { padding-top: 22px; border-top: 1px solid var(--line); }
.taken .value { font-size: 64px; color: #fff; text-shadow: 3px 3px 0 var(--pink); }

/* Buttons */
.topup, .drop, .quiet {
  display: flex; align-items: center; justify-content: center; border: 0; border-radius: 12px;
  text-decoration: none; font-weight: 700; line-height: 1;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease), transform 100ms var(--ease), opacity 150ms var(--ease), box-shadow 150ms var(--ease);
}
.topup { height: 48px; padding: 0 20px; background: #fff; color: #0c0707; font-size: 15px; }
.topup:hover { background: #ffe3ea; }
.drop {
  flex: 1; height: 56px; background: var(--pink); color: #fff; font: 400 22px/1 var(--serif);
  box-shadow: 0 6px 22px rgba(255, 0, 104, 0.35);
}
.drop:hover { background: var(--pink-hover); }
.quiet { height: 56px; padding: 0 16px; background: transparent; color: var(--fg-2); border: 1px solid var(--line-2); font-size: 14px; }
.quiet:hover { color: var(--fg); border-color: var(--rose); }
.topup:active, .drop:active, .quiet:active { transform: scale(0.98); }
button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* Bet picker: a rounded segmented track */
.controls { display: flex; flex-direction: column; gap: 8px; }
.bets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--raised); border-radius: 12px; margin-bottom: 8px; }
.bets button {
  height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--fg-2);
  font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.bets button:hover { color: var(--fg); }
.bets button[aria-pressed="true"] { background: var(--raised-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--rose); }
.drop-row { display: flex; gap: 8px; }

/* Recent drops */
.history { min-height: 0; }
.history-head { display: flex; justify-content: space-between; align-items: baseline; }
.history-head .label { font: 400 20px/1.2 var(--serif); color: #fff; }
.global { font-size: 12px; color: var(--muted); }
.global b { font-weight: 700; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.log { list-style: none; margin: 8px 0 0; padding: 0 12px 0 0; max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--raised-2) transparent; }
.log li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 34px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums;
}
.log .m { color: var(--fg); font-weight: 700; }
.log .g { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 4px; }
.log li.big .m { color: var(--pink); }
.log li.topup-row .m { color: var(--fg); }
.log li.empty { color: var(--muted); }

/* The board card */
.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; padding: 10px; align-self: start; }
#board { display: block; width: 100%; height: calc(100vh - 128px); min-height: 520px; }
.rule { margin: 0; font-size: 12px; color: var(--muted); }

/* Dialog */
dialog {
  border: 1px solid var(--rose); border-radius: 24px; background: var(--bg); color: var(--fg);
  width: min(440px, calc(100vw - 32px)); padding: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
dialog[open] { animation: rise 240ms var(--ease); }
dialog::backdrop { background: rgba(10, 4, 5, 0.8); }
dialog h2 { margin: 0 0 20px; font: 400 30px/1.1 var(--serif); text-shadow: 2px 2px 0 var(--pink); }
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; margin: 0 0 24px; color: var(--fg-2); }
.steps b { color: var(--fg); }
.code {
  display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 8px;
  font-size: 18px; font-weight: 700; letter-spacing: 0.06em; color: var(--fg);
  background: var(--raised); border: 1px dashed var(--rose); border-radius: 12px; padding: 12px 16px;
}
.code::after { content: "copy"; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.code.copied::after { content: "copied"; color: var(--pink); }
.dialog-actions { display: flex; flex-direction: column; gap: 8px; }
.dialog-actions .quiet { height: 48px; }
.waiting { margin: 16px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* Broke */
.broke { position: fixed; inset: 0; background: rgba(10, 4, 5, 0.9); display: grid; place-items: center; padding: 16px; z-index: 5; }
.broke[hidden] { display: none; }
.broke-card {
  text-align: center; width: min(420px, 100%); padding: 36px 28px; animation: rise 300ms var(--ease);
  background: var(--bg); border: 1px solid var(--rose); border-radius: 24px;
}
.broke-card h2 { margin: 0 0 10px; font: 400 48px/1.05 var(--serif); text-shadow: 3px 3px 0 var(--pink); }
.cursor { color: var(--pink); text-shadow: none; }
.broke-card p { margin: 0 0 28px; color: var(--fg-2); }
.broke-card p b { color: var(--pink); }
.broke-card .topup { width: 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10; }

/* Phones: numbers, controls, board, then the log, each in its own card */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: none; gap: 16px; padding: 16px 12px 32px; }
  .side { display: contents; }
  .games { order: 0; }
  .brand { order: 1; padding: 4px 4px 0; }
  .wallet, .controls, .history {
    background: var(--card); border: 1px solid var(--rose); border-radius: 20px; padding: 20px;
  }
  .wallet { order: 2; }
  .controls { order: 3; }
  .stage { order: 4; padding: 8px; border-radius: 20px; }
  .history { order: 5; }
  #board { height: auto; aspect-ratio: 1 / 1.05; min-height: 0; }
  .games button { font-size: 19px; }
  .value { font-size: 38px; }
  .taken .value { font-size: 52px; }
}
