:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1c1c1e;
  --muted: #6b7280;
  --border: #d1d5db;
  --accent: #111111;
  --ok: #1a7f37;
  --bad: #c1121f;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

h1 { margin: 0 0 0.35rem; font-size: 1.5rem; }
.subtitle { margin: 0 0 1.5rem; color: var(--muted); font-size: 0.95rem; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.amount-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 0.85rem;
  transition: border-color 0.15s;
}
.amount-field:focus-within { border-color: var(--accent); }

.currency { font-size: 1.25rem; color: var(--muted); }

#amount {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.85rem 0.5rem;
  font-size: 1.25rem;
  background: transparent;
  color: var(--ink);
}

.error { color: var(--bad); font-size: 0.85rem; margin: 0.5rem 0 0; }

.pay-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 10px;
  padding: 0.95rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: transform 0.08s, opacity 0.15s;
}
.pay-btn:active { transform: scale(0.985); }

.apple-pay { background: #000; }
.samsung-pay { background: #1428a0; }

.pay-btn .mark {
  height: 1.4em;
  width: auto;
  display: block;
}

.note {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

/* Result overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.result-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}
.result-icon.ok { background: var(--ok); }
.result-icon.bad { background: var(--bad); }

.result-card h2 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.result-card p { margin: 0 0 1.5rem; color: var(--muted); }

.secondary-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.secondary-btn:hover { background: var(--bg); }

[hidden] { display: none !important; }
