/* Main site-wide styles for Kiddokids.lk */
:root {
  --main-grad: linear-gradient(135deg, #ffc04c 0%, #ff7e5f 35%, #00a19d 100%);
  --game1: #00a19d; /* Teal */
  --game2: #ff7e5f; /* Coral */
  --game3: #ffc04c; /* Yellow */
  --white: #fff;
  --shadow: 0 6px 26px rgba(0, 161, 157, 0.27);
}

/* Global Styles */
body {
  min-height: 100vh;
  margin: 0;
  font-family: "Quicksand", sans-serif;
  overflow-x: hidden;
}

.content-wrapper {
  flex: 1 0 auto;
}

/* Homepage Styles */
.hero-msg {
  text-align: center;
  color: #444;
  font-size: 1.22rem;
  margin: 28px 0 15px 0;
  letter-spacing: 0.2px;
}

#gameMenu {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  margin: 25px 0 22px 0;
}

.gamecard {
  width: 230px;
  height: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 33px;
  background: var(--white);
  box-shadow: var(--shadow);
  font-family: "Baloo 2", cursive;
  font-size: 1.33rem;
  cursor: pointer;
  border: 4px solid transparent;
  transition: 0.16s;
  position: relative;
}

.gamecard:hover {
  transform: scale(1.07) rotate(-2deg);
  box-shadow: 0 8px 32px rgba(0, 161, 157, 0.33);
  border: 4px solid var(--bs-primary);
}

.gamecard .gameicon {
  font-size: 3.1rem;
  margin-bottom: 19px;
}

.gamecard .btn {
  margin-top: 19px;
}

/* Footer Customization */
footer {
  font-family: "Quicksand", sans-serif;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 9px rgba(0, 161, 157, 0.27);
  margin-top: 2rem;
  flex-shrink: 0;
}

/* Sticky Footer Setup */
html,
body {
  height: 100%;
}

.content-wrapper {
  flex: 1 0 auto;
}

/* Floating Animations */
.floating {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.fballoon {
  position: absolute;
  font-size: 2.6rem;
  opacity: 0.09;
  animation: floatUp 12s linear infinite;
}

@keyframes floatUp {
  0% {
    top: 105vh;
  }
  100% {
    top: -8vh;
  }
}

/* Essential animations for current design */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(1deg);
  }
  50% {
    transform: translateY(-20px) rotate(0deg);
  }
  75% {
    transform: translateY(-10px) rotate(-1deg);
  }
}

@keyframes blob {
  0%,
  100% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}
.animate-blob {
  animation: blob 7s infinite;
}
.animate-spin-slow {
  animation: spin-slow 3s linear infinite;
}
.animation-delay-2000 {
  animation-delay: 2s;
}
.animation-delay-4000 {
  animation-delay: 4s;
}

/* Responsive Styles */
@media (max-width: 700px) {
  .gamecard {
    width: 95vw;
    height: 150px;
    font-size: 0.97rem;
  }
  .gamecard .gameicon {
    font-size: 2.1rem;
  }
}

/* Common Game UI Elements */
.game-content {
  position: relative;
  z-index: 1;
  padding-top: 20px;
}

.game-canvas {
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.game-controls {
  margin-top: 15px;
  text-align: center;
}

.game-info {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  padding: 10px 20px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: var(--shadow);
}

/* Audio Unlock */
.modal-unlock {
  background: rgba(0, 0, 0, 0.6);
}

.modal-unlock .modal-content {
  border-radius: 20px;
  font-family: "Baloo 2", cursive;
}

.modal-unlock .modal-title {
  color: var(--game1);
}

.emoji-lg {
  font-size: 40px;
}

/* --- Game-specific styles --- */

/* Essential form animations */
.form-step {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  opacity: 0;
  transform: translateX(50px) scale(0.95);
}

.form-step.active {
  display: block !important;
  opacity: 1 !important;
  transform: translateX(0) scale(1) !important;
}

.step-indicator {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-indicator.active {
  transform: scale(1.15);
}

.step-error {
  animation: slideInError 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Simplified progress indicator */
.step-indicator div {
  transition: all 0.3s ease;
}

.step-indicator.active {
  transform: scale(1.1);
}

/* Essential utility classes */
html {
  scroll-behavior: smooth;
}

/* Enhanced backdrop effects for modern browsers */
.backdrop-blur-xl {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

textarea::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
