body {
    font-family: sans-serif;
    background-color: #e6f3fb;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.assignment-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 800px;
    width: 100%;
}

h1 {
    text-align: center;
    font-weight: bold;
    color: black;
    margin-bottom: 30px;
}

h2 {
    font-weight: bold;
    color: black;
    background-color: #c7e6fd;
    padding: 10px 15px;
    margin-top: 25px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: left;
}

.question h3 {
    font-weight: bold;
    color: black;
    background-color: white;
    padding: 8px 0;
    margin-top: 20px;
    margin-bottom: 15px;
    border-bottom: none;
    text-align: left;
}

.overview-info {
    margin-bottom: 30px;
}

.overview-details {
    background-color: #fff;
    padding: 20px;
    /* border-radius: 8px; */
    /* box-shadow: 0 1px 3px rgba(0,0,0,0.1); */
}

.overview-details p {
    margin: 10px 0;
    font-size: 1.1em;
    color: #1a1a1a;
}

.student-info {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-info label {
    font-size: 1.1em;
    color: #1a1a1a;
}

.student-info input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    font-size: 1em;
    border: 1px solid #6fbbed;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.student-info input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.overview-info p,
.task-section p,
.question p {
    margin-bottom: 10px;
    color: #333;
    line-height: 1.8;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding: 5px;
    border-radius: 6px;
}

.btn-group button {
    padding: 10px 15px;
    font-size: 0.95em;
    cursor: pointer;
    border: 1px solid #87cefa;
    background-color: #edf7fe;
    color: #333;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-group button:hover {
    background-color: #c7e6fd;
}

.btn-group button.active {
    background-color: #b3defc;
    font-weight: bold;
    border-color: #6fbbed;
}

.fill-blank-input {
    padding: 8px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.fill-blank-input.correct {
    border-color: #28a745 !important;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.fill-blank-input.incorrect {
    border-color: #f87171 !important;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}

.short-answer-textarea {
    width: 95%;
    min-height: 80px;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 5px;
    resize: vertical;
    line-height: 1.5;
}

.correct button.active {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white;
}

.incorrect button.active {
    background-color: #f87171 !important;
    border-color: #ef4444 !important;
    color: white;
}

#check-button, #view-solutions-button {
    display: block;
    width: 200px;
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    margin: 30px auto 10px auto;
    transition: background-color 0.2s ease;
}

#solutions-sidebar {
    display: none;
    width: 800px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 600px;
    overflow-y: auto;
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    border-left: 1px solid #87cefa;
}

#solutions-sidebar h2 {
    background-color: #c7e6fd;
    margin-top: 0;
    color: black;
    text-align: left;
    padding: 10px 15px;
    border-radius: 4px;
}

#solutions-sidebar h3 {
    color: black;
    margin-top: 15px;
    font-weight: bold;
    text-align: left;
    background-color: transparent;
    border-bottom: 1px solid #eee;
    padding-left: 0;
}

#solutions-sidebar p,
#solutions-sidebar li {
    font-size: 0.9em;
    line-height: 1.8;
    margin-bottom: 10px;
}

.solution-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
}

.solution-item h3 {
    color: black;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

.answer {
    color: #28a745;
    margin: 10px 0;
    font-weight: bold;
}

.explanation {
    color: black;
    margin: 10px 0;
    line-height: 1.5;
}

/* Task styling */
.task-title {
    background-color: #c7e6fd;
    color: black;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Question styling */
.question {
    margin-bottom: 20px;
}

.question h3 {
    color: black;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Criteria table styling */
.criteria-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.85em;
    line-height: 1.4;
}

.criteria-table th,
.criteria-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid #e5e7eb;
}

.criteria-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.sub-questions {
    margin-top: 15px;
}

.sub-question {
    margin-bottom: 25px;
}

.sub-question:last-child {
    margin-bottom: 0;
}

.sub-question h4 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: normal;
}

.sub-question .btn-group {
    margin-top: 10px;
}

.sub-question-score {
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
}

.rubric-note {
    font-style: italic;
    color: #666;
    margin-left: 8px;
    display: inline-block;
}

.question-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #1a1a1a;
    margin: 15px 0;
    padding: 10px;
}

.sub-question-text {
    font-size: 1.05em;
    line-height: 1.5;
    color: #1a1a1a;
    margin: 12px 0;
    padding: 8px;
}

#total-score {
    text-align: center;
    font-size: 1.4em;
    font-weight: bold;
    margin-top: 20px;
    color: #0056b3;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Solution styles */
