:root {
  --warm: #f2a900;
  --warm-light: #ffe3a0;
  --ink: #1c1712;
  --paper: #fff7e5;
  --glass: rgba(27, 22, 17, .68);
  --stroke: rgba(255, 255, 255, .68);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: white;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.92) 0 5%, transparent 18%),
    radial-gradient(circle at 88% 18%, rgba(255,232,165,.72) 0 7%, transparent 21%),
    linear-gradient(135deg, #ffcc5a 0%, #ec8b30 42%, #30231a 100%);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  opacity: .26;
  background-image:
    linear-gradient(115deg, transparent 0 48%, rgba(255,255,255,.75) 49% 50%, transparent 51% 100%),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(255,255,255,.16) 59px 60px);
  transform: rotate(-8deg);
}

.stage {
  position: relative;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 4vh, 46px);
}

.brand {
  text-align: center;
  text-shadow: 0 6px 32px rgba(0,0,0,.35);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem 1rem;
  border: 2px solid rgba(255,255,255,.78);
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: clamp(.85rem, 1.4vw, 1.35rem);
}

h1 {
  margin: .25em 0 0;
  font-size: clamp(3.5rem, 12vw, 12rem);
  line-height: .82;
  font-weight: 1000;
  letter-spacing: .09em;
}

.brand p {
  margin: .7rem 0 0;
  font-size: clamp(1.15rem, 3.2vw, 3.4rem);
  font-weight: 900;
  letter-spacing: .22em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 58px);
  align-items: stretch;
}

.counter-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 52vh;
  padding: clamp(20px, 3.3vw, 48px);
  border: 4px solid var(--stroke);
  border-radius: clamp(28px, 4vw, 56px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02)),
    var(--glass);
  box-shadow: 0 24px 80px rgba(0,0,0,.38);
  backdrop-filter: blur(9px);
}

.counter-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(255,255,255,.22), transparent 25%, transparent 70%, rgba(255,255,255,.08));
}

.platform-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.platform-name {
  font-size: clamp(1.6rem, 3.6vw, 4.2rem);
  font-weight: 950;
  letter-spacing: .02em;
}

.status-dot {
  width: clamp(14px, 1.6vw, 24px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #7CFC95;
  box-shadow: 0 0 22px #7CFC95;
}

.count {
  position: relative;
  z-index: 1;
  margin: clamp(12px, 2vh, 28px) 0 clamp(18px, 3vh, 34px);
  font-variant-numeric: tabular-nums;
  font-size: clamp(4.2rem, 12.8vw, 13rem);
  line-height: .88;
  font-weight: 1000;
  letter-spacing: -.04em;
}

.count.bump {
  animation: bump .62s ease-out;
}

@keyframes bump {
  0% { transform: scale(1); text-shadow: none; }
  38% { transform: scale(1.09); text-shadow: 0 0 38px rgba(255,227,160,.9); }
  100% { transform: scale(1); text-shadow: none; }
}

.qr-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(76%, 360px);
  margin-top: auto;
  padding: clamp(10px, 1.5vw, 18px);
  border-radius: clamp(20px, 2.5vw, 32px);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 16px 42px rgba(0,0,0,.28);
}

.qr {
  display: block;
  width: 100%;
  height: auto;
}

.handle {
  position: relative;
  z-index: 1;
  margin-top: clamp(10px, 1.4vw, 18px);
  font-size: clamp(1rem, 2vw, 1.9rem);
  font-weight: 850;
}

.scanline {
  position: relative;
  z-index: 1;
  margin-top: .35rem;
  color: rgba(255,255,255,.84);
  font-weight: 750;
  font-size: clamp(.9rem, 1.45vw, 1.3rem);
  letter-spacing: .04em;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  color: rgba(255,255,255,.86);
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
  font-size: clamp(.82rem, 1.3vw, 1.15rem);
}

.separator { opacity: .6; }

.is-offline .status-dot { background: #ff5b5b; box-shadow: 0 0 22px #ff5b5b; }

@media (max-aspect-ratio: 4 / 5), (max-width: 820px) {
  body { overflow: auto; }
  .stage { justify-content: flex-start; min-height: 100svh; }
  .grid { grid-template-columns: 1fr; }
  .counter-card { min-height: auto; }
  .qr-wrap { width: min(64%, 320px); }
}

@media (orientation: landscape) and (max-height: 680px) {
  .stage { gap: 16px; padding: 18px; }
  .brand p { margin-top: .45rem; }
  .counter-card { min-height: auto; padding: 20px; }
  .qr-wrap { width: min(48%, 250px); }
  .count { margin: 8px 0 14px; }
}
