/* === Overlay background === */
#ai-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

/* === Subtle rotating aura === */
.ai-gradient {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(
    from 0deg,
    rgba(82,110,254,0.15),
    rgba(255,255,255,0.1),
    rgba(82,110,254,0.15),
    rgba(255,255,255,0.1),
    rgba(82,110,254,0.15)
  );
  animation: rotateAura 12s linear infinite;
  opacity: 0.6;
}
@keyframes rotateAura {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === Gentle scanning wave (top → bottom) === */
.ai-scan {
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.7) 50%,
    rgba(82,110,254,0.5) 75%,
    rgba(255,255,255,0) 100%
  );
  filter: blur(25px);
  opacity: 0.6;
  animation: scanMove 3.5s ease-in-out infinite;
}
@keyframes scanMove {
  0% { transform: translateY(-40%); opacity: 0.3; }
  50% { transform: translateY(100%); opacity: 0.8; }
  100% { transform: translateY(140%); opacity: 0.3; }
}

/* === Soft ambient glow === */
.ai-glow {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at center,
    rgba(82,110,254,0.15),
    rgba(255, 255, 255, 0.05),
    transparent 70%
  );
  animation: pulseGlow 5s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* === Center container === */
.ai-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* === Single dot (initial animation) === */
.ai-single-dot {
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  margin: 0 auto;
  animation: singleDotPulse 2s ease-in-out infinite;
  opacity: 1;
  z-index: 2;
  box-shadow:
    0 0 10px rgba(82,110,254,0.8),
    0 0 20px rgba(82,110,254,0.6),
    0 0 30px rgba(82,110,254,0.4);
}
@keyframes singleDotPulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.9;
    box-shadow:
      0 0 10px rgba(82,110,254,0.8),
      0 0 25px rgba(82,110,254,0.6);
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow:
      0 0 20px rgba(82,110,254,1),
      0 0 40px rgba(82,110,254,0.9),
      0 0 60px rgba(82,110,254,0.8);
  }
}

/* === Hidden state for text === */
.hidden {
  opacity: 0;
  transform: scale(0.3);
}

/* === Thinking text === */
.ai-text {
  font-size: 1.6em;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow:
    0 0 10px rgba(82,110,254,0.6),
    0 0 25px rgba(255, 255, 255, 0.4);
  opacity: 0;
  transform: scale(0.3);
  transition: all 0.8s ease;
  z-index: 3;
}

/* === Animated dots === */
.ai-dots {
  display: inline-flex;
  margin-left: 6px;
}

.ai-dots span {
  width: 8px;
  height: 8px;
  margin: 0 3px;
  background-color: #fff;
  border-radius: 50%;
  opacity: 0.4;
  animation: dotPulse 1.5s ease-in-out infinite;
}

.ai-dots span:nth-child(1) { animation-delay: 0s; }
.ai-dots span:nth-child(2) { animation-delay: 0.3s; }
.ai-dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.3;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* === Text emerge animation === */
@keyframes textAppearFromDot {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}








/* ===== Modal after AI analysis starts Background ===== */
.stats-modal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeInBg 0.3s ease;
}

/* ===== Modal Content Box ===== */
.stats-modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 90%;
  max-width: 800px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease;
}

/* ===== Close Button ===== */
/* .stats-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #444;
  cursor: pointer;
  transition: color 0.2s ease;
}
.stats-close:hover {
  color: #000;
} */

/* ===== Card Container ===== */
.card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

/* ===== Individual Cards ===== */
.stat-card {
  background: #fff;
  width: 220px;
  height: 160px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 30px 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.stat-card:active {
  transform: scale(0.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.stat-card h1 {
  font-size: 48px;
  font-weight: 900;
  margin: 0;
  color: #444;
}
.stat-card p {
  font-size: 18px;
  font-weight: 600;
  margin: 5px 0;
  color: #444;
}
.stat-card span {
  font-size: 14px;
  color: black;
}

.social-interactions, .environment {
  cursor: not-allowed;
  opacity: 0.4;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

