@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --border: #222222;
  --text: #ffffff;
  --text-muted: #666666;
  --accent: #ffffff;
  --glow: rgba(255, 255, 255, 0.05);
}

html,
body {
  height: 100%;
  font-family: 'Playfair Display', serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  text-align: center;
  padding: 2rem;
  animation: fadeIn 0.8s ease-out;
}

.store-name {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  background: linear-gradient(180deg, #ffffff 0%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pay-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.input-wrapper {
  position: relative;
  width: min(320px, 80vw);
}

.currency-symbol {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s ease;
}

.amount-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 2.75rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -moz-appearance: textfield;
}

.amount-input::placeholder {
  color: var(--text-muted);
  font-weight: 700;
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-input:focus {
  border-color: #444444;
  box-shadow: 0 0 0 4px var(--glow);
}

.amount-input:focus~.currency-symbol {
  color: var(--text);
}

.pay-btn {
  width: min(320px, 80vw);
  padding: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 700;
  font-style: italic;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  letter-spacing: 0.05em;
}

.pay-btn:hover {
  transform: scale(1.02);
}

.pay-btn:active {
  transform: scale(0.98);
}

.pay-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.error-msg {
  font-size: 0.875rem;
  color: #ff4444;
  min-height: 1.25rem;
  transition: opacity 0.3s ease;
}

.success-container {
  text-align: center;
  padding: 2rem;
  animation: fadeIn 0.8s ease-out;
}

.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  animation: scaleIn 0.5s ease-out 0.3s both;
}

.checkmark svg {
  width: 36px;
  height: 36px;
  stroke: var(--text);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.4s ease-out 0.7s forwards;
}

.success-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  font-style: italic;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.session-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
  word-break: break-all;
  max-width: min(500px, 90vw);
  margin: 1.5rem auto 2rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.back-link {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--text);
}

.fail-mark {
  border-color: #ff4444;
}

.fail-mark svg {
  stroke: #ff4444;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.4s ease-out 0.7s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}