/* Crop game image to avoid Gemini logo */
#imageContainer img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center 40%; /* ⬅️ moves image up */
  border-radius: 1rem;
  background: #fff;
}

/* Ensure start screen is properly centered */
#startScreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

#startScreen .flex.flex-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (max-width: 640px) {
  #imageContainer img {
    height: 220px;
    object-position: center 15%;
  }
}

.glass-nav {
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.swipe-card {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out,
    box-shadow 0.2s ease-out;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.swipe-card:active {
  cursor: grabbing !important;
}

.glow-real .bg-green-500 {
  background-color: rgba(34, 197, 94, 0.8) !important;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6), 0 0 40px rgba(34, 197, 94, 0.4),
    inset 0 0 20px rgba(34, 197, 94, 0.2);
  transform: scale(1.1);
}

.glow-ai .bg-red-500 {
  background-color: rgba(239, 68, 68, 0.8) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6), 0 0 40px rgba(239, 68, 68, 0.4),
    inset 0 0 20px rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

html {
  overflow-x: hidden;
}

.pulse-border {
  animation: pulse 2s infinite;
}

@keyframes arrow-slide {
  0%,
  100% {
    transform: translateX(0);
    opacity: 1;
  }
  50% {
    transform: translateX(8px);
    opacity: 0.7;
  }
}

.gradient-glow-btn {
  background: linear-gradient(135deg, #6100ff 0%, #4400aa 50%, #2e006b 100%);
  box-shadow: 0 0 20px rgba(97, 0, 255, 0.5), 0 0 40px rgba(68, 0, 170, 0.3),
    0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.gradient-glow-btn:hover {
  background: linear-gradient(135deg, #4400aa 0%, #6100ff 50%, #2e006b 100%);
  box-shadow: 0 0 30px rgba(97, 0, 255, 0.7), 0 0 60px rgba(68, 0, 170, 0.5),
    0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.arrow-animate {
  display: inline-block;
  margin-left: 8px;
  animation: arrow-slide 1.5s ease-in-out infinite;
  font-size: 1.5rem;
}

.feedback-correct {
  background-color: rgba(34, 197, 94, 0.7);
  color: white;
}

.feedback-wrong {
  background-color: rgba(239, 68, 68, 0.7);
  color: white;
}

/* Splash Screen Styles */
#splashScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
}

#splashBg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
}

#splashContent {
  position: relative;
  z-index: 10;
  text-align: center;
}

#splashIcon {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

/* Phase 1: Icon centered (0-2s) */
.splash-phase-1 #splashIcon {
  animation: none;
  opacity: 1;
  transform: scale(1);
}

/* Phase 2: Expanding background transition (2-3s) */
.splash-phase-2 #splashBg {
  animation: expandBg 1s ease-out forwards;
}

.splash-phase-2 #splashIcon {
  animation: none;
  opacity: 1;
  transform: scale(1);
}

@keyframes expandBg {
  from {
    background-color: white;
    clip-path: circle(0% at 50% 50%);
  }
  to {
    background-color: #1b0341;
    clip-path: circle(150% at 50% 50%);
  }
}

.splash-fade-out {
  animation: splashFadeOut 0.5s ease-out forwards;
}

