/* سیستم QR گواهی‌نامه - استایل جدید */

.qr-verify-page {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  font-family: "Vazir", "Tahoma", Arial, sans-serif;
}

/* هدر صفحه */
.qr-verify-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: white;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.qr-icon {
  font-size: 60px;
  margin-bottom: 15px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.qr-verify-header h1 {
  font-size: 32px;
  margin: 0 0 10px;
  font-weight: bold;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.qr-verify-header h2 {
  font-size: 20px;
  margin: 0;
  opacity: 0.95;
  font-weight: normal;
}

/* دستورالعمل اسکن */
.qr-scan-instruction {
  background: white;
  padding: 50px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  border: 2px dashed #667eea;
}

.instruction-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.instruction-text-fa {
  font-size: 20px;
  color: #2d3748;
  margin-bottom: 10px;
  font-weight: 600;
}

.instruction-text-en {
  font-size: 16px;
  color: #718096;
  margin-bottom: 30px;
}

/* ورود دستی */
.manual-entry {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e2e8f0;
}

.manual-entry p {
  font-size: 16px;
  color: #4a5568;
  margin-bottom: 15px;
}

.qr-manual-form {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.qr-manual-form input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s;
  font-family: "Courier New", monospace;
}

.qr-manual-form input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.qr-btn-primary {
  padding: 15px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.qr-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* لودینگ خودکار */
.qr-auto-verify {
  padding: 60px 20px;
}

.qr-loading {
  text-align: center;
  padding: 40px 20px;
}

.qr-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.qr-loading p {
  font-size: 18px;
  color: #4a5568;
  margin: 10px 0;
}

.loading-text-en {
  font-size: 14px;
  color: #a0aec0;
}

/* نتیجه موفق */
.qr-success-container {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qr-success-badge {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 30px;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* دو باکس اطلاعات */
.qr-info-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 35px;
}

.qr-info-box {
  padding: 30px;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
}

.qr-box-persian {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 2px solid #86efac;
  text-align: right;
  direction: rtl;
}

.qr-box-english {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 2px solid #93c5fd;
  text-align: left;
  direction: ltr;
}

.qr-box-icon {
  font-size: 40px;
  margin-bottom: 15px;
}

.qr-info-box h3 {
  font-size: 24px;
  margin: 0 0 20px;
  font-weight: bold;
}

.qr-box-persian h3 {
  color: #14532d;
}

.qr-box-english h3 {
  color: #1e3a8a;
  font-family: Arial, sans-serif;
}

.qr-box-content {
  line-height: 1.8;
}

.qr-label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.qr-name {
  font-size: 22px;
  font-weight: bold;
  margin: 5px 0 20px;
}

.qr-box-persian .qr-name {
  color: #166534;
}

.qr-box-english .qr-name {
  color: #1e40af;
}

.qr-code-display {
  font-size: 20px;
  font-family: "Courier New", monospace;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  margin: 5px 0 20px;
  display: inline-block;
  font-weight: bold;
}

.qr-status-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
}

.qr-box-persian .qr-status-badge {
  color: #15803d;
}

.qr-box-english .qr-status-badge {
  color: #1e40af;
}

/* پیش‌نمایش گواهی */
.qr-certificate-preview {
  margin-top: 35px;
  padding: 30px;
  background: #f8fafc;
  border-radius: 15px;
  border: 2px solid #e2e8f0;
}

.qr-certificate-preview h4 {
  text-align: center;
  font-size: 20px;
  color: #2d3748;
  margin: 0 0 20px;
}

.qr-certificate-preview img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
}

.qr-download-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s;
}

.qr-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  color: white;
}

/* نتیجه خطا */
.qr-error-container {
  background: white;
  padding: 50px 30px;
  border-radius: 20px;
  text-align: center;
  border: 3px solid #fca5a5;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.1);
}

.qr-error-badge {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 25px;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.qr-error-container h3 {
  font-size: 26px;
  color: #991b1b;
  margin: 0 0 10px;
}

.qr-error-container h4 {
  font-size: 20px;
  color: #b91c1c;
  margin: 0 0 20px;
  font-family: Arial, sans-serif;
}

.qr-error-container p {
  font-size: 16px;
  color: #dc2626;
  line-height: 1.6;
  margin: 10px 0;
}

.error-hint-en {
  font-size: 14px;
  color: #f87171;
  font-style: italic;
  font-family: Arial, sans-serif;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .qr-verify-header {
    padding: 30px 15px;
  }

  .qr-verify-header h1 {
    font-size: 24px;
  }

  .qr-verify-header h2 {
    font-size: 16px;
  }

  .qr-icon {
    font-size: 50px;
  }

  .qr-info-boxes {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .qr-manual-form {
    flex-direction: column;
  }

  .qr-success-container,
  .qr-certificate-preview {
    padding: 25px 20px;
  }

  .qr-info-box {
    padding: 20px;
  }

  .qr-name {
    font-size: 18px;
  }

  .qr-code-display {
    font-size: 16px;
  }
}
