/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #000; /* Black background */
    color: #0a0a0a; /* White text */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Center content vertically and horizontally */
    height: 100vh;
    background: url('assets/img/background.png') no-repeat center center fixed;
    background-size: cover;
    text-align: center; /* Center text globally */
    padding: 20px; /* Add padding for smaller screens */
}

/* Wrapper for canvas */
section.wrapper {
    width: 100%;
    max-width: 1000px; /* Prevent the wrapper from stretching too wide */
    margin: 20px auto; /* Center the wrapper */
}

/* Canvas Styles */
canvas {
    display: block;
    margin: 0 auto;
    outline: 1px solid black;
    max-height: 70vh;
    max-width: 100%;
    background-color: transparent; /* Transparent background */
}

/* Button Styling */
button {
    background-color: #cfcbcb;
    border: none;
    box-shadow: 0 9px #505050;
    padding: 20px;
    text-align: center;
    font-size: 16px;
    border-radius: 8px;  /* Added more rounded corners */
    cursor: pointer;
    margin: 10px;
    transition: all 0.2s ease;  /* Smooth hover effect */
}

button:hover {
    background-color: #555; /* Slightly lighter grey for more contrast */
}

button:active {
    box-shadow: 0 5px #3D3D3D;
    transform: translateY(5px);
}

/* Specific color buttons */
.red {
    color: #FF0000;
}

.blue {
    color: #0000FF;
}

/* Game Over Styles */
.game-over-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.8); /* Transparent black overlay */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 80%; /* Prevent the game-over screen from stretching */
    margin: 20px auto;
}

.game-over-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #ff0000; /* Red for Game Over text */
}

.game-over-message {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.game-over-btn {
    display: inline-block;
    font-size: 1.2rem;
    color: #fff;
    background-color: #ff0000; /* Red button */
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.game-over-btn:hover {
    background-color: #cc0000; /* Darker red on hover */
}

.game-over-btn:focus {
    outline: 2px solid #ff0000; /* Red outline on focus */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Body Styles */
    body {
        padding: 10px;
    }

    /* Canvas Styles */
    canvas {
        max-height: 60vh; /* Reduce canvas height on smaller screens */
    }

    /* Button Styling */
    button {
        padding: 15px;
        font-size: 14px; /* Adjust button size */
    }

    /* Game Over Styles */
    .game-over-container {
        padding: 20px;
        max-width: 95%; /* Increase max width for smaller screens */
    }

    .game-over-title {
        font-size: 2rem; /* Reduce title size */
    }

    .game-over-message {
        font-size: 1.2rem; /* Reduce message font size */
    }

    .game-over-btn {
        font-size: 1rem; /* Adjust button font size */
        padding: 8px 15px;
    }
}

/* Very small screens (mobile phones in portrait) */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    /* Canvas Styles */
    canvas {
        max-height: 50vh; /* Further reduce canvas height on very small screens */
    }

    button {
        padding: 12px;
        font-size: 12px; /* Further reduce button size */
    }

    .game-over-container {
        padding: 15px;
        max-width: 90%;
    }

    .game-over-title {
        font-size: 1.5rem; /* Reduce title size further */
    }

    .game-over-message {
        font-size: 1rem; /* Reduce message font size further */
    }

    .game-over-btn {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}
