body {
    /* Changed from muted yellow-green-brown to a soft, light blue-grey */
    background-color: #f0f4f8;
    /* Light blue-grey, very subtle and clean */
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Modern, readable font */
    color: #333;
    /* Good default text color */
}

header.sticky {
    position: sticky;
    top: 0;
    /* Changed from muted yellow-green-brown to a slightly deeper, cool tone */
    background-color: #e0e7ed;
    /* Light, calming blue-grey for header */
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Added subtle shadow for depth */
}

.topnav {
    overflow: hidden;
    /* Changed from dark grey to a dark navy/charcoal for professionalism */
    background-color: #2c3e50;
    /* Deep blue-grey, professional and calming */
}

.topnav a {
    float: left;
    display: block;
    color: #ecf0f1;
    /* Lighter text for better contrast on dark nav */
    text-align: center;
    padding: 5px 19px;
    /* Increased padding for better click/tap area */
    text-decoration: none;
    font-size: 16px;
    /* Slightly larger for readability */
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Smooth hover transitions */
    box-sizing: border-box;
    /* Crucial for consistent sizing */
}

.topnav a:hover {
    background-color: #34495e;
    /* Slightly lighter shade on hover for visual feedback */
    color: #ffffff;
    /* White text on hover */
}

.topnav a.active {
    /* Kept green as it's a good accent, but used a slightly more vibrant shade */
    background-color: #27ae60;
    /* Vibrant green for active state */
    color: white;
}

.topnav .icon {
    display: none;
}

@media screen and (max-width: 600px) {
    .topnav a:not(:first-child) {
        display: none;
    }

    .topnav a.icon {
        float: right;
        display: block;
        padding: 5px 18px;
        /* Consistent padding with other links */
        text-align: right;
        /* Ensure "MENU" text aligns right */
        color: #ffffff;
        /* Ensure icon text color is visible */
    }

    /* Style for the pseudo-element (the hamburger icon) */
    .topnav a.icon::before {
        content: "\2630";
        margin-left: 8px;
        /* Increased space slightly */
        font-size: large;
        /* Slightly larger icon          vertical-align:top; */

        line-height: 0;
    }

    .topnav.responsive {
        position: relative;
    }

    .topnav.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
        width: auto;
        text-align: right;
    }

    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    /* Ensure pseudo-element styles are maintained in responsive state */
    .topnav.responsive .icon::before {
        content: "\2630";
        margin-left: 0px;
        font-size: 1.3em;
        vertical-align: middle;
        line-height: 0;
    }

    /*---design for mock test if screen is less then 600----- */

}

#heD {
    margin: 0;
    /* Changed from strong blue to a slightly softer, yet distinct blue */
    color: #2980b9;
    /* A professional blue */
    font-size: 24px;
    /* Slightly larger heading for prominence */
    /* Kept background color consistent with header */
    background-color: #e0e7ed;
    font-family: 'Brush Script MT', cursive;
    text-shadow: 2px 2px 3px #1abc9c;
    /* Subtle shadow for depth, changed color */
    display: inline-block;
    vertical-align: middle;
}

.h1login {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 9px;
    /* Increased padding for more breathing room */
}

.welcome-message {
    /* Changed from #555 to a slightly darker, more prominent grey */
    color: #666;
    font-size: 17px;
    /* Slightly larger */
    margin-left: 15px;
    /* More space */
    font-weight: bold;
    flex-grow: 1;
}

.login-link {
    text-decoration: none;
    /* Changed from strong blue to a coordinated blue with the heading */
    color: #3498db;
    /* A clear, clickable blue */
    font-weight: bold;
    font-size: 1.1em;
    /* Relative font size */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-left: 15px;
    /* More space between links */
    transition: color 0.3s ease;
    /* Smooth hover transition */
}

.login-link:hover {
    color: #2980b9;
    /* Slightly darker blue on hover */
}

.auth-links {
    display: flex;
    align-items: center;
}

