/* Use Tailwind CSS reset for better consistency */
/* You would typically include this via a build process or CDN */
/* For this example, we include basic resets */
body {
    margin: 0;
    line-height: 1.5;
    font-family: 'Inter', sans-serif; /* Use Inter font */
    background-color: #ff9800; /* Orange background color */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    color: #333; /* Default text color */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
}

/* Main container to center the mobile screen */
.app-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 40px); /* Adjust for body padding */
}

/* Styling for the mobile screen frame */
.mobile-screen {
    width: 100%;
    max-width: 380px; /* Adjusted max-width */
    height: 85vh; /* Fixed height for vertical look */
    background-color: #ffffff; /* White background for the screen area */
    border-radius: 30px; /* Rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* Stronger shadow */
    overflow: hidden; /* Hide anything outside the rounded corners */
    display: flex;
    flex-direction: column; /* Stack content vertically */
    position: relative; /* For positioning elements inside */
    border: 2px solid #ddd; /* Subtle inner border */
}

/* Styling for the content area inside the mobile screen */
.quiz-content {
    padding: 25px; /* Padding inside the white screen */
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto; /* Enable scrolling for content overflow */
    flex-grow: 1; /* Allow content to fill available height */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Space between major sections */
}

.logo {
    max-width: 90px; /* Logo size */
    height: auto;
    display: block;
    margin: 0 auto 10px auto; /* Center logo and add space below */
}

h1 {
    font-size: 1.6em; /* Adjusted title size */
    margin-bottom: 15px;
    color: #333;
}

#language-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

#language-toggle button {
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #eee;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    flex-grow: 1; /* Allow buttons to grow */
    max-width: 120px; /* Limit button width */
}

#language-toggle button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

#language-toggle button:hover:not(.active) {
    background-color: #ddd;
}

/* Student Info Area Styling */
#student-info-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

#student-info-area input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    width: 80%; /* Adjust input width */
    max-width: 250px; /* Max width for inputs */
    box-sizing: border-box;
}

#student-info-area button {
    padding: 12px 25px;
    background-color: #28a745; /* Green color for start button */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#student-info-area button:hover:not(:disabled) {
    background-color: #218838;
}

#student-info-area button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.error-message {
    color: #dc3545; /* Red color for errors */
    font-size: 0.9em;
    margin-top: 5px;
}


#quiz-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Space between elements in quiz area */
}

#timer-area {
    font-size: 1.1em;
    color: #dc3545; /* Red color for timer */
    font-weight: bold;
    margin-bottom: 10px;
}

#quiz-student-info {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
}


#question-counter {
    font-size: 1em;
    color: #555;
}

#question-text {
    font-size: 1.2em;
    color: #333;
    min-height: 50px;
    text-align: center;
    width: 100%;
}

#options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.option-button {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: left;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.option-button:hover {
    background-color: #e9e9e9;
    border-color: #bbb;
}

.option-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.option-button.correct {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-weight: bold;
}

.option-button.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Styling for the NEXT button */
.next-button {
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-weight: bold;
}

.next-button:hover:not(:disabled) {
    background-color: #0056b3;
}

#next-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}


.hidden {
    display: none;
}

#results-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Styling for the "Quiz Done!" heading */
.quiz-done-heading {
    color: #28a745; /* Green color */
    font-size: 2.5em; /* Larger font size */
    margin-bottom: 10px;
}

/* Styling for the paragraph "You will get your score..." */
.score-info-text {
    font-size: 1.2em; /* Slightly larger font size */
    color: #333;
    margin: 0;
}

#results-area p {
    font-size: 1.1em;
    color: #333;
    margin: 0;
}

/* Styling for the final score value */
#results-area .final-score {
    font-weight: bold;
    color: #007bff;
    font-size: 1.8em; /* Much larger font size for the score */
}


#submission-status-message {
    margin-top: 15px;
    font-weight: bold;
    color: #007bff;
}

#submission-status-message.success {
    color: #28a745;
}

#submission-status-message.error {
    color: #dc3545;
}


/* Responsive adjustments */
@media (max-width: 450px) {
    body {
        padding: 10px;
    }

    .mobile-screen {
        max-width: 98%;
        height: 90vh;
        border-width: 5px;
        border-radius: 25px;
    }

    .quiz-content {
        padding: 15px;
        gap: 10px;
    }

    .logo {
        max-width: 70px;
    }

    h1 {
        font-size: 1.4em;
    }

     #student-info-area input[type="text"] {
        width: 90%;
    }

    #quiz-student-info {
        font-size: 0.8em;
    }

    #question-text {
        font-size: 1em;
        min-height: 40px;
    }

    #options-container {
         gap: 8px; /* Reduce gap between options */
    }


    .option-button {
        font-size: 0.9em;
        padding: 10px 12px;
    }

    .next-button {
        font-size: 1em;
        padding: 10px 15px;
        gap: 5px;
    }

    .arrow-icon {
        width: 18px;
        height: 18px;
    }

    .quiz-done-heading {
        font-size: 2em;
    }

    .score-info-text {
        font-size: 1.1em; /* Adjust font size for small screens */
    }


    #results-area p {
        font-size: 1em;
    }

     #results-area .final-score {
        font-size: 1.5em; /* Adjust score font size for small screens */
    }


    #submission-status-message {
        font-size: 0.9em;
    }
}

