body {
  background: linear-gradient(135deg, var(--color-bg) 0%, rgba(10, 96, 255, 0.05) 50%, var(--color-bg) 100%);
  color: var(--text-color);
  scroll-behavior: smooth;
}

/* Smooth scrollbar styling */
.lab-sidebar::-webkit-scrollbar,
.lab-content::-webkit-scrollbar {
  width: 8px;
}

.lab-sidebar::-webkit-scrollbar-track,
.lab-content::-webkit-scrollbar-track {
  background: rgba(10, 96, 255, 0.05);
  border-radius: 4px;
}

.lab-sidebar::-webkit-scrollbar-thumb,
.lab-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-mint));
  border-radius: 4px;
  transition: background 0.3s ease;
}

.lab-sidebar::-webkit-scrollbar-thumb:hover,
.lab-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-mint), var(--brand-blue));
}

.lab-layout {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  margin-top: 60px;
  height: calc(100vh - 60px);
  gap: 0;
}

.lab-sidebar {
  background: var(--color-panel);
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 85vw;
  max-width: 320px;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  height: calc(100vh - 60px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  border-right: none;
}

.lab-sidebar.open {
  transform: translateX(0);
}

.panel-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 2px solid var(--color-border);
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(10, 96, 255, 0.1), rgba(0, 183, 122, 0.1));
  position: relative;
}

.panel-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-mint));
}

.panel-header h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  background-clip: text;
  letter-spacing: 0.5px;
}

[data-theme='light'] .panel-header h4 {
  background: linear-gradient(135deg, #0052cc, #008a5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#chapterList {
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex-grow: 1;
}

.chapter-item {
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.chapter-item:hover {
  background-color: rgba(10, 96, 255, 0.05);
}

.chapter-item.locked {
  opacity: 0.5;
  background-color: rgba(0, 0, 0, 0.02);
}

.chapter-title {
  background-color: transparent;
  border: none;
  border-radius: 0;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  text-align: left;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Lexend', sans-serif;
  transition: all 0.3s ease;
  position: relative;
}

[data-theme='light'] .chapter-title {
  color: #0b1020;
  font-weight: 600;
}

.chapter-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-mint));
  transition: width 0.3s ease;
}

.chapter-title:hover {
  background: linear-gradient(90deg, rgba(10, 96, 255, 0.1), transparent);
  padding-left: 1.5rem;
}

.chapter-title:hover::before {
  width: 4px;
}

.chapter-title.active {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-mint));
  color: white;
  padding-left: 1.5rem;
  box-shadow: 0 4px 12px rgba(10, 96, 255, 0.3);
}

.chapter-title.active::before {
  width: 4px;
  background: rgba(255, 255, 255, 0.3);
}

.chapter-title.active .chevron {
  color: white;
}

.chapter-title .chevron {
  transition: transform 0.3s ease-in-out, color 0.3s ease;
  font-size: 1.1rem;
  color: var(--brand-blue);
}

[data-theme='light'] .chapter-title .chevron {
  color: #0052cc;
}

.section-list {
  list-style: none;
  padding: 0.5rem 0;
  margin-top: 0;
  border-left: none;
  background: rgba(10, 96, 255, 0.02);
}

.section-list li {
  padding: 0.875rem 1.25rem 0.875rem 2.5rem;
  cursor: pointer;
  border-radius: 0;
  margin: 0.25rem 0.5rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  border-radius: 8px;
  position: relative;
  font-size: 0.95rem;
  color: var(--color-text);
}

[data-theme='light'] .section-list li {
  color: #0b1020;
}

