:root {
  --bg: #000000;
  --card: #111214;
  --ink: #f4f4f1;
  --soft: rgba(244, 244, 241, 0.5);
  --line: rgba(244, 244, 241, 0.08);
  --accent: #7cf0c0;
  --warn: #ffb057;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 16px;
}

.au {
  position: relative;
  width: min(336px, 100%);
  padding: 14px 8px 8px;
  border-radius: 28px;
  background: linear-gradient(180deg, #17181b 0%, var(--card) 46%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 60px -28px color-mix(in srgb, var(--accent) 30%, transparent);
}
/* the glow under the card turns warm with the last seconds */
.au::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 30px 60px -28px color-mix(in srgb, var(--warn) 42%, transparent);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.au.is-late::after { opacity: 1; }
.au__head { display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 10px; }
.au__title { font-size: 15px; font-weight: 680; font-stretch: 108%; letter-spacing: -0.008em; }
.au__left { font-size: 11.5px; font-weight: 560; color: var(--soft); white-space: nowrap; }
.au__left b { display: inline-block; font-weight: 680; color: var(--ink); transition: color 0.3s ease; }
.au.is-late .au__left b { color: var(--warn); }
.au__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.au__list { margin-top: 8px; display: grid; gap: 4px; }
.row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 11px;
  width: 100%;
  height: clamp(56px, 17vh, 70px);
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 20px;
  background: rgba(244, 244, 241, 0.035);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.25s ease;
}
.row:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* the account's tile: its initial, no logo */
.row__tile {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(244, 244, 241, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 720;
  font-stretch: 112%;
}
.row__text { min-width: 0; display: grid; gap: 1px; }
.row__name { height: 15px; overflow: hidden; font-size: 11.5px; line-height: 15px; font-weight: 560; color: var(--soft); white-space: nowrap; }
.row__name span { display: block; overflow: hidden; text-overflow: ellipsis; }
.row.is-copied .row__name { color: var(--accent); }

/* the code: one fixed cell per digit, so nothing shifts when they roll */
.row__code {
  position: relative;
  display: flex;
  align-items: center;
  height: 28px;
  font-size: clamp(21px, 6.4vh, 25px);
  line-height: 28px;
  font-weight: 640;
  font-stretch: 100%;
  letter-spacing: 0;
  color: var(--ink);
  transition: color 0.4s ease;
}
.dg { display: block; width: 0.64em; height: 28px; overflow: hidden; text-align: center; }
.dg span { display: block; }
.dg:nth-child(4) { margin-left: 0.3em; }
.au.is-late .row__code { color: var(--warn); }
/* a thin light that crosses the code when it is renewed or copied */
.row__shine { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; pointer-events: none; overflow: hidden; }
.row__shine i { position: absolute; top: 0; bottom: 0; left: 0; width: 38%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent); opacity: 0; mix-blend-mode: overlay; }

/* the ring: the time left, the same for every account; inside it the copy mark that becomes a tick */
.row__ring { position: relative; width: 30px; height: 30px; }
.row__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; }
.ring__bed { stroke: rgba(244, 244, 241, 0.1); stroke-width: 2.4; }
.ring__arc { stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke 0.4s ease; }
.au.is-late .ring__arc { stroke: var(--warn); }
.ring__copy, .ring__tick { stroke: var(--soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.25s ease; }
.ring__tick { stroke: var(--accent); stroke-width: 1.9; stroke-dasharray: 1; stroke-dashoffset: 1; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #f4f4f1;
  stroke: #000000;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (hover: hover) {
  .row:hover { background: rgba(244, 244, 241, 0.07); }
  .row:hover .ring__copy { stroke: var(--ink); }
}
@media (max-width: 340px) {
  .row { column-gap: 9px; padding: 0 9px 0 8px; }
  .au__left { font-size: 11px; }
}
