/* ===========================
   Tutorial Components Styles
   =========================== */

.tutorial__content-header h1 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin: 1.5rem 1.5rem 0 1.5rem;
  font-weight: 700;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.tutorial__content h2 {
  font-size: 1.6rem;
  color: var(--secondary-color);
  margin: 1.5rem 0 1rem 0;
  font-weight: 700;
  border-right: 4px solid var(--primary-color);
  padding-right: 0.7rem;

}

.tutorial__content h3 {
  font-size: 1.3rem;
  color: var(--secondary-color);
  margin: 0.8rem 0;
  font-weight: 700;

}

.tutorial__content h4 {
  font-size: 1.15rem;
  color: var(--secondary-color);
  margin: 0.6rem 0;
  font-weight: 600;

}

.tutorial__content p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-color-light);
  line-height: 1.8;
}

/* تنسيق العناصر النصية */
.tutorial__content strong {
  font-weight: 700;
  color: var(--secondary-color);
}

.tutorial__content em {
  font-style: italic;
  color: var(--primary-color);
}

.tutorial__content u {
  text-decoration: underline;
  text-decoration-color: var(--primary-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.tutorial__content mark {
  background-color: rgba(255, 193, 7, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: inherit;
}

.tutorial__content code {
  background-color: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #d73a49;
}

.tutorial__content del {
  text-decoration: line-through;
  color: #999999;
  opacity: 0.7;
}

.tutorial__content ins {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: #10b981;
  background-color: rgba(16, 185, 129, 0.1);
  padding: 0.1rem 0.3rem;
}

.tutorial__content small {
  font-size: 0.9rem;
  color: #666666;
}

.tutorial__content sup {
  font-size: 0.8rem;
  vertical-align: super;
  color: var(--primary-color);
  font-weight: 500;
}

.tutorial__content sub {
  font-size: 0.8rem;
  vertical-align: sub;
  color: var(--primary-color);
  font-weight: 500;
}

.tutorial__content hr {
  margin: 2rem 0;
  border: none;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.tutorial__content ul,
.tutorial__content ol {
  margin: 1rem 2rem;
  color: var(--text-color-light);
  font-size: 1.05rem;
  line-height: 1.6;
}

.tutorial__content ul li, .tutorial__content ol li {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}
.tutorial__content ul li {
    list-style-type: disc;
}
.tutorial__content ol li {
    list-style-type: decimal;
}
.tutorial__content ul li::marker {
    color: var(--primary-color);
}
.tutorial__content li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

/* ===========================
   جداول (Tables)
   =========================== */

.tutorial__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tutorial__content table thead {
  background-color: var(--primary-color);
  color: white;
}

.tutorial__content table thead th {
  padding: 1rem 1.2rem;
  text-align: right;
  font-weight: 700;
  font-size: 1rem;
}

.tutorial__content table tbody td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-color);
  font-size: 1rem;
}

.tutorial__content table tbody tr:last-child td {
  border-bottom: none;
}

.tutorial__content table tbody tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

/* جدول مخطط (Striped) */
.tutorial__content table.striped tbody tr:nth-child(odd) {
  background-color: rgba(102, 126, 234, 0.03);
}

/* ===========================
   صناديق الملاحظات (Note Boxes)
   =========================== */

.note-box {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  border-right: 4px solid;
  background-color: var(--bg-color);
  font-size: 1rem;
  line-height: 1.6;
}

.note-box .icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: flex-start;
  margin-top: 0.2rem;
}

.note-box .content {
  flex: 1;
}

.note-box .content strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.note-box .content p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* ملاحظة معلوماتية (Info) */
.note-box.info {
  border-right-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.05);
}

.note-box.info .icon {
  color: #3b82f6;
}

.note-box.info .content strong {
  color: #3b82f6;
}

/* ملاحظة تحذيرية (Warning) */
.note-box.warning {
  border-right-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.05);
}

.note-box.warning .icon {
  color: #f59e0b;
}

.note-box.warning .content strong {
  color: #f59e0b;
}