.section-list li::before {
  content: '▸';
  position: absolute;
  left: 1rem;
  color: var(--brand-mint);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

[data-theme='light'] .section-list li::before {
  color: #008a5e;
}

.section-list li:hover {
  background: linear-gradient(90deg, rgba(10, 96, 255, 0.15), rgba(0, 183, 122, 0.1));
  transform: translateX(4px);
  border-left-color: var(--brand-blue);
  box-shadow: 0 2px 8px rgba(10, 96, 255, 0.2);
}

[data-theme='light'] .section-list li:hover {
  background: linear-gradient(90deg, rgba(10, 96, 255, 0.12), rgba(0, 183, 122, 0.08));
  border-left-color: #0052cc;
}

.section-list li:hover::before {
  transform: translateX(4px);
  color: var(--brand-blue);
}

[data-theme='light'] .section-list li:hover::before {
  color: #0052cc;
}

.section-list li.active {
  background: linear-gradient(135deg, rgba(10, 96, 255, 0.2), rgba(0, 183, 122, 0.15));
  color: var(--brand-blue);
  font-weight: 700;
  border-left: 4px solid var(--brand-blue);
  padding-left: calc(2.5rem - 4px);
  box-shadow: 0 4px 12px rgba(10, 96, 255, 0.25);
  transform: translateX(4px);
}

[data-theme='light'] .section-list li.active {
  color: #0052cc;
  background: linear-gradient(135deg, rgba(10, 96, 255, 0.15), rgba(0, 183, 122, 0.12));
}

.section-list li.active::before {
  content: '✓';
  color: var(--brand-mint);
  font-weight: bold;
  transform: translateX(0);
}

[data-theme='light'] .section-list li.active::before {
  color: #008a5e;
}

.section-list li.completed {
  color: var(--brand-mint);
  font-weight: 500;
}

[data-theme='light'] .section-list li.completed {
  color: #008a5e;
  font-weight: 600;
}

.section-list li.completed::before {
  content: '✓';
  color: var(--brand-mint);
  font-weight: bold;
}

[data-theme='light'] .section-list li.completed::before {
  color: #008a5e;
}

.lab-content {
  background: linear-gradient(135deg, var(--color-bg) 0%, rgba(0, 183, 122, 0.02) 100%);
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.lab-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-mint));
}

section.translate {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 !important;
}

#sectionTitle {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  padding: 2rem 2rem 1.5rem 2rem;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

[data-theme='light'] #sectionTitle {
  background: linear-gradient(135deg, #0052cc, #008a5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#sectionContent {
  background: var(--color-panel);
  padding: 2.5rem;
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
  position: relative;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  line-height: 1.6;
  font-family: 'Lexend', sans-serif;
}

#sectionContent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-mint));
}

/* Welcome message styles */
.welcome-message {
  text-align: center;
  padding: 3rem 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.welcome-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  animation: bounce 2s infinite;
  filter: drop-shadow(0 4px 8px rgba(10, 96, 255, 0.3));
}

.welcome-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: -0.5px;
}

[data-theme='light'] .welcome-title {
  background: linear-gradient(135deg, #0052cc, #008a5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-text {
  font-size: 1.15rem;
  color: var(--color-text);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

[data-theme='light'] .welcome-text {
  color: var(--color-text);
  opacity: 0.85;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* === START: Content styles from editor.css === */

#sectionContent h1,
#sectionContent h2,
#sectionContent h3,
#sectionContent h4,
#sectionContent h5,
#sectionContent h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent h1,
[data-theme='light'] #sectionContent h2,
[data-theme='light'] #sectionContent h3,
[data-theme='light'] #sectionContent h4,
[data-theme='light'] #sectionContent h5,
[data-theme='light'] #sectionContent h6 {
  color: #0b1020;
}

#sectionContent h1 {
  font-size: 2.5em;
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.3em;
}

#sectionContent h2 {
  font-size: 2em;
}
#sectionContent h3 {
  font-size: 1.75em;
}
#sectionContent h4 {
  font-size: 1.5em;
}
#sectionContent h5 {
  font-size: 1.25em;
}
#sectionContent h6 {
  font-size: 1em;
}

#sectionContent p {
  margin-bottom: 1em;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent p {
  color: #0b1020;
}

#sectionContent hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 2em 0;
}

#sectionContent ul,
#sectionContent ol {
  padding-left: 2em;
  margin-bottom: 1em;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent ul,
[data-theme='light'] #sectionContent ol {
  color: #0b1020;
}

