* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: #0d0d0d;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.game-header {
    text-align: center;
}

.game-header h1 {
    font-size: 2.5em;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar-label {
    font-size: 1.1em;
    font-weight: bold;
    color: #00ff00;
    min-width: 80px;
}

.progress-bar-background {
    flex: 1;
    height: 30px;
    background-color: #333;
    border: 2px solid #00ff00;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff00, #00cc00);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #00ff00;
}

.progress-bar-percentage {
    font-size: 1em;
    font-weight: bold;
    color: #00ff00;
    min-width: 50px;
    text-align: right;
}

#gameCanvas {
    border: 3px solid #8B0000;
    background-color: #000;
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 0 20px rgba(183, 4, 4, 0.5);
}

.game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-screen.active {
    display: flex;
}

.game-over-content {
    text-align: center;
    background-color: #1a1a1a;
    padding: 40px;
    border-radius: 10px;
    border: 3px solid #00ff00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.7);
}

.game-over-message {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #00ff00;
}

.game-over-message.win {
    color: #00ff00;
}

.game-over-message.lose {
    color: #ff0000;
}

.restart-button {
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    color: #000;
    background-color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px #ffffff;
    margin: 0 20px;
}

.restart-button:hover {
    background-color: #ffffff;
    box-shadow: 0 0 20px #ffffff;
    transform: scale(1.05);
}

.restart-button:active {
    transform: scale(0.95);
}

@media (max-width: 1280px) {
    #gameCanvas {
        width: 100%;
        height: auto;
    }

    .game-header h1 {
        font-size: 2em;
    }

    .game-over-message {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .game-container {
        padding: 10px;
        gap: 10px;
    }

    .progress-bar-container {
        flex-wrap: wrap;
    }

    .game-header h1 {
        font-size: 1.5em;
    }

    .game-over-content {
        padding: 20px;
    }

    .game-over-message {
        font-size: 1.5em;
    }

    .restart-button {
        padding: 10px 30px;
        font-size: 1em;
    }
}
