table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 1rem;
      box-shadow: 0 0 15px rgba(0, 0, 255, 0.3);
    }
    th, td {
      border: 1px solid #ddd;
      padding: 8px;
      text-align: right;
    }
    th {
      background-color: #f2f2f2;
      font-weight: bold;
    }
    .law-cell {
      text-align: center; /* توسيط القانون */
    }
    tr:hover {
      background-color: #e0f2fe;
      box-shadow: 0 0 10px #60a5fa;
      transition: all 0.3s ease;
    }

    .section-title {
      color: #1e40af;
      text-shadow: 0 0 5px #60a5fa, 0 0 10px #3b82f6;
      animation: colorChange 3s infinite;
    }

    body {
      background: linear-gradient(45deg, #e0f2fe, #bfdbfe, #fef9c3);
      background-size: 200%;
      animation: gradient 8s ease infinite;
    }

    @keyframes gradient {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    @keyframes colorChange {
      0% { text-shadow: 0 0 5px #60a5fa, 0 0 10px #3b82f6; }
      50% { text-shadow: 0 0 5px #facc15, 0 0 10px #f59e0b; }
      100% { text-shadow: 0 0 5px #60a5fa, 0 0 10px #3b82f6; }
    }

    #particles-js {
      position: fixed;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      z-index: -1;
    }

    .example-btn, .description-btn {
      background-color: #3b82f6;
      color: white;
      padding: 4px 8px;
      border-radius: 4px;
      cursor: pointer;
      display: inline-block;
      margin-top: 4px;
      margin-left: 4px;
    }

    .example-btn:hover, .description-btn:hover {
      background-color: #1e40af;
    }

    .example-btn.active, .description-btn.active {
      background-color: #facc15;
      color: #1e40af;
    }

    .example-content, .description-content {
      display: block;
      max-height: 0;
      overflow: hidden;
      margin-top: 8px;
      padding: 0 8px;
      background-color: #f0f9ff;
      border-radius: 4px;
      transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    }

    .example-content.active, .description-content.active {
      max-height: 500px;
      padding: 8px;
    }

    /* متجاوب مع الموبايل */
    @media (max-width: 768px) {
      table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
      }
      th, td {
        min-width: 100px;
        padding: 6px;
        font-size: 12px;
      }
      tr:hover {
        background-color: transparent;
        box-shadow: none;
      }
    }

    @media (max-width: 480px) {
      th, td {
        font-size: 10px;
        padding: 4px;
      }
      .subject-btn {
        width: 80px;
        height: 80px;
        font-size: 0.9rem;
      }
    }

    /* تصميم Popup الترحيب */
    .welcome-popup, .motivation-popup {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      animation: fadeIn 0.5s ease-in-out;
    }

    .welcome-content, .motivation-content {
      background: linear-gradient(45deg, #60a5fa, #facc15);
      padding: 2rem;
      border-radius: 1rem;
      text-align: center;
      box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
      animation: pop 0.5s ease-in-out;
      max-width: 90%;
      width: 400px;
    }

    .welcome-content h2, .motivation-content h2 {
      color: white;
      font-size: 1.5rem;
      text-shadow: 0 0 10px #1e40af;
    }

    .welcome-content p, .motivation-content p {
      color: white;
      margin: 1rem 0;
    }

    .welcome-content button, .motivation-content button {
      background-color: #1e40af;
      color: white;
      padding: 0.5rem 1rem;
      border-radius: 0.5rem;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .welcome-content button:hover, .motivation-content button:hover {
      background-color: #facc15;
      color: #1e40af;
      box-shadow: 0 0 10px #facc15;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes pop {
      0% { transform: scale(0.5); }
      80% { transform: scale(1.1); }
      100% { transform: scale(1); }
    }

    /* تصميم أزرار المواد */
    .subject-btn {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 120px;
      height: 120px;
      background: linear-gradient(45deg, #3b82f6, #facc15);
      border-radius: 50%;
      color: white;
      font-size: 1.2rem;
      font-weight: bold;
      text-align: center;
      text-decoration: none;
      box-shadow: 0 0 15px rgba(0, 0, 255, 0.5);
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .subject-btn::before {
      content: '';
      position: absolute;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(255,255,255,0.5), transparent);
      top: -50%;
      left: -50%;
      opacity: 0;
      transition: opacity 0.5s ease;
    }

    .subject-btn:hover::before {
      opacity: 1;
    }

    .subject-btn:hover {
      transform: scale(1.1) rotate(5deg);
      box-shadow: 0 0 25px rgba(0, 0, 255, 0.8);
    }

    @media (max-width: 768px) {
      .subject-btn {
        width: 90px;
        height: 90px;
        font-size: 1rem;
      }
      h1 { font-size: 1.5rem; }
      h2 { font-size: 1.2rem; }
      h3 { font-size: 1rem; }
    }

    /* إخفاء المحتوى افتراضيًا */
    .content-section {
      display: none;
    }

    .content-section.active {
      display: block;
    }

    /* زر العودة */
    .back-btn {
      display: none;
      background-color: #1e40af;
      color: white;
      padding: 0.5rem 1rem;
      border-radius: 0.5rem;
      cursor: pointer;
      transition: all 0.3s ease;
      margin-top: 1rem;
    }

    .back-btn.active {
      display: inline-block;
    }

    .back-btn:hover {
      background-color: #facc15;
      color: #1e40af;
      box-shadow: 0 0 10px #facc15;
    }

    /* نافذة الرسائل التحفيزية */
    .motivation-list {
      max-height: 300px;
      overflow-y: auto;
      padding: 1rem;
      background-color: #161717;
      border-radius: 8px;
    }