body {
    margin: 0;
    overflow: hidden;
    background-color: #87CEEB;
    background-image: none;
    /* Fallback */
    font-family: 'Fredoka One', cursive;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #87CEEB;
    background-image: url('../../upload/img/bubble_game_bg.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.back-btn,
#start-btn,
.game-card {
    pointer-events: auto;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    font-size: 24px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    z-index: 100;
}

.back-btn:hover {
    transform: scale(1.1);
}

#score-board {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#resource-loader {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 100;
}

#resource-loader.hidden {
    opacity: 0;
}

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 50;
    pointer-events: auto;
    /* Allow clicking play */
}

#start-screen h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: float 3s ease-in-out infinite;
}

#start-screen p {
    font-size: 1.5rem;
    margin-bottom: 40px;
}

#start-btn {
    padding: 15px 40px;
    font-size: 1.5rem;
    background: #FF6B6B;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 0 #D94545, 0 10px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: inherit;
}

#start-btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #D94545, 0 0px 0px rgba(0, 0, 0, 0.2);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}
