/* Reset & Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');
/* @media print {
    @import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

    .certificate-name {
        font-family: 'Great Vibes', cursive !important;
        font-size: 50px;
    }
} */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Full Page Layout */
body {
    background-color: #f8f9fa; /* Light grey for better contrast */
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
}

/* Header (Navigation Bar) */
header {
    width: 100%;
    background-color: #0073e6;
    color: white;
    padding: 15px 0;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* Main Layout */
#main-container {
    display: flex;
    max-width: 1100px;
    width: 100%;
    justify-content: space-between;
    margin-top: 100px; /* Space below navbar */
    padding: 20px;
}


/* Quiz Container (Centered) */
#quiz-container {
    flex: 2;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    margin-right: 2%;
}

/* Sidebar (Fixed to the Right) */
#sidebar {
    width: 250px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
    align-self: flex-start;
}
#sidebar p ,h3{
    margin: 12px;
}
#download-certificate-btn{
    margin: 0 25%;
}

.certificate-name {
      font-family: 'Good Vibes', cursive;
      font-size: 30px;
      text-align: center;
      color: #000;
}
#retry-btn{
    color: #fff;
    background-color: #28a745;
}
/* Progress Bar */
#progress-bar-container {
    width: 100%;
    height: 5px;
    background-color: #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: #ff9900;
    transition: width 0.5s ease-in-out;
}

/* Question Section */
#question-text {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: left;
}

/* Answer Options */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    text-align: left;
    transition: 0.3s;
}

.answer-option:hover {
    background-color: #ffebcc;
}

.answer-option.selected {
    background-color: #ff9900;
    color: white;
    border: none;
}
.selected-option {
    background-color: #ff9900 !important; /* Highlight color */
    color: white !important;
    font-weight: bold;
    /* border: 2px solid #e68a00; */
}
/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

button {
    padding: 15px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    width: 48%;
   
}

/* Fixing Button Alignment */
#prev-btn {
    background-color: #ddd;
    color: black;
}

#prev-btn:hover {
    background-color: #bbb;
}

#next-btn {
    background-color: #ff9900;
    color: white;
}

#next-btn:hover {
    background-color: #e68a00;
}

#submit-btn {
    background-color: #28a745;
    color: white;
    width: 100%;
    margin-top: 20px;
}

#submit-btn:hover {
    background-color: #218838;
}

/* Timer */
#timer {
    font-size: 18px;
    font-weight: bold;
    color: #d9534f;
    margin-top: 10px;
}

/* Results Section */
#result-section {
    display: none;
    text-align: center;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    width: 80%;
    margin: 20px auto;
}

/* Score & Percentage */
#score, #final-percentage, #result-status {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Explanation Button */
#show-explanation-btn {
    background-color: #0073e6;
    color: white;
    border: none;
    padding: 15px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    margin-top: 15px;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
    width: 48%;
}

#show-explanation-btn:hover {
    background-color: #005bb5;
}

/* Explanation List */
#answer-list {
    display: none;
    list-style: none;
    padding: 0;
    text-align: left;
    margin-top: 20px;
}

/* Individual Question Container */
.explanation-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

/* Question Styling */
.explanation-item strong {
    font-size: 18px;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

/* Correct Answer Styling */
.correct-answer {
    font-size: 16px;
    color: #28a745;
    font-weight: bold;
}

/* Explanation Text */
.explanation-text {
    font-size: 15px;
    color: #555;
    margin-top: 5px;
}

/* Footer */

footer {
    width: 100%;
    background-color: #0073e6;
    color: white;
    text-align: center;
    padding: 15px 0;
    position: relative;
    bottom: 0;
    margin-top: 20px;
}

/* Responsive Design */

@media (max-width: 1024px) {
    #main-container {
        flex-direction: column;
        align-items: center;
    }

    #sidebar {
        width: 100%;
        text-align: center;
        margin-top: 20px;
        order: 2; /* Moves sidebar below the quiz */
    }

    #quiz-container {
        width: 90%;
    }
}

@media (max-width: 768px) {
    #quiz-container {
        width: 95%;
        padding: 20px;
    }

    #question-text {
        font-size: 18px;
    }

    .answer-option {
        font-size: 16px;
        padding: 10px;
    }

    button {
        font-size: 14px;
        padding: 10px;
    }

    #sidebar {
        width: 100%;
        text-align: center;
    }
    #show-explanation-btn{
        font-size: 14px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    #quiz-container {
        width: 100%;
        padding: 15px;
    }

    #question-text {
        font-size: 16px;
    }

    .answer-option {
        font-size: 14px;
        padding: 8px;
    }

    button {
        font-size: 12px;
        padding: 8px;
    }
    #show-explanation-btn{
        font-size: 12px;
        padding: 8px;
    }

    header, footer {
        font-size: 14px;
        padding: 10px;
    }
}
