:root {
  --purple-900: #1f0f33;
  --purple-800: #2a1346;
  --purple-700: #341a59;
  --purple-600: #3d206d;
  --purple-500: #47277f;
  --gold-400: #f5c542;
  --gold-300: #ffd976;
  --text: #f6f2ff;
  --muted: #c9b9ff;
  --card: #2a1346;
  --border: #6b36c8;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--purple-900);
  color: var(--text);
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}
.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: clamp(16px, 2.5vw, 32px);
  padding-block: 20px;
}
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
      80vmax 80vmax at 10% 10%,
      rgba(125, 64, 255, 0.25),
      transparent 50%
    ),
    radial-gradient(
      60vmax 60vmax at 90% 30%,
      rgba(255, 86, 246, 0.18),
      transparent 55%
    ),
    radial-gradient(
      40vmax 40vmax at 50% 100%,
      rgba(255, 226, 136, 0.18),
      transparent 60%
    ),
    linear-gradient(180deg, var(--purple-900), var(--purple-800));
  filter: saturate(110%);
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.brand-text h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.5px;
}
.tagline {
  margin: 2px 0 0 0;
  color: var(--muted);
  font-weight: 500;
}
.contract {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.addr-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
code#contractAddress {
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  letter-spacing: 0.02em;
}
.btn {
  background: var(--gold-400);
  color: #2d1b00;
  border: 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s transform, 0.2s box-shadow;
  box-shadow: 0 6px 16px rgba(245, 197, 66, 0.25);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-outline {
  background: transparent;
  color: var(--gold-300);
  border: 1px solid var(--gold-400);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.card-title {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.values {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 20px;
}
.value-main {
  font-size: 28px;
  font-weight: 800;
}
.value-main.small {
  font-size: 22px;
}
.value-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 20px;
}
.highlight {
  outline: 2px solid rgba(245, 197, 66, 0.35);
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.12),
    0 12px 40px rgba(245, 197, 66, 0.15);
}
.table-card {
  margin-top: 22px;
  padding: 0;
  overflow: hidden;
}
.table-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 16px 18px;
}
.table-sub {
  color: var(--muted);
  font-size: 13px;
}
.table {
  width: 100%;
}
.row {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 12px;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.row.head {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.proof-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--gold-400);
  color: var(--gold-300);
  text-decoration: none;
  font-weight: 700;
}
.pf-meta {
  font-size: 12px;
  color: var(--muted);
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0 40px 0;
  color: var(--muted);
}
.links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 14px;
}
#bondingStatus {
  font-weight: 600;
  transition: all 0.4s ease;
}

.bonded-glow {
  color: #ff9900;
  text-shadow: 0 0 6px #ffcc33, 0 0 12px #ffaa00, 0 0 20px #ff6600,
    0 0 40px #ff3300;
  animation: pulseGlow 1.6s infinite alternate;
}
.gmgn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid #facc15;
  border-radius: 12px;
  background: #0b0f1a;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.2);
  transition: all 0.25s ease;
}

.gmgn-btn:hover {
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
  transform: scale(1.06);
}

.gmgn-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #1f2937;
  background: #0b1220;
  color: #94a3b8;
}
.muted {
  color: #94a3b8;
}
.value-main {
  font: 700 24px/1.1 Inter, system-ui;
}
.value-sub {
  font: 14px/1.2 Inter, system-ui;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#prev-draws-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#prev-draws-card .table .head {
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(3px);
  background: rgba(15, 23, 42, 0.9);
}
#drawsScroll {
  height: clamp(150px, calc(100vh - 260px), 365px);
  overflow: auto;
  max-height: none;
}
#prev-draws-card .table {
  width: 100%;
}
#prev-draws-card .table .row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 0.8fr 0.8fr 0.6fr;
  column-gap: 12px;
  align-items: center;
  white-space: nowrap;
}
#prev-draws-card .table .row > div {
  padding: 10px 12px;
}
#prev-draws-card .table .head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(20, 16, 40, 0.95);
  backdrop-filter: blur(2px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
}
#prev-draws-card .table .row:nth-child(odd):not(.head) {
  background: rgba(255, 255, 255, 0.02);
}
#prev-draws-card .table .row:not(.head) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
#prev-draws-card .table a {
  color: #8fb5ff;
  text-decoration: none;
}
#prev-draws-card .table a:hover {
  text-decoration: underline;
}
#prev-draws-card .usd,
#prev-draws-card .pct {
  font-variant-numeric: tabular-nums;
}

/* --- BONUS INFO: force themed pill on <button> --- */
button#bonusInfoBtn.table-sub.bonus-pill {
  /* reset native button look */
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;

  /* your themed pill */
  display: inline-block;
  border: 1px solid #2a2244;
  background: linear-gradient(180deg, #1a1230 0%, #140d26 100%);
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .05s ease;
}

button#bonusInfoBtn.table-sub.bonus-pill:hover {
  border-color: #6d4aff;
  box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.18),
              inset 0 0 0 1px rgba(255,255,255,0.05);
}

button#bonusInfoBtn.table-sub.bonus-pill:active {
  transform: translateY(0.5px);
}

button#bonusInfoBtn.table-sub.bonus-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.28);
}
.bonus-pill {
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid #1f2937;
  border-radius: 9999px;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bonus-pill:hover {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

/* --- Prevent bottom UI (taskbar) from covering content --- */
:root { --footer-h: 72px; }  /* adjust if footer is taller */

html, body { height: 100%; }

body {
  min-height: 100dvh; /* dynamic viewport for mobile browsers */
  padding-bottom: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px));
}

/* keep footer visible above the mobile browser chrome */
.footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: blur(6px);
}

/* ensures scroll areas don’t hide content behind footer */
#drawsScroll { padding-bottom: 24px; }

@keyframes pulseGlow {
  0% {
    opacity: 0.9;
    text-shadow: 0 0 8px #ffcc33, 0 0 16px #ffaa00, 0 0 28px #ff6600;
  }
  100% {
    opacity: 1;
    text-shadow: 0 0 10px #ffcc33, 0 0 20px #ffaa00, 0 0 30px #ff6600,
      0 0 50px #ff3300;
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .contract {
    align-items: flex-start;
  }
  .addr-row {
    justify-content: flex-start;
  }
}