.sub-questions-solutions {
    margin-left: 20px;
    margin-top: 10px;
}

.sub-question-solution {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
}

.sub-question-solution h4 {
    margin: 0 0 10px 0;
    color: black;
}

.solution-explanation {
    margin-top: 8px;
    padding: 8px;
    background-color: #fff;
    border-radius: 4px;
}

.solution-explanation p {
    margin: 5px 0;
}

/* Error message styles */
.error-message {
    background-color: #f8d7da;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 1em;
    line-height: 1.5;
}

.error-message::before {
    content: '⚠️ ';
    margin-right: 8px;
}

/* Solution section styles */
.solution-section-title {
    background-color: #c7e6fd;
    padding: 10px;
    margin: 20px 0 10px 0;
}

/* Rubric table styles */
.rubric-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 20px 0;
}

.rubric-table thead {
    background-color: #f5f5f5;
}

.rubric-table th {
    padding: 10px;
    border: 1px solid #e5e7eb;
}

.rubric-table th.points {
    text-align: center;
}

.rubric-table th.criteria {
    text-align: left;
}

.rubric-table td {
    padding: 8px;
    border: 1px solid #e5e7eb;
}

.rubric-table td.points {
    text-align: center;
    width: 80px;
}

.rubric-table tr.total-row {
    background-color: #f5f5f5;
    font-weight: bold;
}

.assignment-selector {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #c7e6fd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.assignment-selector label {
    font-weight: bold;
    color: #1a1a1a;
    font-size: 1.1em;
}

.assignment-selector select {
    padding: 8px 12px;
    font-size: 1em;
    border: 1px solid #6fbbed;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    flex: 1;
    transition: border-color 0.3s ease;
}

.assignment-selector select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.mathquill-editable.correct {
    border-color: #28a745 !important;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.mathquill-editable.incorrect {
    border-color: #f87171 !important;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}

.math-symbol-panel {
    background: #c7e6fd;
    border: 1px solid #87cefa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(111, 187, 237, 0.10);
    padding: 12px 16px 16px 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(48px, auto));
    gap: 10px;
    min-width: 260px;
    z-index: 1000;
    margin-top: 8px;
}

.math-symbol-panel button {
    background-color: #edf7fe;
    border: 1px solid #87cefa;
    border-radius: 6px;
    color: #333;
    font-size: 1em;
    padding: 7px 0;
    margin: 0;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(111, 187, 237, 0.05);
    position: relative;
    min-width: 48px;
    width: auto;
    text-align: center;
}

.math-symbol-panel button:hover {
    background-color: #c7e6fd;
    box-shadow: 0 2px 6px rgba(111, 187, 237, 0.15);
}

.math-symbol-panel button[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    top: 110%;
    transform: translateX(-50%);
    background: #f8f9fa;
    color: #0056b3;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(111, 187, 237, 0.10);
    z-index: 2000;
}

.math-symbol-panel .close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    color: #0056b3;
    font-size: 1.1em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
} 

.quiz-section {
    display: none;
}
.quiz-section.active {
    display: block;
}
.quiz-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
}
#progress-indicator {
    font-weight: bold;
    color: #0056b3;
    font-size: 1.1em;
    margin: 0 12px;
}
#prev-btn, #next-btn {
    padding: 10px 24px;
    font-size: 1em;
    border-radius: 6px;
    border: 1px solid #87cefa;
    background: #edf7fe;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}
#prev-btn:disabled, #next-btn:disabled {
    background: #eee;
    color: #aaa;
    cursor: not-allowed;
}
#prev-btn:hover:not(:disabled), #next-btn:hover:not(:disabled) {
    background: #c7e6fd;
} 

.overview-section {
    margin-bottom: 32px;
}
.overview-section.quiz-section {
    display: none;
}
.overview-section.quiz-section.active {
    display: block;
} 

.clear-board-btn, .eraser-btn {
    padding: 6px 14px;
    font-size: 0.95em;
    border-radius: 6px;
    border: 1px solid #87cefa;
    background: #edf7fe;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-right: 4px;
}
.clear-board-btn:hover:not(:disabled), .eraser-btn:hover:not(:disabled) {
    background: #c7e6fd;
}
.eraser-btn.active {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
}
.clear-board-btn:disabled, .eraser-btn:disabled {
    background: #eee;
    color: #aaa;
    cursor: not-allowed;
} 