/* ملاحظة نجاح (Success) */
.note-box.success {
  border-right-color: #10b981;
  background-color: rgba(16, 185, 129, 0.05);
}

.note-box.success .icon {
  color: #10b981;
}

.note-box.success .content strong {
  color: #10b981;
}

/* ملاحظة خطأ (Error) */
.note-box.error {
  border-right-color: #ef4444;
  background-color: rgba(239, 68, 68, 0.05);
}

.note-box.error .icon {
  color: #ef4444;
}

.note-box.error .content strong {
  color: #ef4444;
}

/* ===========================
   استجابة الجوال (Responsive)
   =========================== */

@media (max-width: 768px) {
  .tutorial__content table {
    font-size: 0.9rem;
  }

  .tutorial__content table thead th,
  .tutorial__content table tbody td {
    padding: 0.8rem;
  }

  .note-box {
    flex-direction: column;
    padding: 1rem;
  }

  .note-box .icon {
    font-size: 1.3rem;
  }
}

/* ===========================
   محرر الأكواد (Code Editor)
   =========================== */

.code-editor-container {
  margin: 2rem 0;
  background-color: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.code-editor-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background-color: #1e1e1e;
  padding: 1rem 1.2rem;
  border-bottom: 2px solid var(--primary-color);
  gap: 0.8rem;
}

.code-editor-title {
  display: none;
}

.code-editor-buttons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.code-editor-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background-color: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cairo', sans-serif;
}

.code-editor-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.1);
}

.code-editor-btn--run {
  border-color: #10b981;
  color: #10b981;
}

.code-editor-btn--run:hover {
  background-color: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.code-editor-btn--copy {
  border-color: #3b82f6;
  color: #3b82f6;
}

.code-editor-btn--copy:hover {
  background-color: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}

.code-editor-btn--reset {
  border-color: #f59e0b;
  color: #f59e0b;
}

.code-editor-btn--reset:hover {
  background-color: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.code-editor-wrapper {
  position: relative;
  height: 300px;
}

.code-editor-textarea {
  display: none;
}

.CodeMirror {
  height: 300px !important;
  font-family: 'Roboto Mono', 'Courier New', monospace !important;
  font-size: 0.95rem !important;
}

.CodeMirror-gutters {
  background-color: #f5f5f5;
  border-right: 1px solid #e0e0e0;
}

.CodeMirror-linenumber {
  color: #999;
  font-size: 0.9rem;
}

.code-editor-output {
  display: none;
  background-color: #1e1e1e;
  color: #00ff00;
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: 0.95rem;
  border-top: 2px solid var(--primary-color);
  height: 300px;
  overflow-y: auto;
}

.code-editor-output.active {
  display: grid;
  grid-template-rows: auto 1fr;
}

.output-header {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.output-content {
  margin: 0;
  padding: 0;
  color: #00ff00;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}

.output-content.error {
  color: #ff6b6b;
}

.output-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  display: none;
}

/* ===========================
   صناديق المحتوى (Content Boxes)
   =========================== */

.content-box {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--bg-color);
  border-right: 5px solid;
}

/* صندوق الملاحظة */
.content-box.note {
  border-right-color: #10b981;
  background-color: rgba(16, 185, 129, 0.08);
}

.content-box.note .box-header {
  color: #10b981;
}

/* صندوق المعلومة */
.content-box.info {
  border-right-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.08);
}

.content-box.info .box-header {
  color: #f59e0b;
}

/* صندوق النصيحة */
.content-box.tip {
  border-right-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.08);
}

.content-box.tip .box-header {
  color: #3b82f6;
}

/* صندوق الاقتباس */
.content-box.quote {
  border-right-color: #a78bfa;
  background-color: rgba(167, 139, 250, 0.08);
  border-left: 5px solid #a78bfa;
  border-right: none;
  font-style: italic;
  background-image: linear-gradient(
    to bottom,
    rgba(167, 139, 250, 0.05),
    rgba(167, 139, 250, 0.02)
  );
}

