/* CSS Variables for Consistency */
:root {
    --primary-color: #4caf50; /* Green */
    --secondary-color: #ffd700; /* Yellow */
    --disabled-color: #d3d3d3; /* Light gray */
    --hover-color: #45a049; /* Darker green */
    --text-color: #333; /* Standard text color */
    --background-color: #f0f8ff; /* Light blue background */
    --heading-shadow: 1px 1px 2px #ffa07a; /* Coral shadow for headings */
}

/* General Body Styling */
body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    text-align: center;
    margin: 20px;
    background-color: var(--background-color);
}

/* Headings */
h1 {
    font-size: 2.5em;
    color: #ff6347; /* Tomato */
    margin-bottom: 20px;
    text-shadow: var(--heading-shadow);
}

h2 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Reusable Button Styles */
.button {
    font-size: 1.6em; /* Slightly smaller */
    padding: 15px 30px;
    margin: 15px;
    cursor: pointer;
    border: none;
    border-radius: 25px; /* More rounded corners */
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    transition: transform 0.2s, background-color 0.2s;
    text-align: center;
    display: inline-block;
}

.button:hover {
    transform: scale(1.1); /* Slight enlargement on hover */
}

.button.primary {
    background-color: var(--primary-color); /* Green */
    color: white;
}

.button.secondary {
    background-color: var(--secondary-color); /* Yellow */
    color: var(--text-color); /* Standard text color */
}

.button.disabled {
    background-color: var(--disabled-color); /* Gray for disabled buttons */
    color: #808080; /* Dark gray text */
    cursor: not-allowed; /* Disabled cursor */
    pointer-events: none; /* Disable interactions */
    opacity: 0.7; /* Slightly transparent */
    box-shadow: none;
}

/* play question buttons */
#play-question {
    font-size: 1.5em; /* Reduced font size by 40% */
    padding: 15px 30px; /* Smaller padding */
    margin: 20px;
    cursor: pointer;
    border: none;
    border-radius: 20px; /* Rounded corners */
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    transition: transform 0.2s, background-color 0.2s;
    width: 350px; /* Narrower buttons */
    height: 60px; /* Shorter buttons */
    text-align: center;
}

/* setting button */
#settings-button {
    font-size: 1.5em; /* Reduced font size by 40% */
    padding: 15px 30px; /* Smaller padding */
    margin: 20px;
    cursor: pointer;
    border: none;
    border-radius: 20px; /* Rounded corners */
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    transition: transform 0.2s, background-color 0.2s;
    width: 200px; /* Narrower buttons */
    height: 60px; /* Shorter buttons */
    text-align: center;
}

#play-question {
    background-color: var(--secondary-color); /* Gold */
    color: #4b0082; /* Indigo text */
}

#settings-button {
    background-color: var(--primary-color); /* Green */
    color: white;
}

#play-question:hover,
#settings-button:hover {
    transform: scale(1.1); /* Slight enlargement on hover */
}

/* Choices Section */
#choices {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px; /* More space between buttons */
    margin-top: 20px;
}

#choices button {
    font-size: 3.0em; /* Increased font size by 30% */
    padding: 30px 40px; /* Larger padding */
    cursor: pointer;
    width: 150px; /* Increased width */
    height: 120px; /* Increased height */
    border-radius: 20px;
    border: none;
    background-color: #87cefa; /* Sky Blue */
    color: #00008b; /* Dark Blue */
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    transition: background-color 0.2s, transform 0.2s;
    outline: none;
}

#choices button.disabled {
    background-color: var(--disabled-color); /* Gray */
    color: #808080; /* Dark gray */
    cursor: not-allowed; /* Disabled cursor */
    pointer-events: none;
    transform: none; /* Remove hover effects */
    box-shadow: none; /* No shadow */
}

#choices button:hover {
    background-color: #00bfff; /* Deep Sky Blue */
    transform: scale(1.05);
}

#feedback {
    margin-top: 20px;
    font-size: 1.5em;
    color: #008080; /* Teal */
    font-weight: bold;
    text-shadow: 1px 1px 2px #20b2aa; /* Light Sea Green */
}

/* Modal */
/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 999; /* Above other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black with transparency */
}

/* Modal Content */
.modal-content {
    background-color: white;
    margin: 10% auto; /* Center vertically */
    padding: 20px;
    border-radius: 15px;
    width: 90%; /* Full width for small screens */
    max-width: 500px; /* Limit width on larger screens */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    text-align: center; /* Center content */
}

/* Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Form Sections */
.modal-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.modal-content h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    text-align: left; /* Align sections left */
}

.modal-content label {
    font-size: 1rem;
    display: block; /* Stack options vertically */
    margin: 10px 0;
    text-align: left;
}

.modal-content input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2); /* Larger radio buttons */
    cursor: pointer;
}

/* Buttons */
#save-settings,
#reset-score {
    font-size: 1.2rem;
    padding: 10px 20px;
    margin: 15px 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

#save-settings {
    background-color: var(--primary-color); /* Green */
    color: white;
}

#save-settings:hover {
    background-color: var(--hover-color); /* Darker green */
    transform: scale(1.05);
}

#reset-score:hover {
    background-color: #e55347; /* Darker tomato */
    transform: scale(1.05);
}


/* Start Game Section */
/* Game Section */
.game-container {
    margin: 20px auto;
    text-align: center;
    padding: 20px;
    background-color: #f0f8ff; /* Light blue */
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

.score-display {
    font-size: 1.5rem;
    color: #4caf50; /* Green */
    font-weight: bold;
    margin-top: 20px;
}

/* Choices Container */
.choices-container {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 25px;
    margin-top: 30px;
}

.choices-container button {
    font-size: 2rem;
    padding: 20px 30px;
    background-color: #ffd700; /* Gold */
    color: #4b0082; /* Indigo */
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.choices-container button:hover {
    background-color: #ffc107; /* Lighter Gold */
    transform: scale(1.1);
}

.choices-container button.disabled {
    background-color: #d3d3d3; /* Gray */
    color: #808080; /* Gray text */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Feedback Section */
.feedback {
    font-size: 1.5rem;
    color: #008080; /* Teal */
    font-weight: bold;
    margin-top: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Home Button */
#home-button {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.2rem;
    padding: 10px 20px;
    background-color: #ffa500; /* Orange */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s;
}

#home-button:hover {
    background-color: #ff8c00; /* Darker orange */
    transform: scale(1.05);
}

/* Play Question and Settings Buttons */
#play-question,
#settings-button {
    margin: 10px;
}

#play-question i,
#settings-button i {
    margin-right: 8px;
}

/* Responsive Styles for Medium Screens */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    #play-question,
    #settings-button {
        font-size: 1.3em;
        padding: 12px 25px;
        width: 180px;
        height: 50px;
    }

    #choices button {
        font-size: 2.4em;
        padding: 25px 35px;
        width: 180px;
        height: 110px;
    }

    #feedback {
        font-size: 1.2em;
    }
}

/* Responsive Styles for Small Screens (e.g., Cellphones) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }

    #play-question,
    #settings-button {
        font-size: 1.2em;
        padding: 10px 20px;
        width: 160px;
        height: 45px;
    }

    #choices button {
        font-size: 2.2em;
        padding: 20px 30px;
        width: 160px;
        height: 100px;
    }

    #feedback {
        font-size: 1em;
    }
}

#home-button {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.2rem;
    padding: 10px 20px;
    background-color: #ffa500; /* Orange */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s;
}

#home-button:hover {
    background-color: #ff8c00; /* Darker orange */
    transform: scale(1.05);
}


/* Welcome Section */
.welcome-section {
    text-align: center;
    margin: 20px;
    background-color: #f0f8ff; /* Light blue */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: #4caf50; /* Green */
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #333;
}

/* Games Section */
.games-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px;
    flex-wrap: wrap; /* Adjust for smaller screens */
}

