* { box-sizing: border-box; margin: 0; padding: 0; }

/* Undo the game's global lock (html,body{height:100%} + body{position:fixed;inset:0;overflow:hidden})
   so the donation page scrolls as a normal document. */
html, body {
  position: static;
  inset: auto;
  height: auto;
  min-height: 100%;
  overflow: visible;
}

body {
  background: #07050a;
  color: #eee;
  font-family: 'Press Start 2P', monospace;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 60px;
  overflow-y: auto;            /* override global body{overflow:hidden} so the donation page scrolls */
  -webkit-overflow-scrolling: touch;
}

#donationPage {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Bottom PLAY button — matches game-info / sponsors pages */
.play {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 28px;
  background: #b14fff;
  color: #0a040c;
  border: 2px solid #b14fff;
  border-radius: 2px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0 16px #b14fff66;
  transition: transform 0.08s, box-shadow 0.08s;
}
.play:hover  { transform: scale(1.03); box-shadow: 0 0 28px #b14fffaa; }
.play:active { transform: scale(0.96); }

/* Header */
.don-header { text-align: center; }
.don-header .cm-title { font-size: 1.1rem; margin-bottom: 14px; }
.don-header .cm-sub   { margin-top: 10px; }

.don-faucet-status {
  font-size: 0.48rem;
  color: #4dd2ff;
  text-shadow: 0 0 8px #4dd2ff66;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

/* DAU chart */
.don-chart-card { padding: 20px 20px 14px; }
.don-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.don-chart-label {
  font-size: 0.38rem;
  color: #b094cc;
  letter-spacing: 1.5px;
}
.don-range-btns { display: flex; gap: 6px; }
.don-range {
  background: transparent;
  border: 1px solid #4a3563;
  border-radius: 4px;
  color: #9a7ab8;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.35rem;
  padding: 4px 7px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: border-color 0.15s, color 0.15s;
}
.don-range:hover  { border-color: #b14fff; color: #b14fff; }
.don-range.active { border-color: #b14fff; color: #b14fff; background: #1a0d28; }
#dauCanvas {
  display: block;
  width: 100%;
  height: 120px;
}

/* Cards */
.don-card {
  background: #110d18;
  border: 1px solid #2a1f3a;
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.don-label {
  font-size: 0.42rem;
  color: #b14fff;
  letter-spacing: 1.5px;
  text-shadow: 0 0 6px #b14fff55;
}

#donateAmount {
  width: 100%;
  background: #0b080e;
  border: 2px solid #3e2a4a;
  border-radius: 8px;
  color: #eee;
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#donateAmount:focus {
  border-color: #b14fff;
  box-shadow: 0 0 10px #b14fff44;
}
#donateAmount::placeholder { color: #3e2a4a; }

/* Split control — reuses global styles, overrides margins */
#splitControl { margin-bottom: 0; }

#generateInvoiceBtn, #donateAgainBtn {
  width: 100%;
  background: linear-gradient(135deg, #7c3aed, #b14fff);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  padding: 16px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: opacity 0.2s, transform 0.1s;
}
#generateInvoiceBtn:hover, #donateAgainBtn:hover { opacity: 0.88; transform: scale(1.02); }
#generateInvoiceBtn:active, #donateAgainBtn:active { transform: scale(0.97); }
#generateInvoiceBtn:disabled { opacity: 0.4; cursor: default; transform: none; }

#donateMsg {
  font-size: 0.48rem;
  color: #ff6b6b;
  min-height: 1em;
  text-align: center;
}

/* Invoice display */
#invoiceQR {
  display: flex;
  justify-content: center;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
}
#invoiceQR canvas, #invoiceQR img { display: block; }

#invoiceText {
  font-size: 0.3rem;
  color: #666;
  word-break: break-all;
  text-align: center;
  line-height: 1.8;
  padding: 0 4px;
}

#copyInvoiceBtn {
  width: 100%;
  background: #1a1025;
  border: 2px solid #b14fff;
  border-radius: 8px;
  color: #b14fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  padding: 14px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s;
}
#copyInvoiceBtn:hover { background: #b14fff; color: #fff; }
#copyInvoiceBtn.copied { background: #1a3020; border-color: #4dd2ff; color: #4dd2ff; }

.don-secondary {
  width: 100%;
  background: transparent;
  border: 1px solid #333;
  border-radius: 8px;
  color: #666;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  padding: 12px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: border-color 0.2s, color 0.2s;
}
.don-secondary:hover { border-color: #666; color: #aaa; }

/* Success */
.don-success { text-align: center; align-items: center; gap: 18px; }
.don-success-icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 16px #f7b731);
}
.don-success-title {
  font-size: 1rem;
  color: #f7b731;
  text-shadow: 0 0 12px #f7b73188;
}
.don-secondary-link {
  font-size: 0.42rem;
  color: #555;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.don-secondary-link:hover { color: #b14fff; }

/* Blink banner */
.don-blink-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #0d0a14;
  border: 1px solid #2a1f3a;
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.don-blink-banner:hover {
  border-color: #fb5607;
  box-shadow: 0 0 14px #fb560733;
}
.don-blink-banner .wos-line1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.58rem;
  line-height: 1.5;
  color: #aaa;
  letter-spacing: 1px;
}
.don-blink-banner .wos-logo {
  height: 28px;
  width: auto;
}
/* Global #wosBanner (ID) forces a stacked column — override to a row here so the
   logo sits to the RIGHT of the text, matching the Rizful banner. */
#wosBanner.don-blink-banner { flex-direction: row; padding-top: 22px; padding-bottom: 22px; }
#wosBanner.don-blink-banner .wos-line1 { margin-bottom: 0; }

/* Rizful browser-wallet banner — blue brand background like rizful.com */
.don-rizful-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #1c6ef2;
  border: 1px solid #1c6ef2;
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.1s;
}
.don-rizful-banner:hover {
  box-shadow: 0 0 18px #1c6ef266;
  transform: scale(1.02);
}
.don-rizful-banner .riz-line1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.58rem;
  line-height: 1.5;
  color: #eaf2ff;
  letter-spacing: 1px;
}
.don-rizful-banner .riz-logo {
  height: 44px;
  width: auto;
  display: block;
  background: #4b515c;          /* grey chip just behind the white logo */
  padding: 7px 12px;
  border-radius: 8px;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  body { padding: 24px 12px 48px; }
  .don-header .cm-title { font-size: 0.85rem; }
  .don-card { padding: 20px 16px; }
  #donateAmount { font-size: 0.8rem; }
}
