/* =====================================================
   Football Kick Game – style.css  v2.0
   ===================================================== */

/* ── Variables ── */
#fkg-game-container {
    --fkg-text:    #ffffff;
    --fkg-shadow:  0 0 12px rgba(0,0,0,0.85);
    --fkg-radius:  8px;

    position:   relative;
    width:      100%;
    height:     70vh;
    min-height: 560px;
    overflow:   hidden;
    background: #1a3a1a;  /* fallback while field.jpg loads */
    user-select: none;
    -webkit-user-select: none;
}

/* ── Canvas ── */
#fkg-canvas {
    display: block;
    width:   100%;
    height:  100%;
    cursor:  pointer;
    outline: none;
}

/* ── HUD: Score ── */
#fkg-score {
    position:    absolute;
    top:         16px;
    left:        20px;
    z-index:     100;
    color:       var(--fkg-text);
    font-family: 'Arial Black', Arial, sans-serif;
    font-size:   34px;
    font-weight: 900;
    text-shadow: var(--fkg-shadow);
    line-height: 1;
}

/* ── HUD: Best Score ── */
#fkg-best-score {
    position:    absolute;
    top:         58px;
    left:        20px;
    z-index:     100;
    color:       #ffe97a;
    font-family: 'Arial Black', Arial, sans-serif;
    font-size:   20px;
    font-weight: 700;
    text-shadow: var(--fkg-shadow);
}

/* ── HUD: Shots / Goals bar ── */
#fkg-stats {
    position:    absolute;
    top:         16px;
    right:       20px;
    z-index:     100;
    color:       var(--fkg-text);
    font-family: Arial, sans-serif;
    font-size:   16px;
    font-weight: 600;
    text-shadow: var(--fkg-shadow);
    background:  rgba(0,0,0,0.35);
    padding:     6px 12px;
    border-radius: var(--fkg-radius);
}

/* ── Flash Messages (GOAL / MISS) ── */
#fkg-goal-message,
#fkg-miss-message {
    position:    absolute;
    top:         42%;
    left:        50%;
    transform:   translate(-50%, -50%) scale(0.5);
    z-index:     200;
    font-family: 'Arial Black', Arial, sans-serif;
    font-size:   80px;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(0,0,0,0.9);
    letter-spacing: 4px;
    display:     none;
    opacity:     0;
    transition:  opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

#fkg-goal-message {
    color: #fffb00;
}

#fkg-miss-message {
    color: #ff4444;
    font-size: 60px;
}

#fkg-goal-message.fkg-show,
#fkg-miss-message.fkg-show {
    display:   block;
    opacity:   1;
    transform: translate(-50%, -50%) scale(1);
}

/* ── Instructions ── */
#fkg-instructions {
    position:    absolute;
    bottom:      16px;
    left:        50%;
    transform:   translateX(-50%);
    z-index:     100;
    color:       var(--fkg-text);
    font-family: Arial, sans-serif;
    font-size:   14px;
    text-shadow: var(--fkg-shadow);
    background:  rgba(0,0,0,0.35);
    padding:     6px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #fkg-game-container {
        height:     60vh;
        min-height: 400px;
    }

    #fkg-score {
        font-size: 24px;
        top: 10px;
        left: 12px;
    }

    #fkg-best-score {
        font-size: 16px;
        top: 42px;
        left: 12px;
    }

    #fkg-stats {
        font-size: 13px;
        top: 10px;
        right: 10px;
    }

    #fkg-goal-message {
        font-size: 50px;
    }

    #fkg-miss-message {
        font-size: 38px;
    }

    #fkg-instructions {
        font-size: 12px;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    #fkg-game-container {
        height:     55vh;
        min-height: 320px;
    }

    #fkg-stats {
        display: none; /* hide on very small screens to save space */
    }
}
