/* Retro Neon Arcade CSS */

:root {
  --neon-cyan: #06b6d4;
  --neon-pink: #ec4899;
  --neon-yellow: #facc15;
  --neon-glow: 0 0 15px rgba(6, 182, 212, 0.4);
}

body {
  touch-action: manipulation;
  background-color: #090d16;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.05) 0%, transparent 40%);
}

/* CRT scanlines effect */
.crt-overlay {
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
}

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade {
  animation: fadeIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-scale-up {
  animation: scaleUp 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Memory Game Card 3D Flip */
.memory-card {
  perspective: 1000px;
  user-select: none;
  aspect-ratio: 1;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front, .memory-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.memory-card-front {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.memory-card-back {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 2px solid #06b6d4;
  transform: rotateY(180deg);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.memory-card.matched .memory-card-back {
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
  animation: pulseGlow 1s infinite alternate;
}

@keyframes pulseGlow {
  from { transform: rotateY(180deg) scale(1); }
  to { transform: rotateY(180deg) scale(1.04); }
}

/* Custom Scrollbars */
.custom-scroll::-webkit-scrollbar {
  width: 4px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.5);
  border-radius: 4px;
}

/* Themes classes */
body.theme-cyberpunk {
  --neon-cyan: #06b6d4;
  --neon-pink: #ec4899;
}
body.theme-retro80s {
  --neon-cyan: #f43f5e;
  --neon-pink: #a855f7;
}
body.theme-matrix {
  --neon-cyan: #10b981;
  --neon-pink: #22c55e;
}
body.theme-solar {
  --neon-cyan: #f59e0b;
  --neon-pink: #ea580c;
}