body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
}

h1 {
    color: #0080ff;
    text-align: center;
    margin-top: 40px;
}

h2 {
    color: #555;
    margin-top: 20px;
    text-align: center;
    text-decoration: underline;
}

p {
    max-width: 750px;
    margin: 10px auto;
    line-height: 1.6;
}

.website-title-container {
    /* Background that spans the page */
    background-color: #2c3e50; /* Dark blue-grey for a professional look */
    width: 100%;
    padding: 20px 0; /* Vertical padding */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    text-align: center; /* Center the text */
    border-radius: 8px; /* Slightly rounded corners for the container */
}

.website-title {
    /* Title text styling */
    font-family: 'Inter', sans-serif; /* Modern, clean font */
    font-size: 3.5em; /* Large and prominent */
    color: #ecf0f1; /* Light grey for contrast */
    margin: 0; /* Remove default margin */
    letter-spacing: 2px; /* Slightly spaced letters for elegance */
    text-transform: uppercase; /* All caps for a strong header */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Soft text shadow */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .website-title {
        font-size: 2.5em; /* Smaller font on tablets */
    }
}

@media (max-width: 480px) {
    .website-title {
        font-size: 1.8em; /* Even smaller on mobile phones */
        letter-spacing: 1px;
    }
    .website-title-container {
        padding: 15px 0;
    }
}

.paragraph-container {
    /* Background that spans the page for paragraphs */
    background-color: #f4f6f6; /* Light grey for a subtle background */
    width: 80%;
    max-width: 900px; /* Example: Set a maximum width for the box */
    margin: 35px auto 25px auto; /* Center the container horizontally, and add vertical margins */
    padding: 30px 20px; /* More padding for paragraph content */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Lighter shadow than the title */
    border-radius: 8px; /* Consistent rounded corners */
    margin-top: 0px;
    margin-bottom: 0px; /* Space below the paragraph container */
    box-sizing: border-box; /* Include padding in the width calculation */
}

.paragraph-content {
    /* Paragraph text styling */
    font-family: 'Inter', sans-serif; /* Consistent font */
    font-size: 1.1em; /* Readable font size for body text */
    line-height: 1.6; /* Good line spacing for readability */
    color: #34495e; /* Darker text for contrast on light background */
    max-width: 1500px; /* Max width to prevent lines from being too long */
    margin: 0 auto; /* Center the text block within its container */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .paragraph-container {
        padding: 25px 15px;
    }
    .paragraph-content {
        font-size: 1em;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .paragraph-container {
        padding: 20px 10px;
    }
    .paragraph-content {
        font-size: 0.95em;
    }
}

.subject-container {
    background-color: #7d858f; /* Slightly darker blue-grey than the title background */
    width: 80%;
    max-width: 900px; /* Example: Set a maximum width for the box */
    margin: 35px auto 25px auto; /* Center the container horizontally, and add vertical margins */
    padding: 25px 0; /* Increased vertical padding to give space around the inner box */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15); /* Subtle shadow */
    text-align: center; /* Center the inner box */
    border-radius: 8px; /* Consistent rounded corners for the outer container */
    margin-top: 10px; /* Space above the heading container */
    margin-bottom: 0px; /* Space below the heading container */
    box-sizing: border-box; /* Include padding in the width calculation */
}

.subject-heading {
    /* Styling for the H1 text content itself, now inside its own box */
    display: inline-block; /* Allows padding and background to wrap content */
    background-color: #7d858f; /* A darker shade for the inner box background */
    font-family: 'Inter', sans-serif; /* Consistent font */
    font-size: 1.5em; /* Adjusted size for H1 section titles */
    color: #ecf0f1; /* Light grey for contrast */
    padding: 10px 30px; /* Padding inside the H1 box */
    margin: 0; /* Remove default margin */
    letter-spacing: 1.8px; /* Slightly more spaced letters */
    text-transform: uppercase; /* All caps for a strong heading */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* Soft text shadow */
    border-radius: 6px; /* Slightly smaller rounded corners for the inner box */
}

