/**
 * Skyview Games - Premium Mobile Capture Page Styles
 * Modern Gaming UI with Glassmorphism Design
 */

/* === Import Inter Font === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === CSS Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Body & Background === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background: #0a0f1c;
  position: relative;
}

/* === Animated Background === */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.gaming-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #667eea 0%,
    #764ba2 25%,
    #667eea 50%,
    #f093fb 75%,
    #f5576c 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === Floating Shapes === */
.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shape {
  position: absolute;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  top: 20%;
  left: 10%;
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 50%;
  animation-delay: 0s;
}

.shape-2 {
  top: 60%;
  right: 15%;
  width: 60px;
  height: 60px;
  background: #64ffda;
  border-radius: 12px;
  animation-delay: 2s;
}

.shape-3 {
  bottom: 30%;
  left: 20%;
  width: 100px;
  height: 100px;
  background: #ff6b6b;
  border-radius: 50%;
  animation-delay: 4s;
}

.shape-4 {
  top: 10%;
  right: 30%;
  width: 40px;
  height: 40px;
  background: #4ecdc4;
  border-radius: 8px;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* === Main Wrapper === */
.main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* === Logo Section === */
.logo-section {
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.logo-container {
  position: relative;
  text-align: center;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
  margin: 0;
  letter-spacing: 3px;
}

.logo-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 4px;
  margin-top: 5px;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* === Subscription Card === */
.subscription-card {
  width: 100%;
  max-width: 480px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.subscription-card.animate-in {
  animation: cardEntrance 0.8s ease forwards;
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-inner {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* === Card Header === */
.card-header {
  text-align: center;
  margin-bottom: 30px;
}

.pulse-icon {
  position: relative;
  margin: 0 auto 20px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-ring:nth-child(1) {
  width: 80px;
  height: 80px;
  animation-delay: 0s;
}

.pulse-ring:nth-child(2) {
  width: 100px;
  height: 100px;
  animation-delay: 0.5s;
}

.pulse-ring:nth-child(3) {
  width: 120px;
  height: 120px;
  animation-delay: 1s;
}

.game-icon {
  font-size: 2rem;
  z-index: 5;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

@keyframes pulseRing {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  80%, 100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.card-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.5;
}

/* === Stats Row === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #64ffda;
  margin-bottom: 5px;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* === Form Styles === */
.subscription-form {
  margin-bottom: 30px;
}

.form-container {
  margin-bottom: 25px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.input-group:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
}

.input-group.focused {
  border-color: #64ffda;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
}

.input-icon {
  padding: 18px;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.phone-input {
  background: transparent;
  border: none;
  padding: 18px 15px;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  width: 100%;
  outline: none;
}

.phone-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.phone-input.valid {
  color: #64ffda;
}

.input-status {
  padding: 18px;
  opacity: 0;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.input-status.valid {
  opacity: 1;
  color: #64ffda;
}

.status-icon {
  width: 20px;
  height: 20px;
}

.input-helper {
  margin-top: 8px;
  text-align: center;
}

.helper-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* === Submit Button === */
.submit-button {
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 15px;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button.loading {
  pointer-events: none;
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.3s ease;
}

.submit-button.loading .btn-content {
  opacity: 0;
}

.btn-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.submit-button.loading .btn-loading {
  opacity: 1;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.btn-arrow {
  transition: transform 0.3s ease;
}

.submit-button:hover .btn-arrow {
  transform: translateX(3px);
}

/* === Error Toast === */
.error-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(248, 113, 113, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 12px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(248, 113, 113, 0.3);
  transition: transform 0.3s ease;
  z-index: 1000;
  max-width: 90vw;
}

.error-toast.show {
  transform: translateX(-50%) translateY(0);
}

.error-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #fff;
}

.error-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.error-close:hover {
  opacity: 1;
}

/* === Features Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.feature-card.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.feature-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
}

.feature-card p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.4;
}

/* === Trust Section === */
.trust-section {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  transition: all 0.3s ease;
}

.trust-badge:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.trust-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* === Pricing Section === */
.pricing-section {
  text-align: center;
  margin-bottom: 25px;
}

.price-tag {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-bottom: 8px;
}

.price-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #64ffda;
  text-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
}

.price-period {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.price-note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* === Card Footer === */
.card-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.5;
}

.footer-link {
  color: #64ffda;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* === Game Preview === */
.game-preview {
  margin-top: 30px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.8s forwards;
}

.preview-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.preview-carousel {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 10px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.preview-carousel::-webkit-scrollbar {
  display: none;
}

.preview-item {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  min-width: 100px;
  transition: all 0.3s ease;
}

.preview-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.preview-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.preview-item span {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

/* === Animations === */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Responsive Design === */
@media (max-width: 640px) {
  .main-wrapper {
    padding: 15px;
  }
  
  .card-inner {
    padding: 30px 25px;
  }
  
  .logo-text {
    font-size: 2rem;
  }
  
  .card-title {
    font-size: 1.6rem;
  }
  
  .stats-row {
    gap: 15px;
  }
  
  .stat-number {
    font-size: 1.3rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .trust-section {
    gap: 10px;
  }
  
  .trust-badge {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  
  .preview-carousel {
    gap: 10px;
  }
  
  .preview-item {
    min-width: 90px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .main-wrapper {
    padding: 10px;
  }
  
  .card-inner {
    padding: 25px 20px;
  }
  
  .logo-text {
    font-size: 1.8rem;
  }
  
  .card-title {
    font-size: 1.4rem;
  }
  
  .phone-input {
    font-size: 1rem;
  }
  
  .submit-button {
    font-size: 1rem;
    padding: 16px;
  }
  
  .price-amount {
    font-size: 1.8rem;
  }
}

/* === Performance Optimizations === */
.subscription-card,
.game-preview {
  will-change: transform, opacity;
}

.shape {
  will-change: transform;
}

/* === High DPI Displays === */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo-text {
    text-rendering: optimizeLegibility;
  }
  
  .card-title {
    text-rendering: optimizeLegibility;
  }
}

/* === Auto-Detection Styles === */

/* Detection Success Banner */
.detection-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
  border: 1px solid rgba(16, 185, 129, 0.2);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.detection-success.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.detection-icon {
  flex-shrink: 0;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detection-content h4 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.detection-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.4;
}

/* Mobile Data Prompt */
.mobile-data-prompt {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.prompt-icon {
  flex-shrink: 0;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prompt-content {
  flex: 1;
}

.prompt-content h4 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.prompt-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.mobile-data-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.mobile-data-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.mobile-data-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Status Messages */
.status-message {
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid;
}

.status-message.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.status-message.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.status-message.info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.status-message .status-icon {
  flex-shrink: 0;
}

.status-message p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* Auto-detected Input Styling */
.phone-input.auto-detected {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
  border-color: #10b981;
  color: #10b981;
  font-weight: 600;
}

.phone-input.auto-detected::placeholder {
  color: rgba(16, 185, 129, 0.7);
}

/* Edit Number Button */
.edit-number-btn {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.3);
  color: #6b7280;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.edit-number-btn:hover {
  background: rgba(107, 114, 128, 0.2);
  color: #374151;
  transform: translateY(-50%) scale(1.05);
}

/* Small Spinner for Mobile Data Check */
.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

/* Enhanced Input Group for Auto-Detection */
.input-group:has(.auto-detected) {
  position: relative;
}

.input-group:has(.auto-detected):before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 14px;
  z-index: -1;
  opacity: 0.3;
  animation: pulse-success 2s ease-in-out infinite;
}

@keyframes pulse-success {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.02);
  }
}

/* Mobile Responsive Enhancements */
@media (max-width: 480px) {
  .detection-success,
  .mobile-data-prompt {
    padding: 12px 16px;
    gap: 12px;
  }
  
  .detection-content h4,
  .prompt-content h4 {
    font-size: 15px;
  }
  
  .detection-content p,
  .prompt-content p {
    font-size: 13px;
  }
  
  .mobile-data-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .edit-number-btn {
    right: 45px;
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* === Safaricom Identity API Detection States === */
.identity-detection-state {
  text-align: center;
  padding: 60px 20px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* Detecting State */
.identity-detection-state.detecting .detection-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.spinner-ring:nth-child(2) {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  border-top-color: #764ba2;
  animation-delay: -0.3s;
}

.spinner-ring:nth-child(3) {
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  border-top-color: #f093fb;
  animation-delay: -0.6s;
}

.identity-detection-state h2 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.identity-detection-state p {
  font-size: 16px;
  color: rgba(209, 213, 219, 0.8);
  line-height: 1.6;
}

/* Progress Bar */
.detection-progress {
  width: 100%;
  max-width: 300px;
  margin-top: 20px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(107, 114, 128, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  animation: progress-animation 3s ease-in-out;
}

@keyframes progress-animation {
  0% {
    width: 0%;
  }
  30% {
    width: 30%;
  }
  60% {
    width: 60%;
  }
  90% {
    width: 90%;
  }
}

.progress-text {
  font-size: 14px;
  color: rgba(156, 163, 175, 0.8);
  font-style: italic;
}

/* Success State */
.identity-detection-state.success .success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: success-pulse 1s ease-out;
}

.identity-detection-state.success .success-icon svg {
  color: #10b981;
  animation: check-mark 0.6s ease-out 0.3s both;
}

@keyframes success-pulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes check-mark {
  0% {
    stroke-dasharray: 0 100;
  }
  100% {
    stroke-dasharray: 100 100;
  }
}

.success-message {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  background: rgba(16, 185, 129, 0.1);
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.redirect-spinner {
  width: 20px;
  height: 20px;
}

/* Error State */
.identity-detection-state.error .error-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
  border: 2px solid #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: error-shake 0.5s ease-out;
}

.identity-detection-state.error .error-icon svg {
  color: #ef4444;
}

@keyframes error-shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  max-width: 500px;
}

.network-requirements {
  text-align: left;
  margin-top: 20px;
}

.network-requirements h4 {
  font-size: 16px;
  font-weight: 600;
  color: #f3f4f6;
  margin-bottom: 12px;
}

.network-requirements ol {
  list-style: none;
  counter-reset: step-counter;
  padding: 0;
}

.network-requirements li {
  counter-increment: step-counter;
  padding: 10px 0;
  padding-left: 40px;
  position: relative;
  color: rgba(209, 213, 219, 0.9);
  font-size: 14px;
}

.network-requirements li:before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 8px;
  width: 24px;
  height: 24px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
}

/* Retry Button */
.retry-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.retry-button:active {
  transform: translateY(0);
}

.retry-button svg {
  transition: transform 0.3s ease;
}

.retry-button:hover svg {
  transform: rotate(180deg);
}

/* Responsive Design for Detection States */
@media (max-width: 640px) {
  .identity-detection-state {
    padding: 40px 16px;
    min-height: 400px;
  }
  
  .identity-detection-state h2 {
    font-size: 24px;
  }
  
  .identity-detection-state p {
    font-size: 14px;
  }
  
  .detection-spinner {
    transform: scale(0.8);
  }
  
  .error-message {
    padding: 16px;
  }
  
  .network-requirements li {
    font-size: 13px;
    padding-left: 32px;
  }
  
  .retry-button {
    padding: 12px 24px;
    font-size: 14px;
  }
}
/* Flash Message Alerts */
.alert {
  padding: 15px 20px;
  margin: 20px auto;
  max-width: 500px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  animation: slideDown 0.3s ease-out;
}

.alert-danger {
  background: linear-gradient(135deg, #fee 0%, #fdd 100%);
  border-left: 4px solid #f44;
  color: #c00;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.2);
}

.alert-success {
  background: linear-gradient(135deg, #efe 0%, #dfd 100%);
  border-left: 4px solid #4c4;
  color: #080;
  box-shadow: 0 4px 12px rgba(68, 204, 68, 0.2);
}

.alert-info {
  background: linear-gradient(135deg, #eef 0%, #ddf 100%);
  border-left: 4px solid #44f;
  color: #008;
  box-shadow: 0 4px 12px rgba(68, 68, 255, 0.2);
}

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