:root {
    --bg-gradient: radial-gradient(circle at center, #2c3e50 0%, #000000 100%);
    --bucket-color: linear-gradient(135deg, #e74c3c, #c0392b);
    --bucket-rim: #c0392b;
    --ball-grad: radial-gradient(circle at 30% 30%, #f1c40f, #f39c12);
    --text-color: #ecf0f1;
    --bucket-width: 90px;
    --bucket-height: 100px;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-gradient);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    user-select: none;
}

/* --- UI LAYER --- */
#ui-layer {
    position: absolute;
    top: 5%;
    text-align: center;
    z-index: 20;
    width: 100%;
    pointer-events: none;
}

h1 {
    font-size: 2rem;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
}

#score-board {
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(5px);
    margin-top: 10px;
}

/* Estilo do Cronômetro */
#timer-display {
    font-weight: bold;
    color: #3498db;
    /* Azul chamativo */
    margin-left: 15px;
    font-size: 1.3em;
}

#message-area {
    margin-top: 20px;
    font-size: 1.8rem;
    font-weight: 800;
    min-height: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}

/* --- GAME AREA --- */
#game-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 350px;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

/* --- O BALDE (mantido da versão anterior) --- */
.bucket-wrapper {
    position: absolute;
    bottom: 60px;
    width: var(--bucket-width);
    height: var(--bucket-height);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 10;
}

.bucket {
    width: 100%;
    height: 100%;
    background: var(--bucket-color);
    border-radius: 10px 10px 45% 45% / 10px 10px 15% 15%;
    position: relative;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.bucket::before {
    content: '';
    position: absolute;
    top: -5px;
    width: 110%;
    height: 15px;
    background: var(--bucket-rim);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.bucket::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 20%;
    width: 10%;
    height: 60%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    filter: blur(2px);
}

.bucket-wrapper:hover .bucket {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* --- A BOLINHA (mantido da versão anterior) --- */
#ball {
    width: 30px;
    height: 30px;
    background: var(--ball-grad);
    border-radius: 50%;
    position: absolute;
    bottom: 70px;
    left: 0;
    z-index: 5;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
    display: none;
    transition: left 0.3s ease;
}

/* --- BOTÃO (mantido da versão anterior) --- */
#action-btn {
    margin-top: 30px;
    padding: 15px 50px;
    font-size: 1.3rem;
    font-weight: bold;
    background: #fff;
    color: #2c3e50;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

#action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
}

#action-btn:active {
    transform: translateY(1px);
}

/* --- ANIMAÇÕES (mantido da versão anterior) --- */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: fall linear forwards;
    top: -10px;
    z-index: 100;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

@media (max-width: 600px) {
    :root {
        --bucket-width: 70px;
        --bucket-height: 80px;
    }

    h1 {
        font-size: 1.5rem;
    }

    #game-container {
        max-width: 100%;
    }
}

/* MODULO homeimg */
.homeimg {
    position: absolute;
    left: 0.4vh;
    top: 1.1vh;
    z-index: 333;
    width: auto;
    height: 5vh;
    display: flex;
    opacity: 0.4;
    transition: all 0.2s ease-in-out;
}

.homeimg img {
    display: block;
    object-fit: contain;
    height: 100%;
}

.homeimg:hover {
    height: 6vh;
    cursor: pointer;
    opacity: 1;
}

/*-----------------------------------------------------------------------*/