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

:root {
  --bg:       #f5f5f5;
  --card:     #ffffff;
  --primary:  #5c6bc0;
  --success:  #43a047;
  --warn:     #f9a825;
  --text:     #1a1a1a;
  --muted:    #666666;
  --border:   #e0e0e0;
  --radius:   14px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text);
}

/* Screens */
.screen       { display: none; width: 100%; max-width: 420px; }
.screen.active { display: block; }

/* Card */
.card {
  background:    var(--card);
  border-radius: var(--radius);
  padding:       32px 28px;
  box-shadow:    0 4px 24px rgba(0,0,0,0.08);
}
.card.center { text-align: center; }

/* Product info */
.product-name  { font-size: 1.1rem; font-weight: 600; }
.product-price { font-size: 2rem; font-weight: 700; margin-top: 4px; color: var(--primary); }

.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* Form */
label {
  display:     block;
  font-size:   0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color:       var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"] {
  width:         100%;
  padding:       12px 16px;
  border:        1.5px solid var(--border);
  border-radius: 8px;
  font-size:     1rem;
  outline:       none;
  transition:    border-color 0.2s;
}
input[type="text"]:focus { border-color: var(--primary); }

.name-hint {
  font-size:  0.78rem;
  color:      var(--muted);
  margin-top: 6px;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display:       block;
  width:         100%;
  padding:       14px;
  border-radius: 10px;
  font-size:     1rem;
  font-weight:   600;
  cursor:        pointer;
  border:        none;
  margin-top:    20px;
  transition:    opacity 0.2s, transform 0.1s;
}
.btn-primary:active, .btn-secondary:active { transform: scale(0.98); }

.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: 0.9; }

.btn-secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: #f0f0ff; }

.secure-note {
  text-align: center;
  font-size:  0.78rem;
  color:      var(--muted);
  margin-top: 16px;
}

/* Spinner */
.spinner {
  width:  48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Waiting screen */
.amount-display {
  font-size:   1.6rem;
  font-weight: 700;
  color:       var(--primary);
  margin:      8px 0 20px;
}

.instruction {
  font-size:   0.95rem;
  color:       var(--muted);
  line-height: 1.6;
  background:  #f8f8f8;
  padding:     14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.timer {
  font-size: 0.82rem;
  color:     var(--muted);
}

/* Success & icons */
.icon-success, .icon-warn {
  font-size:     3.5rem;
  margin-bottom: 16px;
}

h2 {
  font-size:     1.4rem;
  margin-bottom: 12px;
}

p { line-height: 1.6; color: var(--muted); }
p strong { color: var(--text); }

.order-id {
  font-size:  0.78rem;
  margin-top: 16px;
  font-family: monospace;
  color:      #999;
}
