/* KidZone Games CSS */

/* Custom Fonts */
.font-bubblegum {
    font-family: 'Bubblegum Sans', cursive;
}
.font-comic {
    font-family: 'Comic Neue', cursive;
}
.font-fredoka {
    font-family: 'Fredoka', sans-serif;
}

/* Text Effects */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.text-shadow-lg {
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
}

/* Animations */
.animate-float {
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}
@keyframes bounce-slow {
    0%, 100% { transform: translateY(-5%); }
    50% { transform: translateY(0); }
}

.animate-wiggle {
    animation: wiggle 2.5s ease-in-out infinite;
}
@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.animate-pulse-custom {
    animation: pulse-custom 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-custom {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

.bg-gradient-animate {
    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%; }
}

/* Bubble Effects */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(to right, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    backdrop-filter: blur(2px);
    animation: float-bubble 6s ease-in-out infinite;
    z-index: -1;
}
@keyframes float-bubble {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-40px) rotate(10deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.5) 50%,
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Wave Animation for Footer */
@keyframes wave-animation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Fade In-Out Animation */
.animate-fade-in-out {
    opacity: 1;
    animation: fade-in 0.3s ease;
    transition: opacity 0.5s ease;
}
@keyframes fade-in {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Theme Styles */
.theme-cotton-candy {
    --bg-gradient: linear-gradient(-45deg, #ffaed7, #9f93ff, #7aceff, #88efbd, #fff0b0);
}

.theme-ocean-depths {
    --bg-gradient: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #24243e, #0f0c29);
}

.theme-sunset-vibes {
    --bg-gradient: linear-gradient(-45deg, #ff9966, #ff5e62, #ff6b6b, #ffb347, #ffcc33);
}

.theme-forest-magic {
    --bg-gradient: linear-gradient(-45deg, #11998e, #38ef7d, #00b09b, #228B22, #96c93d);
}

.theme-calm-sky {
    --bg-gradient: linear-gradient(-45deg, #a2d2ff, #bde0fe, #e9f7ff, #ffffff);
}

/* Main Background */
body.theme-cotton-candy,
body.theme-ocean-depths,
body.theme-sunset-vibes,
body.theme-forest-magic,
body.theme-calm-sky {
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBg 15s ease infinite;
}

/* Unified game page layout */
body.game-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.game-page__center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
}
.game-shell {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}
/* If game content taller than viewport, allow natural scroll while keeping top accessible */
@media (max-width: 700px) {
    .game-page__center { padding: 16px 8px; }
}
@media (max-height: 600px) {
    .game-page__center { align-items: flex-start; padding-top: 12px; }
}