.heading-container {
    /* Outer container for the heading, spanning the page */
    background-color: #42464b; /* Slightly darker blue-grey than the title background */
    width: 80%;
    max-width: 900px; /* Example: Set a maximum width for the box */
    margin: 35px auto 25px auto; /* Center the container horizontally, and add vertical margins */
    padding: 25px 0; /* Increased vertical padding to give space around the inner box */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15); /* Subtle shadow */
    text-align: center; /* Center the inner box */
    border-radius: 8px; /* Consistent rounded corners for the outer container */
    margin-top: 10px; /* Space above the heading container */
    margin-bottom: 0px; /* Space below the heading container */
    box-sizing: border-box; /* Include padding in the width calculation */
}

.website-heading {
    /* Styling for the H1 text content itself, now inside its own box */
    display: inline-block; /* Allows padding and background to wrap content */
    background-color: #42464b; /* A darker shade for the inner box background */
    font-family: 'Inter', sans-serif; /* Consistent font */
    font-size: 2.8em; /* Adjusted size for H1 section titles */
    color: #ecf0f1; /* Light grey for contrast */
    padding: 10px 30px; /* Padding inside the H1 box */
    margin: 0; /* Remove default margin */
    letter-spacing: 1.8px; /* Slightly more spaced letters */
    text-transform: uppercase; /* All caps for a strong heading */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* Soft text shadow */
    border-radius: 6px; /* Slightly smaller rounded corners for the inner box */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .website-heading {
        font-size: 2.2em; /* Smaller font on tablets */
        padding: 8px 20px;
    }
    .heading-container {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .website-heading {
        font-size: 1.6em; /* Even smaller on mobile phones */
        letter-spacing: 1.2px;
        padding: 6px 15px;
    }
    .heading-container {
        padding: 15px 0;
    }
}

 .navbar-container {
            background-color: #3f51b5; /* A distinct blue for the nav bar */
            width: 100%;
            padding: 10px 0;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
            text-align: center; /* Center the nav items */
            border-radius: 8px; /* Consistent rounded corners */
            margin-bottom: 30px; /* Space below the nav bar */
        }

        .navbar-list {
            list-style: none; /* Remove bullet points */
            padding: 0;
            margin: 0;
            display: flex; /* Use flexbox for horizontal layout */
            justify-content: center; /* Center the items horizontally */
            flex-wrap: wrap; /* Allow items to wrap on smaller screens */
        }

        .navbar-item {
            margin: 0 15px; /* Spacing between nav items */
        }

        .navbar-link {
            display: block; /* Make the whole link clickable */
            padding: 8px 15px;
            text-decoration: none; /* Remove underline */
            color: #ffffff; /* White text for links */
            font-weight: 600; /* Semi-bold font */
            font-size: 1.1em;
            transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
            border-radius: 5px; /* Slightly rounded corners for links */
        }

        .navbar-link:hover,
        .navbar-link:focus {
            background-color: #5c6bc0; /* Lighter blue on hover/focus */
            color: #f0f0f0; /* Slightly off-white */
            transform: translateY(-2px); /* Slight lift effect */
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }

        /* Responsive adjustments for navigation bar */
        @media (max-width: 768px) {
            .navbar-item {
                margin: 0 10px; /* Adjust spacing for tablets */
            }
            .navbar-link {
                font-size: 1em;
                padding: 7px 12px;
            }
        }

        @media (max-width: 480px) {
            .navbar-list {
                flex-direction:  row; /* Stack items vertically on mobile */
                align-items: center; /* Center items when stacked */
            }
            .navbar-item {
                margin: 5px 0; /* Vertical spacing for stacked items */
                width: 80%; /* Make items wider for easier tapping */
            }
            .navbar-link {
                font-size: 0.95em;
                padding: 10px 0; /* Full width padding */
                text-align: center;
            }
        }

        .contents-box-container {
            background-color: #e0e6ec; /* A slightly darker light grey for distinction */
            width: 100%;
            max-width: 900px; /* Same max-width as paragraphs and headings */
            margin: 30px auto; /* Centered with vertical spacing */
            padding: 25px 20px; /* Padding inside the box */
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Consistent shadow */
            border-radius: 8px; /* Consistent rounded corners */
            box-sizing: border-box;
            text-align: center; /* Align text left within the box */
        }

        .contents-box-title {
            font-family: 'Inter', sans-serif;
            font-size: 1.6em;
            font-weight: 700; /* Bold title */
            color: #2c3e50; /* Dark color for title */
            margin-top: 0;
            margin-bottom: 15px;
            text-align: center; /* Center the title within the box */
        }

        .contents-list {
            list-style: none; /* Remove default bullet points */
            font-size: 1.4em;
            padding: 0;
            margin: 0;
            text-align: center;
            
        }

        .contents-list-item {
            margin-bottom: 8px; /* Space between list items */
        }

        .contents-link {
            display: block; /* Make the whole area clickable */
            font-family: 'Inter', sans-serif;
            font-size: 1.05em;
            color: #3f51b5; /* Blue for links, consistent with nav bar */
            text-decoration: none; /* Remove underline */
            padding: 8px 10px;
            border-radius: 5px;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .contents-link:hover,
        .contents-link:focus {
            background-color: #d0d6dd; /* Light grey background on hover */
            color: #2c3e50; /* Darker text on hover */
        }

        /* Responsive adjustments for contents box */
        @media (max-width: 768px) {
            .contents-box-container {
                max-width: 95%;
                padding: 20px 15px;
            }
            .contents-box-title {
                font-size: 1.4em;
            }
            .contents-link {
                font-size: 1em;
                padding: 7px 8px;
            }
        }

        @media (max-width: 480px) {
            .contents-box-container {
                max-width: 95%;
                padding: 15px 10px;
            }
            .contents-box-title {
                font-size: 1.2em;
            }
            .contents-link {
                font-size: 0.95em;
                padding: 6px 8px;
            }
        }

        .navbar-container {
            background-color: #ffffff; /* Clean white background */
            width: 100%;
            padding: 12px 0; /* Slightly less padding than previous nav */
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* More prominent, soft shadow */
            text-align: center;
            border-radius: 8px; /* Consistent rounded corners */
            margin-bottom: 30px; /* Space below the nav bar */
            border-top: 1px solid #e0e0e0; /* Subtle top border */
            border-bottom: 1px solid #e0e0e0; /* Subtle bottom border */

            /* Removed flex properties from navbar-container itself */
            /* It will now act as a block container for its centered content-wrapper */
        }

        .navbar-content-wrapper {
            display: flex; /* Make it a flex container */
            justify-content: space-between; /* Pushes nav list and search to ends */
            align-items: center;
            width: 100%;
            max-width: 1200px; /* Max width for the content inside the nav bar */
            padding: 0 20px; /* Horizontal padding for content */
            box-sizing: border-box; /* Include padding in width */
            margin: 0 auto; /* Center the wrapper itself within navbar-container */
            flex-wrap: wrap; /* Allow items to wrap to next line if not enough space */
        }

        .navbar-list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            justify-content: flex-start; /* Align links to the start */
            flex-wrap: wrap;
            gap: 25px; /* Space between items using gap for better control */
        }

        .navbar-item {
            /* No margin needed here due to gap on list */
        }

        .navbar-link {
            display: block;
            padding: 10px 20px; /* Generous padding for clickable area */
            text-decoration: none;
            color: #34495e; /* Darker text for better contrast on white */
            font-weight: 600;
            font-size: 1.05em; /* Slightly smaller for sleekness */
            transition: all 0.3s ease; /* Smooth transition for all properties */
            border-radius: 6px; /* Rounded corners for links */
            position: relative; /* For the underline effect */
            overflow: hidden; /* Hide overflow for animation */
        }

        /* Underline effect on hover */
        .navbar-link::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 3px; /* Thickness of the underline */
            background-color: #3f51b5; /* Blue color for the underline */
            transform: translateX(-100%); /* Start off-screen to the left */
            transition: transform 0.3s ease-out; /* Slide in effect */
        }

        .navbar-link:hover::after,
        .navbar-link:focus::after {
            transform: translateX(0); /* Slide in to full width */
        }

        .navbar-link:hover {
            color: #3f51b5; /* Change text color on hover */
            background-color: #f8f8f8; /* Very subtle background change */
        }

        /* Search Bar Styles */
        .navbar-search-form {
            display: flex;
            align-items: center;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            overflow: hidden; /* Ensures rounded corners apply to input/button */
            background-color: #f8f8f8;
            /* Added flex-shrink to prevent it from shrinking too much if space is tight */
            flex-shrink: 0;
        }

        .navbar-search-input {
            border: none;
            padding: 8px 12px;
            font-size: 0.95em;
            outline: none; /* Remove default focus outline */
            flex-grow: 1; /* Allows input to take available space */
            background-color: transparent; /* Match parent background */
            color: #34495e;
            min-width: 100px; /* Ensure input doesn't get too small */
            width: 150px; /* Default width, will grow/shrink with flex-grow */
        }

        .navbar-search-input::placeholder {
            color: #95a5a6;
        }

        .navbar-search-button {
            background-color: #3f51b5;
            color: #ffffff;
            border: none;
            padding: 8px 15px;
            cursor: pointer;
            font-size: 0.95em;
            font-weight: 600;
            transition: background-color 0.3s ease;
        }

        .navbar-search-button:hover {
            background-color: #5c6bc0;
        }

        /* Highlight style for search results */
        .search-highlight {
            background-color: #ffeb3b; /* Bright yellow for highlighting */
            padding: 2px 0;
            border-radius: 3px;
        }

        /* Responsive adjustments for navigation bar */
        /* On larger screens, navbar-content-wrapper handles the row layout */
        /* Removed the @media (min-width: 769px) for .navbar-container as it's no longer needed for flex direction */

        @media (max-width: 768px) {
            .navbar-content-wrapper {
                flex-direction: column; /* Stack nav list and search vertically */
                gap: 15px; /* Space between stacked elements */
            }
            .navbar-list {
                gap: 15px; /* Adjust spacing for tablets */
                justify-content: center; /* Center links when stacked */
                width: 100%; /* Full width for stacked links */
            }
            .navbar-link {
                font-size: 1em;
                padding: 8px 15px;
            }
            .navbar-search-form {
                width: 90%; /* Make search bar wider on tablets */
            }
            .navbar-search-input {
                width: auto; /* Allow input to fill available available space */
            }
        }

        /* Container for the main content */
        .button-container {
            background-color: #ffffff; /* Slightly darker blue-grey than the title background */
            width: 80%;
            max-width: 900px; /* Example: Set a maximum width for the box */
            margin: 35px auto 25px auto; /* Center the container horizontally, and add vertical margins */
            padding: 25px 0; /* Increased vertical padding to give space around the inner box */
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15); /* Subtle shadow */
            text-align: center; /* Center the inner box */
            border-radius: 8px; /* Consistent rounded corners for the outer container */
            margin-top: 10px; /* Space above the heading container */
            margin-bottom: 0px; /* Space below the heading container */
            box-sizing: border-box; /* Include padding in the width calculation */
        }

        /* Grid container for the buttons */
        .button-grid {
            display: grid;
            /* Default to 1 column on small screens */
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjusted minmax for smaller buttons */
            gap: 10px; /* Reduced gap */
        }

        /* Media queries for responsive columns */
        @media (min-width: 600px) {
            .button-grid {
                /* 2 columns on medium screens */
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 480px) {
            .button-grid {
                /* 3 columns on large screens */
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* Styling for the buttons */
        .button-grid button {
            width: 80%; /* Ensure buttons fill their grid cell */
            padding: 8px 15px; /* Reduced padding for smaller buttons */
            background-color: #007bff; /* Blue background */
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9em; /* Reduced font size */
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .button-grid button:hover {
            background-color: #0056b3; /* Darker blue on hover */
            transform: translateY(-2px); /* Slight lift effect */
        }

        /* Different colors for variety (optional) */
        .button-grid a:nth-child(1) button { background-color: #007bff; } /* Blue */
        .button-grid a:nth-child(2) button { background-color: #28a745; } /* Green */
        .button-grid a:nth-child(3) button { background-color: #ffc107; color: #333; } /* Yellow */
        .button-grid a:nth-child(4) button { background-color: #dc3545; } /* Red */
        .button-grid a:nth-child(5) button { background-color: #6c757d; } /* Gray */
        .button-grid a:nth-child(6) button { background-color: #17a2b8; } /* Cyan */
        
        /* Main quiz container styling */
        .quiz-container {
            background-color: #ffffff;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            max-width: 600px;
            width: 100%;
            text-align: center;
            border: 1px solid #e2e8f0; /* Subtle border */
            margin: 0 auto;
            margin-top: 10px;
        }

        /* Question text styling */
        .question {
            font-size: 1.6rem;
            font-weight: 600;
            color: #2d3748; /* Dark gray text */
            margin-bottom: 25px;
            line-height: 1.4;
        }

        /* Answer buttons container */
        .answer-buttons {
            display: grid;
            grid-template-columns: 1fr; /* Single column by default */
            gap: 15px;
            margin-bottom: 25px;
        }

        /* Responsive grid for answer buttons */
        @media (min-width: 500px) {
            .answer-buttons {
                grid-template-columns: repeat(2, 1fr); /* Two columns on wider screens */
            }
        }

        /* Individual answer button styling */
        .btn-answer {
            background-color: #4299e1; /* Blue button */
            color: white;
            padding: 12px 20px;
            border: none;
            border-radius: 8px;
            font-size: 1.1rem;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            outline: none; /* Remove default focus outline */
        }

        .btn-answer:hover {
            background-color: #3182ce; /* Darker blue on hover */
            transform: translateY(-2px); /* Slight lift effect */
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
        }

        .btn-answer:active {
            transform: translateY(0); /* Press down effect */
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        /* Styling for correct/incorrect answers */
        .btn-answer.correct {
            background-color: #48bb78; /* Green for correct */
        }

        .btn-answer.incorrect {
            background-color: #ef4444; /* Red for incorrect */
        }

        /* Next button styling */
        .next-btn {
            background-color: #f6ad55; /* Orange button */
            color: white;
            padding: 12px 25px;
            border: none;
            border-radius: 8px;
            font-size: 1.2rem;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            margin-top: 20px;
            display: none; /* Hidden by default */
            outline: none;
        }

        .next-btn:hover {
            background-color: #ed8936; /* Darker orange on hover */
            transform: translateY(-2px);
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
        }

        .next-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        /* Score display styling */
        .score-display {
            font-size: 1.8rem;
            font-weight: 700;
            color: #2d3748;
            margin-top: 30px;
            margin-bottom: 20px;
        }

        /* Restart button styling (similar to next button) */
        .restart-btn {
            background-color: #63b3ed; /* Light blue */
            color: white;
            padding: 12px 25px;
            border: none;
            border-radius: 8px;
            font-size: 1.2rem;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            margin-top: 20px;
            display: none; /* Hidden by default */
            outline: none;
        }

        .restart-btn:hover {
            background-color: #4299e1;
            transform: translateY(-2px);
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
        }

        .restart-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        /* Feedback message styling */
        .feedback {
            font-size: 1.1rem;
            margin-top: 15px;
            font-weight: 500;
        }
        .feedback.correct-text {
            color: #2f855a; /* Darker green */
        }
        .feedback.incorrect-text {
            color: #c53030; /* Darker red */
        }
