/* style.css - Modern Kids Class Selection */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Fredoka One', 'Comic Neue', cursive, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff9a9e 100%);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating shapes background */
.magic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-shape {
  position: absolute;
  opacity: 0.15;
  animation: float 20s infinite linear;
}

.floating-shape.circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #FFD93D;
  top: 10%;
  left: 5%;
  animation-duration: 25s;
}

.floating-shape.square {
  width: 120px;
  height: 120px;
  background: #6CC04E;
  transform: rotate(45deg);
  bottom: 15%;
  right: 8%;
  animation-duration: 18s;
  animation-direction: reverse;
}

.floating-shape.triangle {
  width: 0;
  height: 0;
  border-left: 75px solid transparent;
  border-right: 75px solid transparent;
  border-bottom: 130px solid #FF6B6B;
  top: 60%;
  left: 10%;
  animation-duration: 22s;
}

.floating-shape.star {
  width: 0;
  height: 0;
  color: #FFD700;
  position: relative;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 87px solid #FFD700;
  transform: rotate(35deg);
  top: 20%;
  right: 15%;
  animation-duration: 30s;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(10deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* Main container */
.welcome-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Header styles */
.header-content {
  text-align: center;
  margin-bottom: 50px;
  padding: 20px;
}

.main-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: white;
  text-shadow: 5px 5px 0 #4a2f1a, 8px 8px 0 rgba(0,0,0,0.2);
  letter-spacing: 3px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  display: inline-block;
  padding: 20px 40px;
  border-radius: 120px;
  border: 4px solid white;
  box-shadow: 0 20px 0 rgba(0,0,0,0.1);
}

.emoji-bounce {
  display: inline-block;
  animation: bounce 2s infinite;
  font-size: 1.2em;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.sub-title {
  font-size: clamp(1.2rem, 4vw, 2rem);
  color: #FFEAA7;
  text-shadow: 3px 3px 0 #8B5A2B;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 15px 30px;
  border-radius: 60px;
  display: inline-block;
  border: 3px solid white;
}

/* Class grid */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding: 20px;
  margin: 20px 0;
}

/* Class card */
.class-card {
  position: relative;
  background: white;
  border-radius: 50px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  border: 6px solid white;
  box-shadow: 0 20px 0 rgba(0,0,0,0.15), 0 10px 20px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  overflow: hidden;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: cardAppear 0.5s ease-out backwards;
}

.class-card:nth-child(1) { animation-delay: 0.1s; background: linear-gradient(135deg, #FFB6C1, #FF69B4); }
.class-card:nth-child(2) { animation-delay: 0.2s; background: linear-gradient(135deg, #FFD93D, #FFA500); }
.class-card:nth-child(3) { animation-delay: 0.3s; background: linear-gradient(135deg, #6CC04E, #2E8B57); }
.class-card:nth-child(4) { animation-delay: 0.4s; background: linear-gradient(135deg, #3B7AFF, #1E4DB7); }
.class-card:nth-child(5) { animation-delay: 0.5s; background: linear-gradient(135deg, #B983FF, #6B3FA0); }
.class-card:nth-child(6) { animation-delay: 0.6s; background: linear-gradient(135deg, #FF924C, #CC5500); }
.class-card:nth-child(7) { animation-delay: 0.7s; background: linear-gradient(135deg, #FF3B3F, #B22222); }

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.class-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 30px 0 rgba(0,0,0,0.15), 0 20px 30px rgba(0,0,0,0.3);
}

.class-card:active {
  transform: translateY(5px) scale(0.98);
  box-shadow: 0 10px 0 rgba(0,0,0,0.15);
}

.card-emoji {
  font-size: 4.5rem;
  margin-bottom: 15px;
  animation: wiggle 3s infinite;
  filter: drop-shadow(3px 5px 0 rgba(0,0,0,0.2));
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.class-card h2 {
  font-size: 2.2rem;
  color: white;
  text-shadow: 4px 4px 0 rgba(0,0,0,0.3);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.age-badge {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 1.1rem;
  color: white;
  font-weight: bold;
  border: 2px solid white;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.1);
}

.card-hover-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.class-card:hover .card-hover-effect {
  opacity: 1;
}

/* Footer message */
.footer-message {
  text-align: center;
  font-size: 1.8rem;
  color: white;
  text-shadow: 3px 3px 0 #8B5A2B;
  margin-top: 40px;
  padding: 15px;
  background: rgba(255, 215, 0, 0.3);
  backdrop-filter: blur(5px);
  border-radius: 60px;
  border: 4px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.sparkle {
  display: inline-block;
  animation: sparkleRotate 2s infinite;
  font-size: 2rem;
}

@keyframes sparkleRotate {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(15deg) scale(1.2); }
}

/* Touch-friendly */
.class-card, .nav-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .class-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .class-card {
    min-height: 200px;
    padding: 20px 10px;
  }
  
  .card-emoji {
    font-size: 3.5rem;
  }
  
  .class-card h2 {
    font-size: 1.8rem;
  }
  
  .age-badge {
    font-size: 0.9rem;
    padding: 5px 15px;
  }
  
  .footer-message {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .class-grid {
    grid-template-columns: 1fr;
  }
  
  .main-title {
    font-size: 2rem;
    padding: 15px 20px;
  }
  
  .sub-title {
    font-size: 1.2rem;
  }
}

/* Loading animation for cards */
.class-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
  opacity: 0;
}

.class-card:hover::before {
  opacity: 1;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}