/* Custom fonts - must come before tailwindcss */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

@import "tailwindcss";

/* CSS Custom Properties */
:root {
  --tama-pink: #ff6b9d;
  --tama-purple: #c44cff;
  --tama-blue: #4cc9ff;
  --tama-mint: #4cffc4;
  --tama-yellow: #ffe14c;
  --tama-coral: #ff6b6b;
}

/* Global styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Fredoka', sans-serif;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  background-attachment: fixed;
  color: white;
  margin: 0;
  min-height: 100vh;
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, var(--tama-pink), var(--tama-purple), var(--tama-blue), var(--tama-mint));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient 5s ease infinite;
}

/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glow card */
.glow-card {
  background: linear-gradient(135deg, rgba(196, 76, 255, 0.1), rgba(76, 201, 255, 0.1));
  border: 1px solid rgba(196, 76, 255, 0.3);
  transition: all 0.3s ease;
}

.glow-card:hover {
  border-color: rgba(196, 76, 255, 0.6);
  box-shadow: 0 0 30px rgba(196, 76, 255, 0.3), inset 0 0 30px rgba(196, 76, 255, 0.1);
  transform: translateY(-5px) scale(1.02);
}

/* Button glow effect */
.btn-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn-glow:hover::before {
  left: 100%;
}

/* Stat bar */
.stat-bar {
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border-radius: 999px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--tama-purple), var(--tama-blue));
  border-radius: 4px;
}

/* Animations */
@keyframes gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(196, 76, 255, 0.5); }
  50% { box-shadow: 0 0 40px rgba(196, 76, 255, 0.8), 0 0 60px rgba(76, 201, 255, 0.4); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

@keyframes slide-up {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-5deg); }
  75% { transform: translateX(5px) rotate(5deg); }
}

/* Animation classes */
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-bounce-slow { animation: bounce-slow 3s ease-in-out infinite; }
.animate-wiggle { animation: wiggle 1s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-slide-up { animation: slide-up 0.8s ease-out; }
.animate-shake { animation: shake 0.5s ease-in-out; }

/* Floating emoji */
.floating-emoji {
  position: fixed;
  font-size: 2rem;
  opacity: 0.6;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

/* Star background */
.star {
  position: fixed;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}

/* Color preset swatches */
.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.color-swatch:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px currentColor;
}

.color-swatch.active {
  border-color: white;
  box-shadow: 0 0 15px currentColor;
}

/* Pet display container */
.pet-container {
  perspective: 1000px;
}

.pet-screen {
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.pet-container:hover .pet-screen {
  transform: rotateY(5deg) rotateX(-5deg);
}

/* Reveal animation for scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
