* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #e0e0e0;
  padding: 16px;
}

/* Remove background when in iframe */
body.in-iframe {
  background: transparent;
  padding: 0;
  min-height: auto;
}

.card {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 16px;
  padding: 48px 42px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #7c6af7;
  margin-bottom: 10px;
}

h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #fff;
}

.description {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 32px;
  line-height: 1.5;
}

.field {
  margin-bottom: 22px;
}

label {
  display: block;
  font-size: 15px;
  color: #aaa;
  margin-bottom: 8px;
}

input {
  width: 100%;
  padding: 16px 18px;
  background: #0f0f1a;
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  color: #fff;
  font-size: 17px;
  outline: none;
  transition: border 0.2s;
}

input:focus {
  border-color: #7c6af7;
}

input::placeholder {
  color: #555;
}

input[readonly] {
  background: #15151f;
  color: #4caf82;
  font-weight: 600;
  cursor: not-allowed;
}

button#pay-btn {
  width: 100%;
  padding: 16px;
  background: #25a56a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s, transform 0.1s;
}

button#pay-btn:hover {
  background: #1f8e59;
  transform: translateY(-1px);
}

button#pay-btn:active {
  transform: translateY(0);
}

button#pay-btn:disabled {
  background: #444;
  cursor: not-allowed;
  transform: none;
}

.status-box {
  text-align: center;
  padding-top: 10px;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 5px solid #2a2a4a;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
  position: relative;
}

.spinner::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 4px solid transparent;
  border-top-color: #7c6af7;
  border-right-color: #7c6af7;
  border-radius: 50%;
  animation: spin 1.2s linear infinite reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#status-msg {
  font-size: 17px;
  color: #ccc;
  margin-bottom: 20px;
}

#result-details {
  background: #0f0f1a;
  border: 1px solid #2a2a4a;
  border-radius: 10px;
  padding: 20px;
  text-align: left;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
}

#result-details > div {
  margin-bottom: 12px;
}

#result-details > div:last-child {
  margin-bottom: 0;
}

#result-details .label {
  color: #888;
  font-size: 12px;
}

#result-details .value {
  color: #fff;
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.badge.success { 
  background: #1a3a2a; 
  color: #4caf82; 
}

.badge.pending { 
  background: #2a2a1a; 
  color: #f0c040; 
}

.badge.failed  { 
  background: #3a1a1a; 
  color: #f06060; 
}

.reset-btn {
  background: transparent;
  border: 1px solid #7c6af7;
  color: #7c6af7;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.reset-btn:hover {
  background: #7c6af722;
}

.hidden { 
  display: none; 
}

/* =============================================
   SUCCESS SCREEN
   ============================================= */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 4px;
}

.success-icon-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 26px;
}

.success-ring {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.ring-fill {
  stroke-dashoffset: 289;
}

.check-svg {
  position: absolute;
  inset: 0;
  width: 110px;
  height: 110px;
}

.check-mark {
  stroke-dashoffset: 40;
}

.success-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.success-sub {
  font-size: 16px;
  color: #888;
  margin: 0 0 28px;
}

.success-details {
  width: 100%;
  background: #0f0f1a;
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1e1e30;
  font-size: 15px;
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-row:first-child {
  padding-top: 0;
}

.detail-label {
  color: #777;
  font-size: 14px;
}

.detail-value {
  color: #e0e0e0;
  font-weight: 600;
}

.detail-value.green {
  color: #25a56a;
}

.detail-value.mono {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #aaa;
}

.countdown-wrap {
  width: 100%;
  margin-bottom: 20px;
  text-align: center;
}

.countdown-txt {
  font-size: 13px;
  color: #777;
  margin: 0 0 10px;
}

.countdown-bar {
  width: 100%;
  height: 4px;
  background: #1e1e30;
  border-radius: 99px;
  overflow: hidden;
}

.countdown-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #25a56a, #4caf82);
  border-radius: 99px;
  transition: none;
}

.go-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: #25a56a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(37, 165, 106, 0.35);
}

.go-btn:hover {
  background: #1f8e59;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37, 165, 106, 0.45);
}

.go-btn:active {
  transform: translateY(0);
}

/* =============================================
   REMOVE OLD SUCCESS STYLES
   ============================================= */
.success-redirect,
.success-tick,
.redirect-btn {
  display: none;
}

@media (max-width: 480px) {
  .card {
    padding: 32px 24px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .description {
    font-size: 13px;
  }
}
