/* Floating Bubbles Game Styles */

.bubble {
    width: var(--bubble-size, 100px);
    height: var(--bubble-size, 100px);
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease;
    z-index: 5;
}

.bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#game-title {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
}

#instructions {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 10;
    font-family: 'Arial', sans-serif;
}

/* Animation for floating bubbles */
@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }

    25% {
        transform: translateY(-20px) translateX(10px);
    }

    50% {
        transform: translateY(0) translateX(20px);
    }

    75% {
        transform: translateY(10px) translateX(10px);
    }

    100% {
        transform: translateY(0) translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.bubble {
    animation: float 8s ease-in-out infinite, pulse 3s ease-in-out infinite;
}

/* For better visual effect, we can add a subtle glow effect */
.bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    z-index: -1;
    opacity: 0.7;
}


/* ensure container accepts pointer events */
#game-container { pointer-events: auto; }

/* slightly reduce animation intensity on small screens */
@media (max-width: 600px) {
  .bubble { animation-duration: 10s, 4s; transform-origin: center; }
  .bubble { width: 64px; height: 64px; }
}

/* pop animation fallback (in case JS animation is blocked) */
.bubble.pop {
  transition: transform 220ms ease, opacity 220ms ease;
  transform: scale(1.4);
  opacity: 0;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: url('../images/main_background.png') repeat;
    background-size: cover;
    height: 100vh;
    position: relative;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.bubble:hover {
    transform: scale(1.1);
}

#game-title {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

#instructions {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

#menu-overlay, #game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: white;
    font-family: 'Arial', sans-serif;
}

#menu-overlay h1, #game-over-overlay h1 {
    font-size: 3rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#game-over-overlay p {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.menu-btn {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    border: none;
    border-radius: 50px;
    color: white;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    pointer-events: auto;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.menu-btn:active {
    transform: translateY(1px);
}