.box-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.box-header i {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.box-content {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.8;
}

.box-content p {
  margin: 0.5rem 0;
  font-size: 1rem;
}

.box-content p:first-child {
  margin-top: 0;
}

.box-content p:last-child {
  margin-bottom: 0;
}

.quote-author {
  font-size: 0.95rem;
  color: var(--text-color-light);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(167, 139, 250, 0.2);
  font-style: normal;
}

/* استجابة الجوال */
@media (max-width: 768px) {
  .content-box {
    padding: 1.2rem;
    margin: 1.5rem 0;
  }

  .box-header {
    font-size: 1rem;
  }

  .box-header i {
    font-size: 1.1rem;
  }

  .box-content {
    font-size: 1rem;
  }

  .box-content p {
    font-size: 1rem;
  }
}

/* ===========================
   صندوق الـ Quiz
   =========================== */

.quiz-container {
  margin: 2rem 0;
}

.quiz-item {
  margin: 1.5rem 0;
  background-color: var(--bg-color);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.quiz-item:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.4);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem;
  background-color: rgba(102, 126, 234, 0.08);
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.quiz-header:hover {
  background-color: rgba(102, 126, 234, 0.12);
}

.quiz-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary-color);
  line-height: 1.6;
  flex: 1;
}

.quiz-question code {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: var(--primary-color);
  font-weight: 500;
}

.quiz-toggle {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 0 0 1rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.quiz-toggle.active {
  transform: rotate(180deg);
}

.quiz-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.quiz-answer.active {
  max-height: 500px;
}

.answer-content {
  padding: 1.5rem;
  color: var(--text-color);
}

.answer-content p {
  margin: 0.8rem 0;
  font-size: 1rem;
  line-height: 1.8;
}

.answer-content p:first-child {
  margin-top: 0;
  font-weight: 600;
  color: var(--primary-color);
}

.answer-content ul {
  margin: 1rem 0 0 2rem;
  padding: 0;
}

.answer-content li {
  margin: 0.6rem 0;
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.8;
}

.answer-content code {
  background-color: rgba(0, 0, 0, 0.08);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: var(--primary-color);
  font-weight: 500;
}

/* استجابة الجوال - Quiz */
@media (max-width: 768px) {
  .quiz-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .quiz-question {
    font-size: 1rem;
  }

  .quiz-toggle {
    padding-right: 0;
  }

  .answer-content {
    padding: 1rem;
  }

  .answer-content p {
    font-size: 1rem;
  }

  .answer-content li {
    font-size: 1rem;
  }

  .quiz-answer.active {
    max-height: 800px;
  }
}

.output-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

/* استجابة الجوال - محرر الأكواد */
@media (max-width: 768px) {
  .code-editor-header {
    flex-direction: row-reverse;
    justify-content: flex-start;
  }

  .code-editor-buttons {
    width: 100%;
    justify-content: flex-end;
  }

  .CodeMirror {
    height: 250px !important;
  }

  .code-editor-wrapper {
    height: 250px;
  }

  .code-editor-btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
  }
}

.html-structure {
    margin: 30px 0;
    font-family: 'Courier New', Consolas, monospace;
}

.html-structure__element {
    border: 2px solid;
    margin: 5px;
    border-radius: 4px;
    position: relative;
}

.html-structure__element--html {
    border-color: #6f42c1;
    background: #f8f5ff;
    padding: 20px;
}

.html-structure__element--head {
    border-color: #fd7e14;
    background: #fff5f0;
    padding: 15px;
    margin: 10px 0;
}

.html-structure__element--body {
    border-color: #20c997;
    background: #f0fdf4;
    padding: 15px;
    margin: 10px 0;
}

.html-structure__element--title {
    border-color: #dc3545;
    background: #fff5f5;
    padding: 10px;
    margin: 5px 0;
}

.html-structure__element--h1,
.html-structure__element--p {
    border-color: #0d6efd;
    background: #f0f8ff;
    padding: 10px;
    margin: 8px 0;
}

.html-structure__label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.html-structure__text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-right: 10px;
}

.html-structure__content {
    margin-top: 10px;
}

/* ===========================
   جدول التاريخ (History Table)
   =========================== */

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.history-table thead {
    color: white;
}

.history-table thead tr {
    background-color: #667eea;
}