#sectionContent li {
  color: var(--color-text);
  margin-bottom: 0.5em;
}

[data-theme='light'] #sectionContent li {
  color: #0b1020;
}

#sectionContent img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1em 0;
}

/* Code blocks and inline code */
#sectionContent code {
  background: rgba(10, 96, 255, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent code {
  background: rgba(10, 96, 255, 0.08);
  color: #0b1020;
}

#sectionContent pre {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1em;
  overflow-x: auto;
  margin: 1.5em 0;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent pre {
  background: #f8f9fa;
  border-color: var(--color-border);
  color: #0b1020;
}

#sectionContent pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Blockquotes */
#sectionContent blockquote {
  border-left: 4px solid var(--brand-blue);
  padding-left: 1.5em;
  margin: 1.5em 0;
  color: var(--color-text);
  font-style: italic;
}

[data-theme='light'] #sectionContent blockquote {
  border-left-color: #0052cc;
  color: #0b1020;
  background: rgba(10, 96, 255, 0.05);
  padding: 1em 1.5em;
  border-radius: 4px;
}

/* Vertical Spacer */
#sectionContent .vertical-spacer {
  height: 20px;
}

/* Note Boxes */
#sectionContent .note {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent .note {
  color: #0b1020;
}

#sectionContent .note strong {
  font-weight: bold;
}

#sectionContent .note-pq {
  color: #004085;
  background-color: #cce5ff;
  border-color: #b8daff;
}

#sectionContent .note-note {
  color: #383d41;
  background-color: #e2e3e5;
  border-color: #d6d8db;
}

#sectionContent .note-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

#sectionContent .note-task {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

#sectionContent .note-solution,
#sectionContent .note-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

#sectionContent .note-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

/* MCQ Elements */
#sectionContent .mcq {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin: 1.5em 0;
}

#sectionContent .mcq_element {
  background-color: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  margin: 1.5em 0;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

#sectionContent .mcq_element:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

#sectionContent .mcq_element h6 {
  margin-top: 0;
  margin-bottom: 1.5em;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent .mcq_element h6 {
  color: #0b1020;
}

#sectionContent .mcq-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

#sectionContent .mcq-option:hover {
  background-color: rgba(10, 96, 255, 0.1);
  border-color: var(--brand-blue);
  transform: scale(1.02);
}

#sectionContent .mcq_element .form-check-input {
  margin-right: 12px;
  flex-shrink: 0;
}

#sectionContent .mcq-option-label {
  flex-grow: 1;
  margin-bottom: 0;
  cursor: pointer;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent .mcq-option-label {
  color: #0b1020;
}

#sectionContent .mcq-option-label.correct {
  color: #155724;
  font-weight: bold;
}

#sectionContent .mcq-option-label.incorrect {
  color: #721c24;
}

#sectionContent .mcq-explanation {
  margin-top: 20px;
  padding: 15px;
  border-radius: 6px;
}

/* Table Styling */
#sectionContent table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

#sectionContent th,
#sectionContent td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent th,
[data-theme='light'] #sectionContent td {
  color: #0b1020;
}

#sectionContent th {
  background-color: var(--hover-bg-color);
  font-weight: bold;
  color: var(--color-text);
}

[data-theme='light'] #sectionContent th {
  background-color: rgba(10, 96, 255, 0.1);
  color: #0b1020;
}

#sectionContent tr:nth-child(even) {
  background-color: var(--background-color);
}

[data-theme='dark'] #sectionContent tr:nth-child(even) {
  background-color: #2c303a;
}
/* === END: Content styles from editor.css === */

/* Timer Styles */
.timer {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  min-width: 80px;
  text-align: center;
  transition: all 0.3s ease;
}

.timer.warning {
  color: #ffc107;
  border-color: #ffc107;
}

.timer.danger {
  color: #dc3545;
  border-color: #dc3545;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 5px 10px rgba(220, 53, 69, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

[data-theme='light'] .timer {
  background-color: #f8f9fa;
}

[data-theme='light'] .timer.warning {
  color: #e89c02;
  border-color: #e89c02;
}

[data-theme='light'] .timer.danger {
  color: #c82333;
  border-color: #c82333;
}

/* Add these new styles for the header */
.lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--color-panel) 0%, rgba(10, 96, 255, 0.05) 100%);
  border-bottom: 2px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

