/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: url('../images/background.jpg') no-repeat center center fixed; /* Background image */
    background-size: cover; /* Make sure the background image covers the entire area */
    color: #495057; /* Darker text color for readability */
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.85); /* Semi-transparent background for better text visibility */
    padding: 25px;
    border: 2px solid #007bff; /* Primary color for border */
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.container:hover {
    transform: translateY(-5px); /* Subtle lift effect on hover */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

h1, h2 {
    color: #007bff; /* Primary color for headings */
    text-align: center;
    margin-bottom: 20px; /* Increased space below headings */
}

p {
    color: #6c757d; /* Muted text color */
    text-align: center;
    font-size: 1.1em; /* Slightly larger font for readability */
}

/* Input Field Styles */
input[type="text"], input[type="password"], textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 8px 0;
    box-sizing: border-box;
    transition: border 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
    border-color: #007bff; /* Change border color on focus */
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5); /* Add a subtle glow effect */
    outline: none;
}

input[type="text"]:hover, input[type="password"]:hover, textarea:hover {
    border-color: #0056b3; /* Darker border color on hover */
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 8px; /* Rounded corners for tables */
    overflow: hidden; /* Ensures rounded corners are respected */
    background-color: #ffffff;
}

th, td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #007bff; /* Header background color */
    color: white;
    font-weight: bold; /* Bold header text */
}

td {
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent cells */
}

/* Button Styles */
.button {
    display: inline-block;
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2); /* Subtle button shadow */
}

.button:hover {
    background-color: #0056b3; /* Darker shade on hover */
    transform: translateY(-2px); /* Slight lift effect on hover */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

/* Error Styles */
.error {
    border: 1px solid #dc3545;
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px; /* Space between error messages */
    animation: fadeIn 0.5s; /* Fade in effect for errors */
}

/* Timer Display */
#timerDisplay {
    font-weight: bold;
    font-size: 1.5em;
    margin-top: 10px;
    color: #dc3545; /* Danger color */
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1, h2 {
        font-size: 1.8em; /* Responsive font size */
    }

    .button {
        width: 100%;
        padding: 14px;
        font-size: 18px; /* Larger buttons on mobile */
    }
}

/* Quiz Question Styles */
.question {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9); /* Slight transparency */
    transition: box-shadow 0.3s, background-color 0.3s;
}

.question:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Hover effect for questions */
    background-color: rgba(245, 245, 245, 0.9); /* Slight color change on hover */
}

.question label {
    display: block;
    margin: 5px 0;
}

/* Success Message */
.success {
    color: #28a745; /* Success color */
    font-weight: bold;
    text-align: center;
    margin: 15px 0; /* Space around success messages */
}

/* Additional Elements */
hr {
    border: 1px solid #e9ecef; /* Subtle horizontal line */
    margin: 20px 0; /* Space around horizontal lines */
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #6c757d; /* Muted footer text color */
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #007bff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto; /* Center spinner */
}

/* Keyframes for animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
