/* style.css */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #222;
    font-family: 'Arial', sans-serif;
    color: #eee;
}

.hidden {
    display: none !important;
}

.game-wrapper {
    background-color: #333;
    border-radius: 10px;
    padding: 20px 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #eee;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-size: 1.8em;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
    padding: 0 10px;
    flex-wrap: wrap; 
}

.score, .speed-boost, .energy {
    font-size: 1.1em;
    margin: 5px 10px;
    display: flex;
    align-items: center;
}

/* Energy Bar Styles */
#energyBarContainer {
    width: 100px;
    height: 18px;
    background-color: #555;
    border: 1px solid #777;
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}

#energyBar {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #4CAF50, #8BC34A); 
    transition: width 0.3s ease-in-out, background 0.3s ease-in-out;
}

#energyValue {
    min-width: 25px; 
    text-align: left;
}

.speed-boost span {
    font-weight: bold;
    color: #ccc;
}

#boost-ready.ready {
    color: #4CAF50;
}

#boost-cooldown.cooldown {
    color: #f44336;
}

.game-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#gameCanvas {
    background-color: #000;
    display: block;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(51, 51, 51, 0.95);
    padding: 30px 50px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

#gameOver h2 {
    color: #eee;
    margin-top: 0;
}

#gameOver p {
    color: #ccc;
    font-size: 1.2em;
    margin-bottom: 20px;
}

#restartButton {
    padding: 12px 25px;
    font-size: 1em;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#restartButton:hover {
    background-color: #0056b3;
}