@keyframes splashFadeOut {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.showcase-image.size-small {
  width: 40px;
  height: 40px;
}

.showcase-image.size-large {
  width: 60px;
  height: 60px;
}

.showcase-image.size-xlarge {
  width: 70px;
  height: 70px;
}

@media (max-width: 640px) {
  .showcase-image.size-small {
    width: 30px;
    height: 30px;
  }

  .showcase-image.size-large {
    width: 40px;
    height: 40px;
  }

  .showcase-image.size-xlarge {
    width: 60px;
    height: 60px;
  }

  .showcase-grid {
    gap: 6px 10px;
    margin-left: 0;
  }

  .showcase-image {
    margin: -8px; /* ⬅️ prevents stacking */
  }
}

.showcase-image:hover {
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
  transform: scale(1.05);
}

.showcase-image:active {
  transform: scale(0.95);
}

@keyframes wiggle-idle {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  25% {
    transform: rotate(1deg) translateY(-2px);
  }
  50% {
    transform: rotate(0deg) translateY(0);
  }
  75% {
    transform: rotate(-1deg) translateY(-2px);
  }
}

.showcase-grid {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  gap: 0;
  top: 0;
  max-width: 100%;
  margin: 0 auto;
  height: auto;
  overflow: visible;
  align-content: flex-start;
  justify-content: center;
  margin-top: 0;
}

.showcase-image {
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, z-index 0.3s ease;
  cursor: pointer;
  animation: wiggle-idle 3s ease-in-out infinite;
  flex-shrink: 0;
  margin: -14px; /* overlap horizontally */
  margin-bottom: -10px;
  position: relative;
  z-index: 1;
}

.showcase-image:hover {
  /* animation: wiggle-hover 0.5s ease-in-out infinite; */
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
  z-index: 100;
}

.showcase-image:nth-child(1) {
  animation-delay: 0s;
}

.showcase-image:nth-child(2) {
  animation-delay: 0.1s;
}

.showcase-image:nth-child(3) {
  animation-delay: 0.2s;
}

.showcase-image:nth-child(4) {
  animation-delay: 0.3s;
}

.showcase-image:nth-child(5) {
  animation-delay: 0.4s;
}

.showcase-image:nth-child(6) {
  animation-delay: 0.5s;
}

.showcase-image:nth-child(7) {
  animation-delay: 0.6s;
}

.showcase-image:nth-child(8) {
  animation-delay: 0.7s;
}

.showcase-image:nth-child(9) {
  animation-delay: 0.8s;
}

.showcase-image:nth-child(10) {
  animation-delay: 0.9s;
}

.showcase-image:nth-child(11) {
  animation-delay: 1s;
}

/* Offline fallback styles */
.offline-mode body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: white;
  color: #1f2937;
}

.offline-mode .bg-white { background-color: white; }
.offline-mode .bg-gray-100 { background-color: #f3f4f6; }
.offline-mode .bg-gray-200 { background-color: #e5e7eb; }
.offline-mode .bg-gray-800 { background-color: #1f2937; }
.offline-mode .bg-purple-700 { background-color: #7c3aed; }
.offline-mode .bg-green-500 { background-color: #10b981; }
.offline-mode .bg-red-500 { background-color: #ef4444; }

.offline-mode .text-white { color: white; }
.offline-mode .text-gray-600 { color: #6b7280; }
.offline-mode .text-gray-700 { color: #374151; }
.offline-mode .text-gray-800 { color: #1f2937; }

.offline-mode .text-xl { font-size: 1.25rem; }
.offline-mode .text-2xl { font-size: 1.5rem; }
.offline-mode .text-4xl { font-size: 2.25rem; }
.offline-mode .text-5xl { font-size: 3rem; }

.offline-mode .font-bold { font-weight: 700; }
.offline-mode .rounded-full { border-radius: 9999px; }
.offline-mode .rounded-lg { border-radius: 0.5rem; }

.offline-mode .p-2 { padding: 0.5rem; }
.offline-mode .p-4 { padding: 1rem; }
.offline-mode .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.offline-mode .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.offline-mode .px-8 { padding-left: 2rem; padding-right: 2rem; }

.offline-mode .mb-2 { margin-bottom: 0.5rem; }
.offline-mode .mb-4 { margin-bottom: 1rem; }
.offline-mode .mb-6 { margin-bottom: 1.5rem; }
.offline-mode .mb-8 { margin-bottom: 2rem; }

.offline-mode .flex { display: flex; }
.offline-mode .flex-col { flex-direction: column; }
.offline-mode .items-center { align-items: center; }
.offline-mode .justify-center { justify-content: center; }
.offline-mode .text-center { text-align: center; }

.offline-mode .hidden { display: none; }
.offline-mode .w-full { width: 100%; }
.offline-mode .max-w-sm { max-width: 24rem; }
.offline-mode .max-w-lg { max-width: 32rem; }
.offline-mode .max-w-4xl { max-width: 56rem; }
.offline-mode .mx-auto { margin-left: auto; margin-right: auto; }

.offline-mode button {
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  outline: none;
}

.offline-mode button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