[data-theme='light'] .lab-header {
  background: linear-gradient(135deg, var(--color-panel) 0%, rgba(10, 96, 255, 0.03) 100%);
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.lab-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-mint));
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.course-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.course-progress-container {
  width: 250px;
  height: 12px;
  background-color: rgba(10, 96, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(10, 96, 255, 0.2);
  display: flex;
  align-items: center;
}

.course-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-mint));
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-progress-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.back-button {
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
  color: var(--color-text);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(10, 96, 255, 0.1);
  border: 1px solid rgba(10, 96, 255, 0.2);
}

[data-theme='light'] .back-button {
  color: #0b1020;
  background: rgba(10, 96, 255, 0.08);
  border-color: rgba(10, 96, 255, 0.25);
}

.back-button:hover {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-mint));
  color: white;
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(10, 96, 255, 0.3);
  border-color: transparent;
}

.lab-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
  background-clip: text;
  letter-spacing: 0.3px;
}

[data-theme='light'] .lab-header h2 {
  background: linear-gradient(135deg, #0052cc, #008a5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-toggle {
  display: flex;
  background: rgba(10, 96, 255, 0.1);
  border: 1px solid rgba(10, 96, 255, 0.2);
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme='light'] .sidebar-toggle {
  color: #0b1020;
  background: rgba(10, 96, 255, 0.08);
  border-color: rgba(10, 96, 255, 0.25);
}

.sidebar-toggle:hover {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-mint));
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(10, 96, 255, 0.3);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.overlay.active {
  display: block;
}

/* Section Navigation Styles */
.section-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.section-navigation .button {
  flex: 1;
  min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .lab-layout {
    grid-template-columns: 1fr;
    padding: 0;
    margin-top: 60px;
  }

  .lab-sidebar {
    width: 85vw;
    max-width: 320px;
  }

  section.translate {
    padding: 0 !important;
  }

  #sectionTitle {
    font-size: 1.5rem;
    padding: 1.5rem 1rem 1rem 1rem;
    line-height: 1.3;
  }

  #sectionContent {
    padding: 1.25rem;
    border-radius: 0;
    margin: 0;
  }

  .section-navigation {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
    margin-top: 1.5rem;
  }

  .section-navigation .button {
    width: 100%;
    min-width: unset;
  }

  .welcome-message {
    padding: 2rem 1rem;
  }

  .welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
  }

  .welcome-title {
    font-size: 1.75rem;
  }

  .welcome-text {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .lab-header {
    padding: 0.75rem 1rem;
    height: auto;
    min-height: 60px;
  }

  .lab-header h2 {
    font-size: 1.1rem;
    max-width: 45vw;
  }

  .course-progress-container {
    width: 150px;
  }

  .header-right {
    gap: 0.5rem;
  }

  .theme-toggle .label {
    display: none;
  }

  .theme-toggle {
    padding: 8px;
    min-width: 40px;
  }

  #google_translate_element {
    margin-top: 0 !important;
  }
}

