:root {
  --bg: #08101f;
  --panel: rgba(12, 21, 40, 0.92);
  --panel-2: rgba(255,255,255,0.06);
  --text: #f8fbff;
  --muted: #c9d4e7;
  --gold: #d8b15a;
  --gold-2: #f1d38c;
  --green: #16a34a;
  --danger: #dc2626;
  --shadow: 0 25px 80px rgba(0,0,0,0.35);
  --radius: 28px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(216,177,90,0.24), transparent 30%),
    radial-gradient(circle at bottom left, rgba(39,80,160,0.35), transparent 28%),
    linear-gradient(135deg, #070d19 0%, #0b1530 50%, #08101f 100%);
  overflow: hidden;
}
body.theme-mosque {
  background:
    radial-gradient(circle at top right, rgba(22,163,74,0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(216,177,90,0.16), transparent 26%),
    linear-gradient(135deg, #06141a 0%, #0d2530 50%, #08131d 100%);
}
.app-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 22px;
  gap: 18px;
}
.topbar, .footerbar, .payment-card, .admin-card, .lock-box, .thankyou-box {
  backdrop-filter: blur(14px);
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}
.topbar, .footerbar {
  border-radius: 24px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.topbar h1, .admin-header h1 { margin: 4px 0 6px; font-size: clamp(1.6rem, 2vw, 2.3rem); }
.topbar p, .admin-header p { margin: 0; color: var(--muted); }
.eyebrow { font-size: .8rem; letter-spacing: .24em; color: var(--gold-2); text-transform: uppercase; }
.ghost-btn, .primary, .secondary, .danger, .secondary-link {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.ghost-btn, .secondary, .secondary-link { background: rgba(255,255,255,0.08); }
.primary { background: linear-gradient(135deg, #d8b15a, #f1d38c); color: #1d1809; }
.danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.main-stage { display: grid; place-items: center; }
.payment-card {
  width: min(1100px, 100%);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  position: relative;
}
.live-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(216,177,90,0.14);
  color: var(--gold-2);
  border: 1px solid rgba(216,177,90,0.24);
  font-weight: 700;
}
.network-pill {
  position: absolute;
  top: 26px;
  right: 26px;
  background: rgba(22,163,74,0.14);
  border: 1px solid rgba(22,163,74,0.28);
  color: #8ef0a5;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}
.network-pill.offline {
  background: rgba(220,38,38,0.15);
  border-color: rgba(220,38,38,0.28);
  color: #ffb0b0;
}
.payment-card h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 22px 0 8px; }
.muted { color: var(--muted); margin: 0 0 24px; }
.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 28px;
}
.amount-btn {
  border: 0;
  min-height: 140px;
  border-radius: 24px;
  font-size: clamp(2rem, 3.8vw, 3.5rem);
  font-weight: 800;
  color: #1f1a0a;
  cursor: pointer;
  background: linear-gradient(135deg, #d8b15a, #f5df9d);
  box-shadow: 0 14px 30px rgba(216,177,90,0.25);
}
.amount-btn:active { transform: scale(0.98); }
.status-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: 24px;
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,0.08);
}
.status-icon { font-size: 3rem; }
.status-title { font-size: 1.5rem; font-weight: 800; }
.status-text { color: var(--muted); font-size: 1.05rem; }
.footerbar { position: relative; }
.footer-left, .footer-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hidden-admin-trigger {
  width: 48px; height: 48px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
}
.screensaver, .thankyou-overlay, .lock-modal {
  position: fixed; inset: 0; z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.screensaver.active, .thankyou-overlay.visible, .lock-modal.visible { opacity: 1; pointer-events: auto; }
.screensaver-video, .screensaver-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.screensaver-video { object-fit: cover; background: linear-gradient(135deg, #07101f, #12203f); }
.screensaver-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.7)); }
.screensaver-content {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 100%;
  padding: 24px;
}
.moon { font-size: 5rem; margin-bottom: 12px; }
.screensaver-content h2 { font-size: clamp(2.4rem, 4vw, 4.5rem); margin: 0 0 10px; }
.screensaver-content p { font-size: clamp(1.1rem, 2vw, 1.6rem); color: #f8e8b7; margin: 0; }
.thankyou-overlay {
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(0,0,0,0.15), rgba(0,0,0,0.7));
}
.thankyou-box, .lock-box {
  width: min(580px, calc(100% - 32px));
  border-radius: 28px;
  padding: 34px;
  text-align: center;
}
.thankyou-box h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 12px 0 8px; }
.thankyou-box p { margin: 0; color: var(--muted); font-size: 1.15rem; }
.heart-burst {
  font-size: 4rem;
  animation: pulse 1.2s infinite ease-in-out;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.lock-modal {
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.55);
}
.lock-box input, .admin-card input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 1.05rem;
  margin-top: 12px;
}
.lock-actions, .admin-actions-top {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.lock-error { color: #ffb0b0; min-height: 24px; margin-top: 12px; }
.admin-page { overflow: auto; }
.admin-shell { max-width: 1200px; margin: 0 auto; padding: 22px; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px;
}
.admin-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.admin-card {
  border-radius: 24px;
  padding: 24px;
}
.admin-card h2 { margin-top: 0; }
.result-box {
  margin-top: 14px;
  min-height: 72px;
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: auto;
}
.result-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .92rem;
}
.warning-card { border-color: rgba(239,68,68,0.18); }

@media (max-width: 900px) {
  .amount-grid, .admin-grid { grid-template-columns: 1fr; }
  .network-pill { position: static; margin: 0 auto 10px; display: inline-flex; }
  .topbar, .footerbar, .admin-header { flex-direction: column; align-items: flex-start; }
  .app-shell { padding: 14px; }
  .payment-card { padding: 18px; }
  .amount-btn { min-height: 110px; }
}
