/* Void theme: black field, one ice-white accent, glass by opacity only. */
:root {
  --void: #000000;
  --ice: #F5F6F8;
  --panel: rgba(245, 246, 248, 0.04);
  --panel-border: rgba(245, 246, 248, 0.12);
  --muted: rgba(245, 246, 248, 0.55);
  --glow: rgba(245, 246, 248, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--ice);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

h1, h2, h3, .brand, .balance {
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--panel-border);
}

.brand { color: var(--ice); text-decoration: none; font-size: 18px; }
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--ice); }
.balance { font-size: 14px; color: var(--ice); }

main { max-width: 960px; margin: 0 auto; padding: 32px 20px 96px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(14px);
}

.hero h1 { font-size: 30px; margin-top: 0; }
.hero p { color: var(--muted); max-width: 46ch; }

button, .cta {
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--ice);
  border: 1px solid var(--ice);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: box-shadow 400ms ease, opacity 400ms ease;
}
button:hover, .cta:hover { box-shadow: 0 0 24px var(--glow); }
button:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

.ghost { background: transparent; color: var(--ice); border-color: var(--panel-border); }

input {
  font: inherit;
  color: var(--ice);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 14px;
}
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

.grid { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.grid th, .grid td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--panel-border);
}
.grid th { color: var(--muted); font-weight: 400; text-transform: uppercase; font-size: 12px; }

dialog {
  background: rgba(10, 10, 10, 0.92);
  color: var(--ice);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 28px;
  max-width: 420px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.82); }

.muted { color: var(--muted); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.panel { animation: fade-in 600ms ease both; }

@media (prefers-reduced-motion: reduce) {
  *, .panel { animation: none !important; transition: none !important; }
}

@media (max-width: 600px) {
  main { padding: 20px 16px 72px; }
  .topbar { padding: 14px 16px; flex-wrap: wrap; }
}

/* Scratcher */
.scratch-stage {
  position: relative;
  width: 360px;
  max-width: 100%;
  aspect-ratio: 1;
  margin-bottom: 18px;
}
.scratch-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 6px;
}
.scratch-grid .cell {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(245, 246, 248, 0.05);
  font-family: ui-monospace, monospace;
  font-size: 22px;
}
#foil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  touch-action: none;
  cursor: crosshair;
}
#result.won {
  text-shadow: 0 0 18px var(--glow);
  animation: fade-in 700ms ease both;
}

/* Lottery */
.ticket-list { list-style: none; padding: 0; margin: 0; }
.numbers {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.24em;
  padding: 8px 0;
  border-bottom: 1px solid var(--panel-border);
}
#countdown { font-size: 28px; text-shadow: 0 0 20px var(--glow); }
