/* Beta Test Agreement & Badge Styling */

/* ========================================
   Beta Agreement Modal Styles
   ======================================== */

.beta-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

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

.beta-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

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

.beta-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.beta-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.beta-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.beta-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.beta-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.agreement-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.agreement-text {
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  color: #333;
}

.agreement-confirmation {
  padding: 1rem;
  background: #e7f3ff;
  border: 2px solid #007bff;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: #0056b3;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #007bff;
}

.checkbox-text {
  font-size: 0.95rem;
}

.beta-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.btn-beta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-beta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-beta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.loading-container,
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 0.75rem;
  border-radius: 6px;
  margin-top: 1rem;
  font-weight: 500;
}

.error-message {
  color: #dc3545;
  font-weight: 600;
}

.retry-btn {
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ========================================
   Badge Display Styles
   ======================================== */

.badge-section {
  margin: 2rem 0;
}

.badge-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: white;
  border: 3px solid #e9ecef;
  border-radius: 16px;
  min-width: 140px;
  max-width: 160px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: help;
  position: relative;
  overflow: hidden;
}

.badge-item:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

/* Special Beta Badge Styling */
.badge-item.beta_early_adopter {
  border: 3px solid #667eea;
  background: linear-gradient(135deg, #e7f3ff 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.badge-item.beta_early_adopter::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.badge-item.beta_early_adopter .badge-icon {
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.4));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.badge-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  transition: transform 0.3s;
}

.badge-item:hover .badge-icon {
  transform: scale(1.1) rotate(5deg);
}

.badge-name {
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  color: #333;
  margin-bottom: 0.5rem;
}

.badge-metadata {
  font-size: 0.75rem;
  color: #667eea;
  font-weight: 600;
  text-align: center;
  margin-top: 0.25rem;
}

.badge-date {
  font-size: 0.7rem;
  color: #6c757d;
  text-align: center;
  margin-top: 0.5rem;
}

.no-badges,
.badge-loading,
.badge-error {
  text-align: center;
  padding: 3rem 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}

.empty-badge-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-badges p {
  font-size: 1.1rem;
  color: #6c757d;
  margin: 0.5rem 0;
}

.badge-subtext {
  font-size: 0.9rem;
  color: #adb5bd;
  font-style: italic;
}

.badge-loading p,
.badge-error p {
  margin: 0.5rem 0;
  color: #6c757d;
}

.badge-error button {
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Tooltip for badges */
.badge-item:hover::after {
  content: attr(title);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: pre-line;
  max-width: 250px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  animation: tooltipFade 0.3s ease forwards;
  animation-delay: 0.2s;
}

@keyframes tooltipFade {
  to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .beta-modal-content {
    max-width: 95%;
    max-height: 90vh;
  }

  .beta-modal-header h2 {
    font-size: 1.2rem;
  }

  .agreement-text {
    font-size: 0.85rem;
  }

  .badges-container {
    gap: 1rem;
  }

  .badge-item {
    min-width: 120px;
    padding: 1rem 0.75rem;
  }

  .badge-icon {
    font-size: 2.5rem;
  }

  .badge-name {
    font-size: 0.85rem;
  }
}

/* Print Styles */
@media print {
  .beta-modal-overlay {
    display: none;
  }

  .badge-item {
    page-break-inside: avoid;
  }
}
