@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;700&display=swap');

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    background-color: #87CEEB;
    user-select: none;
    -webkit-user-select: none;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* HUD */
#hud {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 25px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Fredoka One', cursive;
    font-size: 24px;
    color: #FFD700;
    text-shadow: 1px 1px 0 #d4af37;
    border: 4px solid #FFF;
    pointer-events: auto;
}

.score-label {
    color: #333;
    font-size: 16px;
    margin-right: 5px;
    text-shadow: none;
}

#mute-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

/* Progress Bar for Faith */
#faith-container {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#faith-bar {
    width: 0%;
    /* Starts at 0 */
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb);
    transition: width 0.3s ease;
}

#faith-label {
    position: absolute;
    width: 100%;
    text-align: center;
    top: -25px;
    color: white;
    font-family: 'Fredoka One', cursive;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
    font-size: 14px;
}

#gates-counter {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    transition: opacity 0.3s;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 48px;
    color: #fff;
    text-shadow: 0 4px 0 #333, 0 8px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 2px;
}

p {
    color: #fff;
    font-size: 20px;
    text-align: center;
    max-width: 80%;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn {
    background: linear-gradient(to bottom, #FFD700, #FFA500);
    border: none;
    padding: 18px 45px;
    font-family: 'Fredoka One', cursive;
    font-size: 26px;
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 0 #cc8400, 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase;
}

.btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #cc8400, 0 0 0 rgba(0, 0, 0, 0.2);
}

/* Feedback floating text */
.feedback {
    position: absolute;
    font-family: 'Fredoka One', cursive;
    font-size: 40px;
    pointer-events: none;
    animation: floatUp 1s forwards;
    text-shadow: 2px 2px 0 #000;
    z-index: 20;
    width: 100%;
    text-align: center;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }

    20% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}