.But1 {
    float: right;
    /* Coordinated with active link green */
    background-color: #2ecc71;
    /* A friendly, inviting green */
    color: white;
    /* Ensure text is white */
    padding: 10px 20px;
    /* Added padding for a button feel */
    border: none;
    /* Remove default border */
    border-radius: 5px;
    /* Slightly rounded corners */
    cursor: pointer;
    /* Indicate it's clickable */
    transition: background-color 0.3s ease;
    /* Smooth transition */
}

.But1:hover {
    background-color: #27ae60;
    /* Darker green on hover */
}

/* ------------------------LOGIN PAGES CSS----------------------*/
/* Assuming But2a is for a button on a different page, adjust its color too */
.But2a {
    float: left;
    /* Changed from strong blue to a more appealing purple/indigo */
    background-color: #8e44ad;
    /* A rich purple/indigo */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.But2a:hover {
    background-color: #9b59b6;
    /* Lighter purple on hover */
}


main {
    clear: both;
    padding: 20px;
    /* Added some padding around the main content */
    max-width: 1200px;
    /* Optional: constrain main content width for better readability */
    margin: 20px auto;
    /* Center main content */
    background-color: #ffffff;
    /* White background for main content sections */
    border-radius: 8px;
    /* Rounded corners for sections */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* Soft shadow for main content */
}

section {
    margin-bottom: 30px;
    /* More space between sections */
    padding: 20px;
    /* Padding within sections */
    border: 1px solid #e0e0e0;
    /* Subtle border for sections */
    border-radius: 6px;
    background-color: #ffffff;
}


/* New style for h2link - making them more distinct */
.h2link {
    margin-top: 0;
    margin-bottom: 15px;
    color: #e74c3c;
    /* A strong, appealing red/orange for titles */
    font-size: 20px;
    /* Slightly larger */
    border-bottom: 2px solid #f1c40f;
    /* Yellow underline for emphasis */
    padding-bottom: 2px;
    /* Space between text and underline */
}

/* Updated iframe styles for consistency */
iframe {
    margin-top: 0px;
    border: 1px solid #dcdcdc;
    /* Lighter border */
    border-radius: 5px;
    margin-bottom: 9px;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/*------------------I FRAME CONTAINER---------------------------*/
/* Make the entire <a> tag block-level and ensure it covers the iframe */

.iframe-link {
    margin-top: 0px;
    display: block;
    width: 100%;
    height: 130px;
    /* Match iframe height */
}

/*------------------mokc list design---------------------------*/
/* Style for the card container */
/* Style for the card container */
/* Style for the card container */
/* Style for the card container */
/* Card container */
.mkxa1 {
    background-color: #f0ec9e;
    border-radius: 10px;
    padding: 10px;
    margin: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    justify-content: space-between; /* Push header to top, buttons to bottom */
    height: 90px; /* Adjust as needed to prevent button overlap and maintain size */
}

/* Hover effect for the cards */
.mkxa1:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* Header styles for each mock test card */
.mkHdr {
    font-size: 16px;
}

.testName {
    font-weight: bold;
    font-size: 18px;
    display: block; /* Make sure the test name is on its own line */
}

.attemptsLabel {
    display: block;
    margin-top: 5px;
    font-weight: 600;
    font-size: 14px;
}

/* Button container to arrange buttons horizontally */
.button-row {
    display: flex; /* Use flexbox for horizontal layout */
    gap: 10px; /* Space between buttons */
    margin-top: 4px; /* Add some space between the text and the buttons */
}

/* Button styling for View Result and Start/Restart */
.bM1, .bM2 {
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    flex-grow: 1; /* Make buttons grow to fill available space */
    text-align: center;
}

/* View Result button style (green background) */
.bM1 {
    background-color: #5fe264; /* Green */
    color: white;
}

/* Start/Restart button style (red background) */
.bM2 {
    background-color: #4c84e4; /* Red */
    color: white;
}

/* Hover effect for all buttons */
.bM1:hover, .bM2:hover {
    opacity: 0.9;
}

/* Styling the 'Start/Restart' button when active (optional) */
.bM1:active, .bM2:active {
    transform: scale(0.87); /* Slight shrink effect on click */
}