:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0c10; color: #e6e9f0; font-family: system-ui, sans-serif; }
main { display: flex; flex-direction: column; align-items: center; height: 100%; }
.stage { position: relative; }
canvas { display: block; touch-action: none; user-select: none; }

.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 20px; text-align: center;
  background: rgba(10, 11, 16, 0.88);
}
.screen[hidden], #none { display: none; }
h1 { margin: 0; font-size: 38px; letter-spacing: 1px; }
h2 { margin: 8px 0 0; font-size: 20px; }
p { margin: 0; color: #b3bacb; max-width: 340px; line-height: 1.4; }
.coins { color: #ffd54f; font-weight: 700; }
.small { font-size: 12px; color: #7d869a; }
.name { display: flex; align-items: center; gap: 8px; color: #b3bacb; }
.name input {
  font: inherit; color: #e6e9f0; background: #1b1f29; border: 1px solid #3a4152; border-radius: 6px;
  padding: 6px 8px; width: 150px;
}

button {
  font: inherit; font-weight: 600; color: #e6e9f0; background: #262b38; border: 1px solid #3a4152;
  border-radius: 8px; padding: 8px 14px; cursor: pointer;
}
button:hover:not(:disabled) { background: #313848; }
button:disabled { opacity: 0.45; cursor: default; }
button.big { font-size: 18px; padding: 12px 28px; background: #2e7d5b; border-color: #3fa577; }

#shop { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 340px; }
.shop-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; }
.shop-row small { color: #7d869a; margin-left: 4px; }

#cards { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border-width: 2px; }
.card em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.card strong { font-size: 17px; }
.card span { color: #b3bacb; font-weight: 400; }
.card small { color: #7d869a; font-weight: 400; }
.card.common { border-color: #9aa4b2; } .card.common em { color: #9aa4b2; }
.card.rare { border-color: #42a5f5; } .card.rare em { color: #42a5f5; }
.card.epic { border-color: #ab47bc; } .card.epic em { color: #ce93d8; }
.card.legendary { border-color: #ffb300; } .card.legendary em { color: #ffca28; }

.bar { display: flex; gap: 8px; padding: 8px; }
