/* ========== MINI GAME STYLES ========== */

/* Floating Game Button */
.floating-game-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-red));
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(220, 20, 60, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 99;
    animation: bounce 4s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    max-width: 60px;
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: auto;
    touch-action: none;
}

.floating-game-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(220, 20, 60, 0.6);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .floating-game-btn {
        bottom: 20px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
        max-width: 50px;
        pointer-events: auto;
        touch-action: manipulation;
    }
    
    /* Prevent game button from interfering with scroll */
    body.scrolling .floating-game-btn {
        pointer-events: none;
    }
}

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.game-modal-content {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFDAB9 100%);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: gameModalSlide 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes gameModalSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.game-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-red);
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.game-close-btn:hover {
    background: rgba(220, 20, 60, 0.1);
    transform: scale(1.1);
}

.game-title {
    text-align: center;
    color: var(--primary-red);
    margin-bottom: 10px;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-subtitle {
    text-align: center;
    color: var(--primary-orange);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 500;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Game Start Screen */
.game-start-screen {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-start-screen h3 {
    color: var(--primary-red);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.game-start-screen p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.game-instructions {
    font-size: 0.9rem;
    color: #888;
    margin: 15px 0;
    font-style: italic;
}

/* Game Canvas */
#gameCanvas {
    border: 3px solid var(--primary-orange);
    border-radius: 15px;
    background: linear-gradient(135deg, 
        rgba(255, 235, 59, 0.7) 0%,     /* Soft vibrant yellow */
        rgba(255, 215, 0, 0.8) 40%,     /* Golden yellow from logo */
        rgba(255, 193, 7, 0.6) 70%,     /* Warm golden tone */
        rgba(255, 171, 64, 0.5) 100%    /* Light orange, less red */
    );
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    margin-bottom: 15px;
}

/* Game UI */
.game-ui {
    display: none;
    justify-content: space-between;
    width: 100%;
    max-width: 350px;
    margin-bottom: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.game-score, .game-timer {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-red);
}

/* Game Over Screen */
.game-over-screen {
    display: none;
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: gameOverPop 0.5s ease-out;
}

.game-over-screen h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.game-over-screen p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.final-score {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-orange);
    margin: 10px 0;
}

.high-score {
    color: var(--primary-red);
    font-weight: bold;
}

@keyframes gameOverPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Game Buttons */
.game-btn {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-red));
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
    margin: 10px;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.game-btn:active {
    transform: translateY(0);
}

/* Mobile Game Styles */
@media (max-width: 768px) {
    .game-modal-content {
        margin: 2% auto;
        padding: 20px;
        width: 95%;
        max-height: 95vh;
    }
    
    .floating-game-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 1.5rem;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 320px;
        height: auto;
    }
    
    .game-start-screen, .game-over-screen {
        padding: 15px;
    }
    
    .game-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .game-modal-content {
        padding: 15px;
        margin: 1% auto;
    }
    
    .game-title {
        font-size: 1.3rem;
    }
    
    .game-start-screen h3 {
        font-size: 1.1rem;
    }
    
    .game-start-screen p {
        font-size: 0.9rem;
    }
} 