.history-table thead th {
    padding: 12px;
    text-align: right;
    border: 1px solid #ddd;
    font-weight: 700;
}

.history-table tbody td {
    padding: 12px;
    border: 1px solid #ddd;
    color: var(--text-color);
}

.history-table tbody tr {
    background-color: transparent;
}

.history-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.history-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.08);
}

/* ===========================
   Dark Theme - مكونات المقال
   =========================== */

.dark-theme .tutorial__content-header h1 {
    color: #e0e0e0;
    border-bottom-color: #04AA6D;
}

.dark-theme .tutorial__content h2 {
    color: #e0e0e0;
    border-right-color: #04AA6D;
}

.dark-theme .tutorial__content h3,
.dark-theme .tutorial__content h4 {
    color: #e0e0e0;
}

.dark-theme .tutorial__content p {
    color: #b0b0b0;
}

.dark-theme .tutorial__content strong {
    color: #e0e0e0;
}

.dark-theme .tutorial__content em {
    color: #04AA6D;
}

.dark-theme .tutorial__content u {
    text-decoration-color: #04AA6D;
}

.dark-theme .tutorial__content mark {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffd700;
}

.dark-theme .tutorial__content code {
    background-color: rgba(255, 255, 255, 0.1);
    color: #64d5ea;
}

.dark-theme .tutorial__content del {
    color: #666666;
}

.dark-theme .tutorial__content ins {
    text-decoration-color: #10b981;
    background-color: rgba(16, 185, 129, 0.15);
}

.dark-theme .tutorial__content small {
    color: #999999;
}

.dark-theme .tutorial__content sup,
.dark-theme .tutorial__content sub {
    color: #04AA6D;
}

.dark-theme .tutorial__content hr {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* الجوائل والقوائم */
.dark-theme .tutorial__content ul,
.dark-theme .tutorial__content ol {
    color: #b0b0b0;
}

.dark-theme .tutorial__content ul li,
.dark-theme .tutorial__content ol li {
    color: #e0e0e0;
}

/* الجداول */
.dark-theme .tutorial__content table {
    background-color: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .tutorial__content table thead {
    background-color: #04AA6D;
}

.dark-theme .tutorial__content table thead th {
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .tutorial__content table tbody td {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.dark-theme .tutorial__content table tbody tr:hover {
    background-color: rgba(4, 170, 109, 0.1);
}

.dark-theme .tutorial__content table.striped tbody tr:nth-child(odd) {
    background-color: rgba(4, 170, 109, 0.05);
}

/* صناديق الملاحظات */
.dark-theme .note-box {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .note-box.info {
    background-color: rgba(59, 130, 246, 0.1);
    border-right-color: #3b82f6;
}

.dark-theme .note-box.info .icon {
    color: #3b82f6;
}

.dark-theme .note-box.info .content strong {
    color: #3b82f6;
}

.dark-theme .note-box.warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-right-color: #f59e0b;
}

.dark-theme .note-box.warning .icon {
    color: #f59e0b;
}

.dark-theme .note-box.warning .content strong {
    color: #f59e0b;
}

.dark-theme .note-box.success {
    background-color: rgba(16, 185, 129, 0.1);
    border-right-color: #10b981;
}

.dark-theme .note-box.success .icon {
    color: #10b981;
}

.dark-theme .note-box.success .content strong {
    color: #10b981;
}

.dark-theme .note-box.error {
    background-color: rgba(239, 68, 68, 0.1);
    border-right-color: #ef4444;
}

.dark-theme .note-box.error .icon {
    color: #ef4444;
}

.dark-theme .note-box.error .content strong {
    color: #ef4444;
}

.dark-theme .note-box .content p {
    color: #b0b0b0;
}

/* محرر الأكواد */
.dark-theme .code-editor-container {
    background-color: #0d0d0d;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .code-editor-header {
    background-color: #1a1a1a;
    border-bottom-color: #04AA6D;
}

.dark-theme .code-editor-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dark-theme .code-editor-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.dark-theme .CodeMirror {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

.dark-theme .CodeMirror-gutters {
    background-color: #1a1a1a;
    border-right-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .CodeMirror-linenumber {
    color: #666666;
}

.dark-theme .CodeMirror-cursor {
    border-left-color: #04AA6D;
}

.dark-theme .code-editor-output {
    background-color: #0d0d0d;
    color: #00ff00;
    border-top-color: #04AA6D;
}

.dark-theme .output-header {
    color: #04AA6D;
}

/* صناديق المحتوى */
.dark-theme .content-box {
    background: linear-gradient(135deg, rgba(4, 170, 109, 0.08), rgba(4, 170, 109, 0.12));
}

.dark-theme .content-box.note {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.15));
    border-right-color: #10b981;
}

.dark-theme .content-box.note .box-header {
    color: #10b981;
}

.dark-theme .content-box.info {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.15));
    border-right-color: #f59e0b;
}

.dark-theme .content-box.info .box-header {
    color: #f59e0b;
}

.dark-theme .content-box.tip {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.15));
    border-right-color: #3b82f6;
}

