/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background-color: #03103f;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 20px;
}

/* Loading spinner */
.spinner {
  text-align: center;
  padding: 40px;
}

.spinner-icon {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #00ffa7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.message {
  font-size: 16px;
  color: #ffffff;
  text-align: center;
  line-height: 1.5;
}

/* Error state */
.error-container {
  background-color: rgba(255, 68, 68, 0.1);
  border: 2px solid #ff4444;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
}

.error-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background-color: #ff4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
}

.error-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #ff4444;
}

.error-message {
  font-size: 16px;
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 8px;
}

.error-code {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-family: monospace;
  margin-top: 16px;
}

/* Success state */
.success-container {
  background-color: #00ffa7;
  color: #03103f;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
}

.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background-color: #03103f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #00ffa7;
}

.success-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.success-message {
  font-size: 16px;
  opacity: 0.8;
}

/* 3DS Challenge overlay */
.challenge-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.challenge-overlay.visible {
  opacity: 1;
}

.challenge-wrapper {
  background: white;
  border-radius: 12px;
  width: 95%;
  max-width: 600px;
  height: 85vh;
  max-height: 700px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.challenge-overlay.visible .challenge-wrapper {
  transform: translateY(0);
  opacity: 1;
}

.challenge-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
  background: white;
}

.challenge-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 4px 0;
}

.challenge-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.challenge-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: white;
}

.challenge-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 3DS Auth form */
.auth-container {
  background-color: rgba(14, 68, 225, 0.05);
  border: 2px solid #0e44e1;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #ffffff;
}

.auth-message {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-iframe {
  width: 100%;
  height: 400px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: white;
}

/* Responsive design */
@media (max-width: 640px) {
  .container {
    padding: 16px;
  }

  .challenge-wrapper {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .challenge-header {
    padding: 12px 16px;
  }

  .error-container,
  .success-container,
  .auth-container {
    padding: 24px;
  }

  .error-title,
  .success-title,
  .auth-title {
    font-size: 20px;
  }
}

/* Utility classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}
