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

body {
  font-family: 'Segoe UI', -apple-system, sans-serif;
  background-color: #f0f4ff;
  color: #2d3748;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem 1rem;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(99, 132, 227, 0.08);
}

.card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card p.subtitle {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #2d3748;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input::placeholder {
  color: #a0aec0;
}

.input-group input:focus {
  border-color: #7c9cf5;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(124, 156, 245, 0.15);
}

.input-group input.input-error {
  border-color: #fc8181;
  background: #fff5f5;
}

.input-group button {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c9cf5, #6384e3);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.input-group button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 132, 227, 0.3);
}

.input-group button:active:not(:disabled) {
  transform: translateY(0);
}

.input-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.alert {
  display: none;
  margin-top: 1.2rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert.visible {
  display: block;
}

.alert-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
}

.alert-success {
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  color: #276749;
}

.alert-success .receipt-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  padding: 0.6rem 1.1rem;
  background: linear-gradient(135deg, #7c9cf5, #6384e3);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.2s;
}

.alert-success .receipt-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 132, 227, 0.3);
}

.alert-success .receipt-link svg {
  flex-shrink: 0;
}

.support-note {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: #4a7c59;
  line-height: 1.5;
}

.loader-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(240, 244, 255, 0.85);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.loader-overlay.active {
  display: flex;
}

.receipt-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.receipt {
  width: 72px;
  background: #ffffff;
  border-radius: 6px 6px 0 0;
  padding: 14px 10px 0 10px;
  box-shadow: 0 4px 20px rgba(99, 132, 227, 0.15);
  position: relative;
  animation: receiptSlide 1.6s ease-in-out infinite;
  overflow: hidden;
}

.receipt::after {
  content: '';
  display: block;
  width: 100%;
  height: 12px;
  background:
    linear-gradient(135deg, #f0f4ff 33.33%, transparent 33.33%) -6px 0,
    linear-gradient(225deg, #f0f4ff 33.33%, transparent 33.33%) -6px 0;
  background-size: 12px 12px;
  position: absolute;
  bottom: 0;
  left: 0;
}

.receipt-line {
  height: 5px;
  border-radius: 3px;
  margin-bottom: 8px;
  animation: lineAppear 1.6s ease-in-out infinite;
}

.receipt-line:nth-child(1) { width: 60%; background: #7c9cf5; animation-delay: 0s; }
.receipt-line:nth-child(2) { width: 85%; background: #e2e8f0; animation-delay: 0.15s; }
.receipt-line:nth-child(3) { width: 70%; background: #e2e8f0; animation-delay: 0.3s; }
.receipt-line:nth-child(4) { width: 50%; background: #e2e8f0; animation-delay: 0.45s; }
.receipt-line:nth-child(5) { width: 75%; background: #7c9cf5; margin-bottom: 18px; animation-delay: 0.6s; }

@keyframes receiptSlide {
  0%, 100% { transform: translateY(6px); }
  50%       { transform: translateY(-6px); }
}

@keyframes lineAppear {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.loader-text {
  font-size: 0.9rem;
  color: #718096;
  font-weight: 500;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

.grecaptcha-badge {
  z-index: 99;
}

footer {
  width: 100%;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: #a0aec0;
  border-top: 1px solid #e2e8f0;
}
