/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Fredoka", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Header styles */
.header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 1s ease-out;
}

.title {
  font-family: "Fredoka One", cursive;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: #fff;
  text-shadow: 3px 3px 0px #ff6b6b, 6px 6px 0px #4ecdc4, 9px 9px 0px #45b7d1;
  margin-bottom: 20px;
  letter-spacing: 2px;
  line-height: 1.1;
}

.subtitle {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: #fff;
  font-weight: 400;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Main content */
.main-content {
  width: 100%;
  max-width: 900px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-items: center;
}

/* Topic cards */
.topic-card {
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border-radius: 25px;
  padding: 40px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 4px solid transparent;
  position: relative;
  overflow: hidden;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 1s ease-out;
  animation-fill-mode: both;
}

.topic-card:nth-child(1) {
  animation-delay: 0.2s;
}

.topic-card:nth-child(2) {
  animation-delay: 0.4s;
}

.topic-card:nth-child(3) {
  animation-delay: 0.6s;
}

.topic-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
  background-size: 400% 400%;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 25px;
  z-index: -1;
  animation: gradientShift 3s ease infinite;
}

.topic-card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: #ff6b6b;
}

.topic-card:hover::before {
  opacity: 0.1;
}

.topic-card:active {
  transform: translateY(-10px) scale(1.02);
}

.card-content {
  position: relative;
  z-index: 1;
}

.emoji {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
  animation: bounce 2s infinite;
}

.topic-card:nth-child(1) .emoji {
  animation-delay: 0.1s;
}

.topic-card:nth-child(2) .emoji {
  animation-delay: 0.3s;
}

.topic-card:nth-child(3) .emoji {
  animation-delay: 0.5s;
}

.card-title {
  font-family: "Fredoka One", cursive;
  font-size: 2rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 400;
}

.card-description {
  font-size: 1.1rem;
  color: #666;
  font-weight: 400;
}

/* Specific card colors */
.topic-card[data-topic="animals"] {
  background: linear-gradient(145deg, #ff9a9e, #fecfef);
}

.topic-card[data-topic="fruits"] {
  background: linear-gradient(145deg, #a8edea, #fed6e3);
}

.topic-card[data-topic="space"] {
  background: linear-gradient(145deg, #d299c2, #fef9d7);
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    margin-bottom: 40px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 400px;
  }

  .topic-card {
    padding: 30px 20px;
    min-height: 200px;
  }

  .emoji {
    font-size: 3rem;
    margin-bottom: 15px;
  }

  .card-title {
    font-size: 1.5rem;
  }

  .card-description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 2rem;
    text-shadow: 2px 2px 0px #ff6b6b, 4px 4px 0px #4ecdc4, 6px 6px 0px #45b7d1;
  }

  .subtitle {
    font-size: 1rem;
  }

  .topic-card {
    padding: 25px 15px;
    min-height: 180px;
  }

  .emoji {
    font-size: 2.5rem;
  }

  .card-title {
    font-size: 1.3rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .topic-card:hover {
    transform: none;
  }

  .topic-card:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}