/* Game Cards */
.game-card {
    background-color: #fff; /* White */
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.game-card h2 {
    font-size: 1.5rem;
    color: #4caf50; /* Green */
    margin: 10px 0;
}

.game-card p {
    font-size: 1rem;
    color: #666;
    margin: 10px 0 20px;
}

.game-card i {
    color: #ffd700; /* Gold */
    margin-bottom: 10px;
}

.game-card .button {
    display: inline-block;
    font-size: 1rem;
    padding: 10px 20px;
    background-color: #4caf50; /* Green */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s, transform 0.2s;
}

.game-card .button:hover {
    background-color: #45a049; /* Darker green */
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-card {
        width: 90%; /* Take up full width on smaller screens */
    }
}

/* Footer Styling */
.footer {
    margin-top: 40px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    font-size: 0.9rem;
    border-radius: 10px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

/* Welcome Section Adjustments */
.welcome-section {
    text-align: center;
    margin: 20px auto;
    background-color: var(--background-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 900px;
}

/* Games Section */
.games-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px auto;
    max-width: 1200px;
}

/* Shape Choice Buttons */
.choice-button {
    border: none;
    background: none;
    padding: 10px;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s;
}

.choice-button:hover {
    transform: scale(1.1);
}

/* Shape Images */
.shape-image {
    width: 100px; /* Adjust size as needed */
    height: 100px;
    object-fit: contain;
}

#choices button img {
    width: 175%; /* Adjust size of the shape */
    height: auto;
    position: relative;
    top: -50%; /* Move slightly upward */
    left: -35%; /* Move slightly to the left */
}

/* Style for the container holding color options */
#choices {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px; /* Adjust the spacing between options */
    margin-top: 20px;
}

/* Individual color choice container */
.color-choice {
    width: 120px; /* Reduced width */
    height: 120px; /* Reduced height */
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #ccc; /* Add a border to the container */
    border-radius: 15px; /* Rounded corners */
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.color-choice:hover {
    transform: scale(1.05); /* Slight enlargement on hover */
    border-color: #007BFF; /* Change border color on hover */
}

/* Image inside each color choice */
.color-image {
    width: 100%; /* Image takes full width of the container */
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px; /* Slight rounding on image corners */
}

/* Disabled state for the color choices */
.color-choice.disabled {
    opacity: 0.1; /* Dimmed effect for disabled options */
    cursor: not-allowed; /* Not-allowed cursor for disabled options */
}

.download-box {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa; /* Light background */
    border: 1px solid #ddd; /* Subtle border */
    border-radius: 5px; /* Rounded corners */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.download-box a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.download-box a:hover {
    text-decoration: underline;
    color: #0056b3; /* Slightly darker blue on hover */
}

.not-found-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    background-color: #f0f8f5; /* Light greenish background */
    color: #2e3d36; /* Dark greenish text for contrast */
    padding: 20px;
}

.not-found-content {
    max-width: 600px;
    margin: auto;
}

.not-found-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #27ae60; /* Green primary color */
}

.not-found-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #4f6456; /* Muted greenish-gray text */
}

.not-found-content i {
    color: #e74c3c; /* Red accent color for the icon */
    margin-bottom: 20px;
    font-size: 2rem; /* Adjust icon size for visibility */
}

.not-found-actions {
    margin-top: 20px;
}

.not-found-actions .button {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    text-decoration: none;
    margin: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.not-found-actions .button.primary {
    background-color: #27ae60; /* Primary green button */
    color: #ffffff;
    border: none; /* Remove border for cleaner look */
}

.not-found-actions .button.primary:hover {
    background-color: #219150; /* Darker green for hover */
}

.not-found-actions .button.secondary {
    background-color: #7f8c8d; /* Neutral gray-green for secondary button */
    color: #ffffff;
    border: none;
}

.not-found-actions .button.secondary:hover {
    background-color: #707b7c; /* Slightly darker neutral gray for hover */
}


.pdf-list-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background-color: #ffffff; /* Match the site's background color */
    margin: 0 auto; /* Center the container */
    max-width: 1200px; /* Restrict the width for better alignment */
}

.pdf-item {
    text-align: center;
    background: #f8f9fa; /* Use a light background to match the site's theme */
    border: 1px solid #e0e0e0; /* Subtle border color */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    width: 180px; /* Adjust width to fit the site's layout */
    transition: transform 0.2s, box-shadow 0.2s;
}

.pdf-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Enhance shadow on hover */
}

.pdf-item i {
    color: #007bff; /* Ensure icon color matches the site's primary color */
    margin-bottom: 10px;
    /* Removed font-size to allow HTML to control icon size */
}

.pdf-item h2 {
    font-size: 1.1rem; /* Slightly smaller font size */
    margin-bottom: 10px;
    color: #333333; /* Match the site's text color */
}

.pdf-item .button {
    text-decoration: none;
    padding: 8px 15px;
    background-color: #28a745; /* Use the site's button color */
    color: #ffffff;
    border-radius: 5px;
    display: inline-block;
    font-size: 0.9rem; /* Adjust font size for consistency */
    font-weight: bold;
    transition: background-color 0.2s;
}

.pdf-item .button:hover {
    background-color: #218838; /* Darken button color on hover */
}
