/* ===================================
   GIVIN ROAD - Game Styles
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.game-page {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #FF8C42 0%, #D4691E 50%, #8B4789 100%);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    max-height: 100%;
}

#gameCanvas {
    display: block;
    background: #87CEEB;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 100%;
    height: 100%;
}

#gameUI {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

#scoreBoard {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 140, 66, 0.9);
    padding: 15px 25px;
    border-radius: 15px;
    color: white;
    font-size: 12px;
    border: 3px solid #FFD700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

#score {
    font-size: 24px;
    color: #FFD700;
    margin-top: 5px;
}

#heartsCollected {
    margin-top: 10px;
    font-size: 14px;
}

#startScreen, #gameOverScreen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    pointer-events: all;
    z-index: 100;
}

#gameOverScreen {
    display: none;
}

.game-title {
    font-size: 48px;
    color: #FFD700;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0 #FF8C42;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-subtitle {
    font-size: 16px;
    margin-bottom: 30px;
    color: #F5DEB3;
    max-width: 600px;
    text-align: center;
    padding: 0 20px;
    line-height: 1.8;
}

.btn-game {
    padding: 15px 40px;
    font-size: 16px;
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #FF8C42, #D4691E);
    color: white;
    border: 3px solid #FFD700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: all;
    margin: 10px;
}

.btn-game:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #FFD700, #FF8C42);
}

.btn-game:active {
    transform: translateY(-1px);
}

.controls {
    margin-top: 30px;
    font-size: 12px;
    color: #F5DEB3;
    text-align: center;
    line-height: 1.8;
}

.controls div {
    margin: 10px 0;
}

.key {
    display: inline-block;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #FFD700;
    border-radius: 5px;
    margin: 0 5px;
    color: #FFD700;
}

#finalScore, #finalHearts {
    font-size: 24px;
    color: #FFD700;
    margin: 10px 0;
}

.home-button {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 140, 66, 0.9);
    border: 2px solid #FFD700;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-family: 'Press Start 2P', cursive;
    transition: all 0.3s;
    pointer-events: all;
    z-index: 10;
}

.home-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #FFD700, #FF8C42);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .game-title {
        font-size: 32px;
    }

    .game-subtitle {
        font-size: 12px;
    }

    .btn-game {
        font-size: 12px;
        padding: 12px 30px;
    }

    #scoreBoard {
        font-size: 10px;
        padding: 10px 15px;
        top: 10px;
        left: 10px;
    }

    #score {
        font-size: 18px;
    }

    #heartsCollected {
        font-size: 12px;
    }

    .home-button {
        font-size: 10px;
        padding: 8px 15px;
        top: 10px;
        right: 10px;
    }

    .controls {
        font-size: 10px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFD700;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}