/* Photo Bop Styles */
#photo-bop-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    font-family: 'Fredoka', sans-serif;
}

/* Base Scene Images */
.scene-farm {
    background-image: url('../assets/bg-photo-bop-farm.png');
    background-size: cover;
    background-position: center bottom;
}

.scene-camping {
    background-image: url('../assets/bg-photo-bop-camping.png');
    background-size: cover;
    background-position: center bottom;
}

.scene-jungle {
    background-image: url('../assets/bg-photo-bop-jungle.jpg');
    background-size: cover;
    background-position: center bottom;
}

.scene-space {
    background-image: url('../assets/bg-photo-bop-space.png');
    background-size: cover;
    background-position: center bottom;
}

.scene-school {
    background: #1e1e3c;
}

#bop-hud {
    display: flex;
    justify-content: space-between;
    padding: 10px 25px;
    margin-top: 1rem;
    /* Same line as back button; first child spacer reserves left space */
    background: rgba(0, 0, 0, 0.6);
    font-size: 1.5rem;
    z-index: 10;
    font-weight: 600;
    border-radius: 8px;
    margin-left: 10px;
    margin-right: 10px;
}

#bop-play-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    /* Let clicks pass through area to the scene */
}

.bop-hole {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
    /* This hides the avatar when it slides down, creating the illusion of being behind the foreground object */
    pointer-events: none;
    /* Let container be invisible to clicks */
}

.bop-head-container {
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.15s ease-out;
    transform: translateY(100%);
    z-index: 1;
    cursor: pointer;
    touch-action: none;
    pointer-events: auto;
}

.bop-head-container.up {
    transform: translateY(0);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bop-head-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.bop-star {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    animation: starPop 0.5s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes starPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -100%) scale(1.5) rotate(180deg);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -150%) scale(2) rotate(360deg);
        opacity: 0;
    }
}

.floating-points {
    position: absolute;
    color: #FFD700;
    font-weight: bold;
    font-size: 2rem;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    z-index: 11;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-60px) scale(1.3);
        opacity: 0;
    }
}

#bop-game-over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    animation: fadeIn 0.5s ease-out;
}

#bop-game-over h2 {
    font-size: 4rem;
    color: #FFD700;
    margin-bottom: 10px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}