.dark-theme .content-box.tip .box-header {
    color: #3b82f6;
}

.dark-theme .content-box.quote {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(167, 139, 250, 0.15));
    border-right-color: #a78bfa;
    border-left-color: #a78bfa;
}

.dark-theme .box-header {
    color: #e0e0e0;
}

.dark-theme .box-content {
    color: #b0b0b0;
}

.dark-theme .box-content p {
    color: #b0b0b0;
}

.dark-theme .quote-author {
    color: #888888;
    border-top-color: rgba(167, 139, 250, 0.3);
}

/* صندوق الـ Quiz */
.dark-theme .quiz-item {
    background-color: #1a1a2e;
    border-color: rgba(102, 126, 234, 0.3);
}

.dark-theme .quiz-item:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.dark-theme .quiz-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(102, 126, 234, 0.2));
    border-bottom-color: rgba(102, 126, 234, 0.3);
}

.dark-theme .quiz-header:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(102, 126, 234, 0.25));
}

.dark-theme .quiz-question {
    color: #e0e0e0;
}

.dark-theme .quiz-question code {
    background-color: rgba(255, 255, 255, 0.1);
    color: #64d5ea;
}

.dark-theme .quiz-toggle {
    color: #04AA6D;
}

.dark-theme .answer-content {
    color: #b0b0b0;
}

.dark-theme .answer-content p {
    color: #b0b0b0;
}

.dark-theme .answer-content p:first-child {
    color: #04AA6D;
}

.dark-theme .answer-content li {
    color: #b0b0b0;
}

.dark-theme .answer-content code {
    background-color: rgba(255, 255, 255, 0.1);
    color: #64d5ea;
}

/* HTML Structure */
.dark-theme .html-structure__element {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.05));
}

.dark-theme .html-structure__element--html {
    border-color: #a78bfa;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(167, 139, 250, 0.15));
}

.dark-theme .html-structure__element--head {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.15));
}

.dark-theme .html-structure__element--body {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.15));
}

.dark-theme .html-structure__element--title {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.15));
}

.dark-theme .html-structure__element--h1,
.dark-theme .html-structure__element--p {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.15));
}

.dark-theme .html-structure__label {
    color: #e0e0e0;
}

.dark-theme .html-structure__text {
    color: #888888;
}

/* جدول التاريخ */
.dark-theme .history-table {
    background-color: #1a1a2e;
}

.dark-theme .history-table thead tr {
    background-color: #04AA6D;
}

.dark-theme .history-table thead th {
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.dark-theme .history-table tbody td {
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.dark-theme .history-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

.dark-theme .history-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(4, 170, 109, 0.1), rgba(4, 170, 109, 0.15));
}

/* ===========================
   صناديق التمييز (Highlight Boxes)
   =========================== */