/* Extra small screens */
@media (max-width: 600px) {
  .lab-sidebar {
    width: 90vw;
  }

  section.translate {
    padding: 0 !important;
  }

  #sectionTitle {
    font-size: 1.5rem;
    padding: 1.25rem 0.75rem 0.75rem 0.75rem;
  }

  #sectionContent {
    padding: 1rem;
    margin: 0;
  }

  .section-navigation {
    padding: 0.75rem 0;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .button {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .lab-header {
    padding: 0.5rem 0.75rem;
  }

  .lab-header h2 {
    font-size: 1rem;
    max-width: 40vw;
  }

  .back-button,
  .sidebar-toggle {
    width: 36px;
    height: 36px;
    padding: 0.4rem;
    font-size: 1.25rem;
  }

  .chapter-title {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .section-list li {
    padding: 0.75rem 1rem 0.75rem 2rem;
    font-size: 0.9rem;
  }

  .panel-header {
    padding: 1rem;
  }

  .panel-header h4 {
    font-size: 1.1rem;
  }

  .welcome-message {
    padding: 1.5rem 0.75rem;
  }

  .welcome-icon {
    font-size: 3.5rem;
  }

  .welcome-title {
    font-size: 1.5rem;
  }

  .welcome-text {
    font-size: 0.95rem;
  }
}

/* Very small screens */
@media (max-width: 400px) {
  .lab-header h2 {
    display: none;
  }

  .header-left {
    gap: 0.5rem;
  }

  #sectionTitle {
    font-size: 1.25rem;
    padding: 1rem 0.5rem 0.5rem 0.5rem;
  }

  .chapter-title {
    font-size: 0.9rem;
    padding: 0.75rem;
  }

  .section-list li {
    padding: 0.625rem 0.75rem 0.625rem 1.75rem;
    font-size: 0.85rem;
  }
}

/* Styles for Student Dashboard */

main {
  padding: 2rem 0;
}

.dashboard-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 2rem;
}

.dashboard-header {
  padding: 1.5rem;
  background-color: var(--color-panel);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.dashboard-header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 2rem;
}

.dashboard-header p {
  margin: 0;
  color: var(--color-muted);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background-color: var(--color-panel);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
}

.stat-card h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--color-muted);
  font-weight: 500;
}

.stat-card p {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card .btn {
  margin-top: 1.25rem;
  display: inline-block;
}

.courses-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background-color: var(--color-panel);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* New styles for buttons and progress bars */
.button {
  border: 2px solid var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Lexend', sans-serif;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

[data-theme='light'] .button {
  color: #0b1020;
  background: var(--color-panel);
  border-color: var(--color-border);
}

.button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.button:hover:not(:disabled)::before {
  width: 300px;
  height: 300px;
}

.button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(10, 96, 255, 0.3);
  border-color: var(--brand-blue);
  background: linear-gradient(135deg, rgba(10, 96, 255, 0.1), rgba(0, 183, 122, 0.1));
}

.button:active:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.button-primary {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-mint));
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(10, 96, 255, 0.4);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.button-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 8px 24px rgba(10, 96, 255, 0.5);
  transform: translateY(-3px);
}

.button-primary:active:not(:disabled) {
  transform: translateY(-1px);
}

#complete-section-btn.completed {
  background: linear-gradient(135deg, #28a745, #20c997);
  border: none;
  color: white;
  cursor: default;
  box-shadow: 0 4px 16px rgba(40, 167, 69, 0.4);
  transform: none;
  filter: brightness(1);
  position: relative;
}

#complete-section-btn.completed::before {
  content: '✓';
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.chapter-progress {
  width: calc(100% - 2.5rem);
  margin: 0.75rem 1.25rem 1rem;
  background: rgba(10, 96, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  height: 10px;
  border: 1px solid rgba(10, 96, 255, 0.2);
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chapter-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-mint), var(--brand-blue));
  background-size: 200% 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 2px 8px rgba(10, 96, 255, 0.4);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.chapter-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

[data-theme='dark'] .lab-sidebar {
  background: var(--color-panel);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .panel-header {
  background: linear-gradient(135deg, rgba(10, 96, 255, 0.15), rgba(0, 183, 122, 0.15));
}

[data-theme='dark'] .section-list {
  background: rgba(10, 96, 255, 0.05);
}

[data-theme='dark'] .chapter-item:hover {
  background-color: rgba(10, 96, 255, 0.1);
}

[data-theme='dark'] .chapter-item.locked {
  background-color: rgba(0, 0, 0, 0.2);
}

[data-theme='dark'] .lab-sidebar::-webkit-scrollbar-track,
[data-theme='dark'] .lab-content::-webkit-scrollbar-track {
  background: rgba(10, 96, 255, 0.1);
}

[data-theme='dark'] .lab-sidebar::-webkit-scrollbar-thumb,
[data-theme='dark'] .lab-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-mint));
}

