/* Charity: water Brand Colors & Fonts

Primary Colors:
- Yellow:     #FFC907
- Blue:       #2E9DF7

Secondary Colors:
- Light Blue: #8BD1CB
- Green:      #4FCB53
- Orange:     #FF902A
- Red:        #F5402C
- Dark Green: #159A48
- Pink:       #F16061

Fonts:
- Proxima Nova
- Avenir

*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e8f8ff 0%, #cceeff 45%, #fff3bb 100%);
    font-family: Arial, sans-serif;
    color: #12354a;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 28px 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(18, 53, 74, 0.15);
}

.score-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 800px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #f7fcff 0%, #eaf8ff 100%);
    border: 1px solid #cde8f3;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(18, 53, 74, 0.08);
}

.timer {
    flex: 0 1 auto;
    font-size: 24px;
    font-weight: bold;
}

#game-container {
    width: 800px;
    height: 600px;
    background: linear-gradient(180deg, #dff7ff 0%, #bfe6f9 100%);
    border: 2px solid #2e9df7;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: none;
}

#game-cursor {
    position: absolute;
    width: 80px;
    height: 80px;
    object-fit: contain;
    pointer-events: none;
    z-index: 20;
    display: none;
    transform: translate(-50%, -50%);
}

.confetti-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 16px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall 2.8s ease-out forwards;
}

.message-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.18);
    z-index: 10;
}

.message-box {
    padding: 18px 24px;
    border-radius: 10px;
    background: white;
    color: #222;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

#start-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #2e9df7 0%, #1e7bd6 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#reset-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffc907 0%, #ffb000 100%);
    color: #12354a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#reset-btn:hover {
    filter: brightness(0.95);
}

#start-btn:hover {
    filter: brightness(1.03);
}

.score {
    flex: 0 1 auto;  /* Don't grow, can shrink, auto basis */
    font-size: 24px;
    font-weight: bold;
}

.water-drop {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #7fd3ff 35%, #2e9df7 85%);
    border-radius: 50%;
    animation: dropFall linear forwards;
    transform-origin: center;
    cursor: pointer;
    padding: 15px;
    margin: -15px;
    transition: transform 0.1s ease;
    box-shadow: inset 0 0 8px rgba(255,255,255,0.55), 0 6px 12px rgba(18,53,74,0.16);
}

.water-drop:hover {
    transform: scale(1.1);  /* Slight grow effect on hover */
}

.bad-drop {
    background-color: #ff4444;
}

.brand-banner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
}

.game-title {
    color: #12354a;
    font-size: 42px;
    margin-top: 0;
    margin-bottom: 4px;
    text-align: center;
}

.game-tagline {
    color: #4f6d7a;
    font-size: 18px;
    margin-bottom: 8px;
    text-align: center;
    max-width: 640px;
}

@keyframes dropFall {
    from {
        transform: translateY(-20px);
    }
    to {
        transform: translateY(600px);
    }
}

@keyframes confettiFall {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--drift), 620px, 0) rotate(720deg);
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .game-wrapper {
        width: min(95vw, 900px);
        padding: 20px 16px;
    }

    .score-panel {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    #game-container {
        width: 100%;
        height: min(70vh, 600px);
    }
}

@media (max-width: 600px) {
    body {
        align-items: flex-start;
        padding: 12px 0;
    }

    .game-wrapper {
        padding: 16px 12px;
        gap: 14px;
    }

    .game-title {
        font-size: 28px;
    }

    .game-tagline {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .score-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .score,
    .timer {
        font-size: 20px;
        text-align: center;
    }

    #start-btn,
    #reset-btn {
        width: 100%;
        font-size: 15px;
    }

    #game-container {
        height: 60vh;
        min-height: 320px;
    }

    #game-cursor {
        width: 56px;
        height: 56px;
    }
}