.tutorial__highlight-box {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    border-right: 4px solid;
    background-color: var(--bg-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tutorial__highlight-box-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.tutorial__highlight-box-header i {
    font-size: 1.3rem;
}

.tutorial__highlight-box p {
    margin: 0.5rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.tutorial__highlight-box ul {
    margin: 0.8rem 0 0 2rem;
}

.tutorial__highlight-box li {
    margin: 0.4rem 0;
}

/* صندوق معلومات (Info) */
.tutorial__highlight-box--info {
    border-right-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.08);
}

.tutorial__highlight-box--info .tutorial__highlight-box-header {
    color: #3b82f6;
}

.tutorial__highlight-box--info .tutorial__highlight-box-header i {
    color: #3b82f6;
}

/* صندوق نجاح (Success) */
.tutorial__highlight-box--success {
    border-right-color: #10b981;
    background-color: rgba(16, 185, 129, 0.08);
}

.tutorial__highlight-box--success .tutorial__highlight-box-header {
    color: #10b981;
}

.tutorial__highlight-box--success .tutorial__highlight-box-header i {
    color: #10b981;
}

/* صندوق تحذير (Warning) */
.tutorial__highlight-box--warning {
    border-right-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.08);
}

.tutorial__highlight-box--warning .tutorial__highlight-box-header {
    color: #f59e0b;
}

.tutorial__highlight-box--warning .tutorial__highlight-box-header i {
    color: #f59e0b;
}

/* ===========================
   كتل الأكواد (Code Blocks)
   =========================== */

.tutorial__code-block {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: var(--white-color);
}

.tutorial__code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background-color: var(--secondary-color);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.tutorial__code-language {
    font-family: 'Roboto Mono', monospace;
}

.tutorial__code-copy {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.4rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.tutorial__code-copy:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.tutorial__code-block pre {
    margin: 0;
    padding: 1.2rem;
    overflow-x: auto;
    background-color: #f5f5f5;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tutorial__code-block code {
    color: inherit;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    font-family: inherit;
}

/* ===========================
   جداول الجداول المنسقة
   =========================== */

.tutorial__table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tutorial__table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white-color);
}

.tutorial__table thead {
    background-color: var(--primary-color);
    color: white;
}

.tutorial__table thead th {
    padding: 1.2rem;
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
}

.tutorial__table tbody td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
}

.tutorial__table tbody tr:last-child td {
    border-bottom: none;
}

.tutorial__table tbody tr:hover {
    background-color: rgba(4, 170, 109, 0.05);
}

/* ===========================
   القوائم (Lists)
   =========================== */

.tutorial__list {
    margin: 1.2rem 0 1.2rem 2rem;
    list-style-type: none;
    padding-left: 0;
}

.tutorial__list li {
    margin: 0.8rem 0;
    padding-right: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
    position: relative;
}

.tutorial__list li:before {
    content: "▸";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.8rem;
}

.tutorial__list code {
    background-color: rgba(0, 0, 0, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #d73a49;
    font-size: 0.9rem;
}

/* ===========================
   الوضع الداكن (Dark Theme)
   =========================== */

.dark-theme .tutorial__code-block {
    background-color: #0d0d0d;
}

.dark-theme .tutorial__code-header {
    background-color: #1a1a1a;
}

.dark-theme .tutorial__code-block pre {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.dark-theme .tutorial__code-block code {
    color: #e0e0e0;
}

.dark-theme .tutorial__highlight-box {
    background-color: #1a1a1a;
}

.dark-theme .tutorial__highlight-box--info {
    background-color: rgba(59, 130, 246, 0.15);
    border-right-color: #3b82f6;
}

.dark-theme .tutorial__highlight-box--success {
    background-color: rgba(16, 185, 129, 0.15);
    border-right-color: #10b981;
}

.dark-theme .tutorial__highlight-box--warning {
    background-color: rgba(245, 158, 11, 0.15);
    border-right-color: #f59e0b;
}

.dark-theme .tutorial__table {
    background-color: #1a1a1a;
}

.dark-theme .tutorial__table thead {
    background-color: #04AA6D;
}

.dark-theme .tutorial__table thead th {
    color: white;
}

.dark-theme .tutorial__table tbody td {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.dark-theme .tutorial__table tbody tr:hover {
    background-color: rgba(4, 170, 109, 0.15);
}

.dark-theme .tutorial__list li:before {
    color: #04AA6D;
}