@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600&display=swap');

body {
    font-family: 'Baloo 2', cursive;
    font-size: 1.4em;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.8);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: auto;
    height: 100%;
    box-sizing: border-box;
    background-image: url("../static/images/tablehd.jpg");
    background-size: cover;
    touch-action: none;
}

@media (max-width: 700px) { 
    body {
        background-size: auto 100%;
        background-position: center;
    }
    
    #start-message,
    #game-over-message,
    #scored-message,
    .phase-message {
        width: 90%;
        height: auto;
    }
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

#start-message,
#game-over-message {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px;
    border-radius: 10px;
    z-index: 9999;
}

#start-message,
#game-over-message {
    top: 50%;
    transform: translate(-50%, -50%);
}

#start-message button,
#game-over-message button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    margin: 10px;
    cursor: pointer;
    border-radius: 15px;
}

#start-message button:hover,
#game-over-message button:hover {
    background-color: #45a049;
}

#scored-message,
.phase-message {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px;
    border-radius: 10px;
    z-index: 9999;
}

#scored-message p,
.phase-message p {
    margin: 0;
    font-size: 18px;
}

#scored-message[hidden],
.phase-message[hidden] {
    display: none;
}

#score-box {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    min-width: 200px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.white-score {
    color: white;
    margin-right: 15px;
}

.black-score {
    color: black;
}

#invalid-message {
    color: red;
    font-size: 18px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 25px;
    padding: 10px 20px;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
}

#sand-clock {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: auto;
    z-index: 9998;
}

#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}