[data-theme='dark'] .lab-sidebar::-webkit-scrollbar-thumb:hover,
[data-theme='dark'] .lab-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-mint), var(--brand-blue));
}

[data-theme='dark'] .button {
  border-color: var(--color-border);
}

[data-theme='dark'] .button:hover:not(:disabled) {
  box-shadow: var(--shadow);
}

[data-theme='dark'] .button-primary {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-mint));
  border: none;
}

[data-theme='dark'] .button-primary:hover:not(:disabled) {
  filter: brightness(1.15);
}

[data-theme='dark'] .chapter-progress {
  background-color: var(--color-border);
  border-color: var(--color-border);
}

.course-thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.course-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-title {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
}

.course-progress {
  margin-top: auto;
  padding-top: 1rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--brand-mint));
  border-radius: 4px;
}

.progress-text {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.course-content .btn {
  margin-top: 1rem;
  text-align: center;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background-color: var(--color-panel);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
}

.empty-state h3 {
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

/* Styles for Final Test Page */
.test-main-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 20px;
}

.test-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mcq-block {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  padding: 8px;
}

.mcq-block:nth-child(2) {
  animation-delay: 0.1s;
}
.mcq-block:nth-child(3) {
  animation-delay: 0.2s;
}

.mcq-question {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  line-height: 1.4;
}

.mcq-options {
  display: grid;
  gap: 1rem;
}

.mcq-option {
  display: block;
  position: relative;
}

.mcq-option input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
}

.mcq-option span {
  display: block;
  padding: 1rem 1.5rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  transition: all 0.2s ease-in-out;
  background-color: var(--color-panel);
}

.mcq-option input[type='radio']:hover + span {
  border-color: var(--brand-blue);
  background-color: rgba(10, 96, 255, 0.1);
}

.mcq-option input[type='radio']:checked + span {
  border-color: var(--brand-blue);
  background-color: rgba(10, 96, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(10, 96, 255, 0.3);
  color: var(--brand-blue);
  font-weight: 600;
}

.submit-container {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

/* Styles for Test Question Navigation */
#questionNav {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.question-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.question-nav-item {
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  border-radius: 8px;
  margin: 0.25rem 0;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.question-nav-item.not-attempted {
  color: var(--color-text);
  opacity: 0.8;
}

.question-nav-item.attempted {
  border-left-color: var(--brand-mint);
  color: var(--brand-mint);
}

[data-theme='light'] .question-nav-item.attempted {
  color: #008a5e;
  border-left-color: #008a5e;
}

.question-nav-item.current {
  background: linear-gradient(90deg, rgba(10, 96, 255, 0.15), rgba(0, 183, 122, 0.1));
  border-left-color: var(--brand-blue);
  font-weight: 700;
  color: var(--brand-blue);
  transform: translateX(4px);
}

[data-theme='light'] .question-nav-item.current {
  color: #0052cc;
  border-left-color: #0052cc;
  background: linear-gradient(135deg, rgba(10, 96, 255, 0.15), rgba(0, 183, 122, 0.12));
}

.question-nav-item:hover:not(.current) {
  background: linear-gradient(90deg, rgba(10, 96, 255, 0.1), transparent);
  transform: translateX(4px);
}

.submit-test-container {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-panel);
}

/* Assessment Page Specific Styles */
.assessment-wrapper {
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
}

.assessment-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme='light'] .assessment-title {
  background: linear-gradient(135deg, #0052cc, #008a5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.iframe-container {
  height: 80vh;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Assessment Results */
.assessment-results-list {
  list-style: none;
  padding: 0;
  text-align: left;
  max-width: 600px;
  margin: 1.5rem auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--color-panel);
}

.assessment-results-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.assessment-results-item:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}

.assessment-results-item .status {
  font-weight: bold;
  white-space: nowrap;
  margin-left: 1rem;
}

.assessment-results-item .status.correct {
  color: var(--brand-mint);
}

.assessment-results-item .status.incorrect {
  color: #dc3545; /* Red for errors */
}
