/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
}

/* ================= VARIABLES ================= */
:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --accent: #06b6d4;
  --text: #e8ecff;
  --text-muted: #a6b0d8;
  --border: rgba(163, 177, 255, 0.24);
  --surface: linear-gradient(160deg, rgba(20, 25, 44, 0.92), rgba(12, 15, 28, 0.94));
  --surface-soft: linear-gradient(160deg, rgba(30, 36, 62, 0.82), rgba(18, 22, 40, 0.9));
  --bg: #000000;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(139, 92, 246, 0.18);
  --error: #f87171;
  --success: #34d399;
}

/* ================= BASE ================= */
html,
body {
  height: 100%;
}

body {
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

/* ================= HEADER ================= */
header {
  background: #000;
  border-bottom: 1px solid #1f2937;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 76px;
  width: auto;
  object-fit: contain;
}

.icons {
  display: none;
}

.icons img {
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

/* ================= MAIN CONTENT ================= */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 14px;
  overflow-y: auto;
  max-height: 100vh;
}

/* ================= CONTAINER ================= */
.payment-container {
  max-width: 440px;
  width: 100%;
  text-align: center;
}

/* ================= TITLES ================= */
.title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.subtitle {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 14px;
}

/* ================= INFO BOX ================= */
.info-box {
  background: linear-gradient(135deg, rgba(26, 32, 58, 0.8), rgba(18, 22, 40, 0.86));
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.info-text {
  font-size: 13px;
  color: #c9d4ff;
  line-height: 1.5;
}

/* ================= CARD ================= */
.payment-card {
  background: var(--surface);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: left;
  backdrop-filter: blur(8px);
}

/* ================= CARD LOGOS ================= */
.card-logos {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid rgba(120, 141, 255, 0.2);
  border-radius: 14px;
  margin-bottom: 18px;
}

.card-logos img {
  height: 22px;
  opacity: 0.95;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* ================= FORM ================= */
form {
  text-align: left;
}

label {
  font-size: 11px;
  font-weight: 600;
  color: #b9c3f3;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}

input {
  width: 100%;
  padding: 12px 13px;
  font-size: 14px;
  border-radius: 12px;
  border: 1px solid rgba(129, 149, 255, 0.3);
  background: linear-gradient(160deg, rgba(20, 24, 42, 0.94), rgba(14, 18, 34, 0.96));
  color: #eef2ff;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.95);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2), 0 0 16px rgba(6, 182, 212, 0.24);
  background: linear-gradient(160deg, rgba(23, 28, 50, 0.96), rgba(17, 21, 38, 0.98));
}

input::placeholder {
  color: #95a0c8;
  opacity: 1;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-group {
  flex: 1;
}

/* ================= BUTTON ================= */
.confirm-btn {
  width: 100%;
  padding: 12px;
  background: #000000;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.05s ease, box-shadow 0.2s ease;
}

.confirm-btn:hover {
  background: #111111;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.62);
}

.confirm-btn:active {
  transform: translateY(1px);
}

.confirm-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ================= LOADER ================= */
.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ================= FOOTER ================= */
footer {
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 16px;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.footer-links span {
  cursor: pointer;
  transition: color 0.3s ease;
}

.footer-links span:hover {
  color: var(--text);
}

/* ================= ERRORS ================= */
.error-message {
  font-size: 11px;
  color: var(--error);
  margin-top: -6px;
  margin-bottom: 8px;
  display: none;
}

.error-message.show {
  display: block;
}

input.error {
  border-color: var(--error);
}

/* ================= OVERLAYS ================= */
.error-overlay,
.waiting-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.error-modal,
.waiting-modal {
  background: var(--surface);
  padding: 24px;
  border-radius: 12px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.error-title,
.waiting-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.error-text,
.waiting-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ================= SPINNERS ================= */
.spinner,
.waiting-spinner,
.processing-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

/* ================= PROCESSING ================= */
.processing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.processing-title {
  font-size: 16px;
  font-weight: 600;
}

.processing-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* ================= MOBILE ================= */
@media (max-width: 480px) {
  body {
    padding: 0;
  }

  main {
    padding: 16px 12px;
    max-height: 100vh;
  }

  .payment-card {
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }

  .topbar {
    padding: 10px 12px;
  }

  .logo {
    height: 42px;
  }

  .icons img {
    width: 16px;
    height: 16px;
  }
}

/* ================= ANIMATIONS ================= */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================= SCROLLBAR ================= */
main::-webkit-scrollbar {
  width: 4px;
}

main::-webkit-scrollbar-track {
  background: transparent;
}

main::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

main::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
