/* CSS Variables */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-darker: #4338ca;
  --success: #10b981;
  --success-dark: #059669;
  --danger: #ef4444;
  --background: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 20px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.6;
}

/* Main Card */
.main-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px var(--shadow), 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 40px 32px;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.title {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Primary Button */
.primary-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 18px;
  font-weight: 700;
  padding: 18px 24px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.primary-btn:active {
  transform: translateY(0);
}

.btn-icon {
  transition: transform 0.2s ease;
}

.primary-btn:hover .btn-icon {
  transform: translateX(4px);
}

/* Footer Links */
.footer-links {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover {
  color: var(--primary-dark);
}

.separator {
  color: var(--text-muted);
}

.copyright {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Modal Base */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: var(--background);
  color: var(--text);
}

/* Modal Welcome */
.modal-welcome {
  padding: 48px 32px;
  text-align: center;
}

.modal-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon.success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: var(--success-dark);
}

.modal-icon.shield {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: var(--primary);
}

.modal-icon.loading {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: var(--success-dark);
}

.modal-icon.loading svg {
  animation: spin 1s linear infinite;
}

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

.modal-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.modal-text {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.modal-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 18px;
  font-weight: 700;
  padding: 18px 24px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.modal-btn:active {
  transform: translateY(0);
}

/* Modal Captcha */
.modal-captcha {
  padding: 40px 32px;
  text-align: center;
}

.captcha-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.captcha-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.captcha-number {
  background: var(--primary-dark);
  color: white;
  font-size: 28px;
  font-weight: 900;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  min-width: 70px;
  text-align: center;
}

.captcha-input {
  width: 100%;
  font-size: 18px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  transition: all 0.2s ease;
  text-align: center;
}

.captcha-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.error-message {
  min-height: 24px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--danger);
  font-weight: 500;
}

/* Modal Approved */
.modal-approved {
  padding: 48px 32px;
  text-align: center;
}

.wait-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--background);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--success) 0%, var(--success-dark) 100%);
  transition: width 0.3s ease;
}

.status-list {
  list-style: none;
  text-align: left;
  margin-top: 24px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.status-item.done {
  color: var(--success-dark);
  background: rgba(16, 185, 129, 0.08);
}

.status-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 8px;
  background: var(--background);
  flex-shrink: 0;
}

.status-item.done .status-icon {
  background: rgba(16, 185, 129, 0.15);
}

/* Info Modal */
.modal-info {
  padding: 40px 32px;
  max-width: 600px;
}

.info-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.info-content {
  text-align: left;
  line-height: 1.7;
}

.info-content p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 15px;
}

.info-content strong {
  color: var(--text);
  font-weight: 700;
}

.info-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 12px;
}

.info-content h3:first-child {
  margin-top: 0;
}

.info-content ul {
  margin-left: 20px;
  margin-bottom: 16px;
}

.info-content li {
  margin-bottom: 8px;
  color: var(--text);
}

.info-close-btn {
  width: 100%;
  background: var(--background);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.2s ease;
}

.info-close-btn:hover {
  background: var(--border);
}

/* Responsive */
@media (max-width: 480px) {
  .main-card {
    padding: 32px 24px;
  }

  .title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 15px;
  }

  .primary-btn {
    font-size: 16px;
    padding: 16px 20px;
  }

  .modal-content {
    padding: 32px 24px;
  }

  .modal-title {
    font-size: 24px;
  }

  .captcha-box {
    flex-direction: column;
    gap: 8px;
  }
}

/* Added styles for contact information layout */
.contact-info {
  margin-top: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--background);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.contact-item svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}

.contact-item div {
  flex: 1;
}

.contact-item strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.contact-item p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
