﻿body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            text-align: center;
            background: rgba(0, 0, 0, 0.4) url('../img/gamebackground.gif'); /* Replace with your image URL */
            background-blend-mode: darken;
		    background-size: cover; /* Ensures the image covers the whole page */
		    background-position: center; /* Centers the image */
		    background-repeat: no-repeat; /* Prevents repeating the image */
		    background-attachment: fixed; /* Keeps the image fixed during scrolling */
		    margin: 0;
		    padding: 0;
		 	justify-content: center; /* Center content inside */
		   	align-items: center; /* Centers vertically */
		  	display: flex;
		    flex-direction: column;

        }
        h1, h2, h3 {
			color:yellow;
		}
		header {
			margin-top:35px;
		}
		.game-area {
		    display: flex;
		    justify-content: center; /* Center content inside */
		    align-items: center; /* Align items vertically */
		    gap: 20px; /* Space between elements */
		    background: white; /* White background for contrast */
		    max-width: 600px;
		    padding: 20px;
		    border-radius: 10px;
		    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
		    text-align: center; /* Ensures text inside is centered */
		    margin-top:20px;
		}
		.sensei-img {
            width: 100px; /* Adjust image size */
            height: auto;
        }

       .text-container {
		    display: flex;
		    flex-direction: column;
		    align-items: center; /* Center items inside */
		    justify-content: center;
		    text-align: center; /* Centers text */
		    width: 100%; /* Ensure it takes up space evenly */
		}
        #instruction {
            font-size: 24px;
            font-weight: bold;
            margin: 20px 0;
        }
        #timer {
            font-size: 30px;
            font-weight: bold;
            color: red;
        }
        .animate {
            animation: fadeIn 0.5s ease-in-out;
        }
        .timer-selection button {
            padding: 10px 20px;
            margin: 5px;
            font-size: 16px;
            border: none;
            cursor: pointer;
            background: #007BFF;
            color: white;
            border-radius: 5px;
        }
        .timer-selection button:disabled {
            background: gray;
            cursor: not-allowed;
        }
        .timer-selection button:hover:enabled {
            background: #0056b3;
        }
        .player-controls {
            margin-top: 20px;
        }
        button {
            padding: 10px 20px;
            margin: 5px;
            font-size: 16px;
            border: none;
            cursor: pointer;
            background: #007BFF;
            color: white;
            border-radius: 5px;
        }
        button:hover {
            background: #0056b3;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        } 
        
        /* Mobile-Friendly Adjustments for Centering */
@media screen and (max-width: 768px) {
    body {
        background-size: cover;
        background-attachment: scroll; /* Optimize for mobile scrolling */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .game-area {
        max-width: 95%; /* Ensure it fits within the screen */
        width: 100%;
        padding: 15px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .text-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .sensei-img {
        width: 80px; /* Adjust for mobile */
        display: block;
        margin: 0 auto; /* Ensure image is centered */
    }

    #instruction {
        font-size: 20px;
        text-align: center;
    }

    #timer {
        font-size: 26px;
        text-align: center;
    }

    .timer-selection, .player-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .timer-selection button, button {
        width: 100%; /* Full width for smaller screens */
        max-width: 250px;
        font-size: 16px;
        text-align: center;
        display: block;
        margin: 5px auto;
    }
}

@media screen and (max-width: 480px) {
    .game-area {
        padding: 10px;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    #instruction {
        font-size: 18px;
        text-align: center;
    }

    #timer {
        font-size: 24px;
        text-align: center;
    }

    .sensei-img {
        width: 70px;
        display: block;
        margin: 0 auto;
    }

    .timer-selection, .player-controls {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .timer-selection button, button {
        width: 100%;
        max-width: 200px;
        padding: 10px;
        font-size: 14px;
        text-align: center;
        display: block;
        margin: 5px auto;
    }
}
