:root {
  /* Palette pulled from the banner + penguin art */
  --ice-deep: #0b2430;
  --ice-mid: #123a4a;
  --ice-soft: #1d6e7e;
  --snow: #e6f1f5;
  --yellow: #e8b23f;
  --yellow-warm: #f4c96a;
  --ok: #5ed4a0;
  --warn: #f4c96a;
  --err: #ff8585;

  --card-bg: rgba(12, 32, 46, 0.62);
  --card-border: rgba(255, 255, 255, 0.10);
  --card-hi: rgba(255, 255, 255, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--snow);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--ice-deep);
  overflow-x: hidden;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 20px;
  position: relative;
}

/* --- Background layers --- */

.bg-layer {
  position: fixed;
  inset: -6%;
  background-image: url('/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(18px) saturate(1.15) brightness(0.78);
  transform: scale(1.08);
  z-index: 0;
}

.bg-tint {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 800px at 50% 10%, rgba(29, 110, 126, 0.22) 0%, transparent 60%),
    radial-gradient(900px 600px at 80% 90%, rgba(232, 178, 63, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, rgba(8, 22, 32, 0.15) 0%, rgba(8, 22, 32, 0.45) 100%);
  z-index: 1;
  pointer-events: none;
}

/* --- Glass card --- */

.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  padding: 36px 36px 28px;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.6),
    0 1px 0 0 rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

/* --- Header / brand --- */

.hero { text-align: center; margin-bottom: 8px; }

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.pixel {
  font-family: "Press Start 2P", monospace;
  font-size: 22px;
  color: var(--snow);
}
.pixel.yellow { color: var(--yellow); }

.sub {
  margin: 14px 0 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230, 241, 245, 0.55);
  font-weight: 500;
}

/* --- Steps --- */

.step {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
}

.step-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.step-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  color: var(--ice-deep);
  background: var(--yellow);
  box-shadow: 0 4px 14px rgba(232, 178, 63, 0.35);
}

h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.muted { color: rgba(230, 241, 245, 0.68); font-size: 14px; line-height: 1.55; margin: 0; }
.small { font-size: 12.5px; }

/* --- Wallet grid --- */

.wallet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wallet {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--snow);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.06s ease;
}
.wallet:hover {
  border-color: rgba(232, 178, 63, 0.5);
  background: rgba(255, 255, 255, 0.07);
}
.wallet:active { transform: translateY(1px); }
.wallet.wide { grid-column: 1 / -1; justify-content: center; }

.w-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.w-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex: 0 0 auto;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.w-icon.lg {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

/* --- Message box --- */

pre#message-box {
  margin: 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d7e4ea;
}

/* --- Manual panel --- */

.manual-panel { margin-top: 16px; }
.manual-panel label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(230, 241, 245, 0.55);
  margin-top: 12px;
}
.manual-panel input,
.manual-panel textarea {
  width: 100%;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  color: var(--snow);
  padding: 11px 13px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.manual-panel input:focus,
.manual-panel textarea:focus { border-color: var(--yellow); }
.manual-panel textarea { resize: vertical; min-height: 64px; }

/* --- Buttons --- */

button.primary {
  margin-top: 16px;
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(180deg, var(--yellow-warm) 0%, var(--yellow) 100%);
  color: var(--ice-deep);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(232, 178, 63, 0.28);
  transition: transform 0.06s ease, box-shadow 0.15s ease;
}
button.primary:hover { box-shadow: 0 8px 26px rgba(232, 178, 63, 0.4); }
button.primary:active { transform: translateY(1px); }
button.primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* --- Status banner --- */

.status {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.55;
}
.status strong { display: block; margin-bottom: 4px; font-size: 14.5px; }
.status.ok { border-color: rgba(94, 212, 160, 0.45); background: rgba(94, 212, 160, 0.10); }
.status.warn { border-color: rgba(244, 201, 106, 0.45); background: rgba(244, 201, 106, 0.10); }
.status.err { border-color: rgba(255, 133, 133, 0.45); background: rgba(255, 133, 133, 0.10); }

/* --- Footer --- */

footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}
footer .muted { font-size: 12px; letter-spacing: 0.02em; }

.hidden { display: none !important; }

.landing-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.landing-actions .wallet.wide { grid-column: 1 / -1; }

@media (max-width: 480px) {
  body { padding: 28px 14px; }
  .card { padding: 24px 20px 20px; border-radius: 20px; }
  .pixel { font-size: 18px; }
  .wallet-grid { grid-template-columns: 1fr; }
  .wallet.wide { grid-column: auto; }
}
