.exam-container {
    max-width: 950px;
    margin: 150px auto 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.top-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f2f3f7;
    border-radius: 5px;
}

.top-controls > div {
    flex: 1;
    min-width: 200px;
}

.top-controls label {
    font-weight: 500;
    color: #222222;
    margin-bottom: 8px;
}

.top-controls select, .top-controls button {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    font-size: 14px;
}

.top-controls button {
    background: -webkit-linear-gradient(90deg, #7c32ff 0%, #c738d8 100%);
    color: white;
    cursor: pointer;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.top-controls button:hover {
    opacity: 0.85;
    box-shadow: 0px 5px 15px rgba(124, 50, 255, 0.3);
}

.top-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.question-box {
    border: 1px solid #eee;
    border-radius: 8px;
    min-height: 300px;
    padding: 30px;
    margin: 20px auto;
    text-align: left;
    background-color: #fff;
    color: #222222;
}

.question-container {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.question-container:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.question-container p {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 15px;
}

.options label {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.options label:hover {
    background-color: #f9f9ff;
}

.options .correct {
    background-color: #d4edda;
    color: #155724;
    font-weight: 500;
}

.options .incorrect {
    background-color: #f8d7da;
    color: #721c24;
    text-decoration: line-through;
}

.submit-container {
    display: block;
    margin: 20px auto 0 auto;
    text-align: center;
}

.submit-btn {
    width: auto;
    padding: 12px 40px;
}

#score-display {
    margin-left: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #222222;
}

/* Modal Styling */
#scoreModal .modal-content {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,.3);
}
#scoreModal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}
#scoreModal .modal-body h3 {
    font-size: 2.5em;
    color: #7c32ff;
}

/* Star Rating */
.star-rating {
    display: flex;
    font-size: 2em; /* Increase overall size of stars */
    color: #ccc; /* Default color for unrated stars */
    cursor: pointer;
}

.star-rating .star {
    padding: 0 5px; /* Spacing between stars */
    transition: color 0.2s ease-in-out;
}

.star-rating .star i {
    pointer-events: none; /* Allows click to pass through to the span */
}

.star-rating .star.rated {
    color: #ffc107; /* Gold color for rated stars */
}
@media (max-width: 768px) {
    .top-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .exam-container {
        margin-top: 100px;
        padding: 15px;
    }
}