/*
  Direction: Dark OLED Luxury — a vault-door treasury console, not a generic
  crypto dashboard. Deep obsidian ground, one warm gold signature accent
  (the 宝箱/treasure motif), cool "identity" blue reserved for ENS names,
  and a clear warm-in / cool-out language for deposit vs withdraw.
*/
:root {
  color-scheme: dark;
  --bg: #07080a;
  --bg-glow: #2a1d0d;
  --panel: #101114;
  --panel-2: #16181d;
  --border: rgba(212, 162, 78, 0.16);
  --border-strong: rgba(212, 162, 78, 0.4);
  --text: #f3eee3;
  --muted: #948d7c;

  --gold: #d4a24e;
  --gold-bright: #f2c67a;
  --ens: #9db3ea;
  --good: #4fd1a5;
  --warn: #e0a94d;
  --danger: #e2705a;
  --ice: #8fb8e0;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(680px 420px at 18% -8%, var(--bg-glow) 0%, transparent 60%),
    radial-gradient(520px 360px at 100% 100%, #10151f 0%, transparent 55%),
    var(--bg);
}

/* Signature detail: fine film grain over the vault-light glow. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.kiosk {
  width: 100%;
  max-width: 420px;
  background:
    linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 42%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 24px 26px;
  position: relative;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

/* Asymmetric break: the treasure glyph overlaps the card's top-left edge
   rather than sitting inline with the title. */
.kiosk-badge {
  position: absolute;
  top: -18px;
  left: -14px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-family: var(--font-display);
  background: linear-gradient(145deg, var(--gold-bright), var(--gold) 70%);
  color: #241a08;
  box-shadow: 0 8px 22px -6px rgba(212, 162, 78, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.3);
  transform: rotate(-6deg);
}

.kiosk-header { margin-left: 6px; }

h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0 0 4px;
  color: var(--text);
}

.sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* Vault-seam: a thin breathing gold line marking the header/screen boundary. */
.seam {
  height: 1px;
  margin: 4px 0 18px;
  background: linear-gradient(90deg, transparent, var(--border-strong) 45%, var(--gold) 50%, var(--border-strong) 55%, transparent);
  background-size: 220% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .seam { animation: seam-breathe 5s ease-in-out infinite; }
}

@keyframes seam-breathe {
  0%, 100% { background-position: 0% 0; opacity: 0.55; }
  50% { background-position: 100% 0; opacity: 1; }
}

.screen {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.ens {
  font-family: var(--font-mono);
  color: var(--ens);
  font-size: 15px;
  letter-spacing: 0.2px;
}

.balance {
  font-size: 30px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.3px;
}

button {
  font: inherit;
  font-weight: 600;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

button:hover { border-color: var(--border-strong); }
button:active { transform: scale(0.97); }

button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

button.primary {
  background: linear-gradient(145deg, var(--gold-bright), var(--gold) 75%);
  color: #241a08;
  border: none;
  box-shadow: 0 10px 26px -10px rgba(212, 162, 78, 0.55);
}
button.primary:hover { box-shadow: 0 12px 30px -8px rgba(212, 162, 78, 0.7); }

/* Withdraw reads "cool / outbound" against deposit's warm gold "inbound". */
button.tx-withdraw {
  border-color: rgba(143, 184, 224, 0.45);
  color: var(--ice);
  background: rgba(143, 184, 224, 0.06);
}
button.tx-withdraw:hover:not(:disabled) {
  border-color: var(--ice);
  box-shadow: 0 10px 22px -12px rgba(143, 184, 224, 0.5);
}

button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Deposit/withdraw stay their own transaction-type section; yield is a
   clearly separate section below a divider, one option per real pool. */
.section-divider {
  height: 1px;
  margin: 4px 0 2px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

.section-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 2px 0 2px;
}

.yield-section { display: flex; flex-direction: column; gap: 8px; }
.yield-list { display: flex; flex-direction: column; gap: 10px; }

.back-link {
  align-self: flex-start;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 6px 4px;
  font-size: 13px;
  font-weight: 500;
}
.back-link:hover { color: var(--text); }

.yield-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  background: var(--panel-2);
}

.yield-option-top, .yield-option-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yield-option-bottom {
  color: var(--muted);
  font-size: 11.5px;
  font-family: var(--font-mono);
}

.yield-tier {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.yield-pair {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

.yield-range { margin-left: auto; }

.yield-apy {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.yield-option.risk-low { border-left-color: var(--good); }
.yield-option.risk-low .yield-tier { color: var(--good); }
.yield-option.risk-low .yield-apy { color: var(--good); }

.yield-option.risk-medium { border-left-color: var(--warn); }
.yield-option.risk-medium .yield-tier { color: var(--warn); }
.yield-option.risk-medium .yield-apy { color: var(--warn); }

.yield-option.risk-high { border-left-color: var(--danger); }
.yield-option.risk-high .yield-tier { color: var(--danger); }
.yield-option.risk-high .yield-apy { color: var(--danger); }

#btn-done {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 16px;
}
#btn-done:hover { color: var(--text); border-color: var(--border); }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > button { flex: 1; }

input[type="email"] {
  font: inherit;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0c0f;
  color: var(--text);
}
input[type="email"]::placeholder { color: var(--muted); }
input[type="email"]:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 1px;
  border-color: var(--border-strong);
}

.log {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  max-height: 90px;
  overflow-y: auto;
}
