
    .lesson-title {
      font-size: 26px;
      font-weight: bold;
      color: #154980;
      margin-bottom: 5px;
      text-transform: uppercase;
      line-height: 1.4;
    }
    
    .lesson-description {
      font-size: 15px;
      color: #333;
      margin-bottom: 20px;
    }
    
    .video-wrapper iframe,
    .video-wrapper video {
      width: 100%;
      height: 350px;
      border: none;
      margin-bottom: 20px;
    }
    
    .pdf-download {
      display: inline-block;
      padding: 10px 20px;
      background-color: #2F6B78;
      color: #000;
      border-radius: 4px;
      font-weight: 500;
      text-decoration: none;
      margin-bottom: 20px;
    }

    
    .pdf-download:hover {
      color: white;
      transform: translateY(-2px);
      box-shadow: 0 4px 10px #2F6B78;
    }
    
    .sidebar {
      margin-left: 50px;
      padding: 20px;
      background-color: #f2f2f2;
      border-left: 4px solid #2F6B78;
      /* border-bottom: 1px solid #2F6B78; */
    }
    
    .sidebar img {
      width: 100%;
      height: auto;
      border-radius: 5px;
      margin-bottom: 10px;
    }
    
    .sidebar .btn {
      margin-bottom: 10px;
      width: 100%;
    }

    /* Initially hide the test button
    {% comment %} #take-test-btn {
      display: none;
    } {% endcomment %}
     */
     
    /* Initially show the warning */
    #watch-warning {
      color: red;
      font-weight: 600;
      margin-top: 10px;
    }

    /* Modern Discussion Forum Styles */
    .forum-container {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      overflow: hidden;
    }
    
    .forum-header {
      padding: 1.5rem;
      border-bottom: 1px solid #f0f0f0;
      background: #fafafa;
    }
    
    .comment-card {
      border: none;
      border-radius: 12px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
      transition: all 0.2s ease;
      margin-bottom: 1.25rem;
    }
    
    .comment-card:hover {
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
      transform: translateY(-2px);
    }
    
    .comment-header {
      display: flex;
      align-items: center;
      margin-bottom: 0.75rem;
    }
    
    .user-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
      margin-right: 12px;
      background-color: #e9ecef;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      color: #6c757d;
    }
    
    .comment-meta {
      flex-grow: 1;
    }
    
    .comment-actions {
      display: flex;
      gap: 12px;
    }
    
    .action-btn {
      background: none;
      border: none;
      color: #6c757d;
      font-size: 0.875rem;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 4px;
      transition: all 0.2s ease;
    }
    
    .action-btn:hover {
      background: #f8f9fa;
      color: #2F6B78;
    }
    
    .replies-container {
      margin-left: 52px;
      padding-left: 1rem;
      border-left: 2px solid #e9ecef;
    }
    
    .add-comment-btn {
      background: linear-gradient(45deg, #2F6B78, #0a58ca);
      border: none;
      border-radius: 8px;
      padding: 0.5rem 1.25rem;
      font-weight: 600;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .add-comment-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
    }
    
    .empty-state {
      text-align: center;
      padding: 3rem 1rem;
      color: #6c757d;
    }
    
    .empty-state i {
      font-size: 3rem;
      margin-bottom: 1rem;
      color: #dee2e6;
    }
    
    .comment-form {
      background: #f8f9fa;
      border-radius: 12px;
      padding: 1.5rem;
      margin-top: 1.5rem;
    }
    
    .form-control:focus {
      box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    }
    
    .badge-count {
      background: #2F6B78;
      color: white;
      border-radius: 50%;
      width: 24px;
      height: 24px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      margin-left: 8px;
    }

    .breadcrumb-custom {
      background: rgba(255,255,255,0.95);
      border-radius: 10px;
      padding: 15px 20px;
      margin-bottom: 30px;
      box-shadow: 0 5px 15px rgba(0,0,0,0.05);
      border: 1px solid rgba(21, 73, 128, 0.1);
    }
    
    .breadcrumb-custom a {
      text-decoration: none;
      color: #6c757d;
      transition: color 0.3s ease;
    }
    
    .breadcrumb-custom a:hover {
      color: #154980;
    }

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary:visited {
      background-color: #2F6B78 !important;
      border-color: #154980 !important;
      box-shadow: none !important;
    }

    /* User Profile Images with Click */
    .team-box {
      background: #fff;
      border-radius: 15px;
      padding: 20px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .team-images {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 15px;
      flex-wrap: wrap;
    }

    .user-click {
      position: relative;
      display: inline-block;
      cursor: pointer;
      transition: transform 0.3s ease;
    }

    .user-click:hover {
      transform: scale(1.08);
    }

    .user-box {
      display: inline-flex;
      flex-direction: column;
      align-items: center;     /* Center the image + text */
      margin: 3px;
    }

    .user-img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 50%;      /* Make circle */
        border: 2px solid #ddd;
        padding: 3px;
        background: #fff;
    }

    .user-name {
        margin-top: 0px;
        font-size: 14px;
        font-weight: 600;
        color: #333;
        text-align: center;
    }

    .team-images img {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      object-fit: cover;
      border: 3px solid #fff;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .team-images img:hover {
      box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    }

    /* Modal Styles */
    .user-details .detail-item {
      border-bottom: 1px solid #eee;
      padding-bottom: 10px;
    }

    .user-details .detail-item:last-child {
      border-bottom: none;
    }

    #modal-user-bio {
      min-height: 80px;
      font-style: italic;
      color: #555;
    }

    .badge {
      font-size: 0.8rem;
      padding: 0.4em 0.8em;
    }

    /* Modal Gradient Background */
    .gradient-bg {
      background: linear-gradient(135deg, #2F6B78 0%, #154980 100%);
      border-bottom: none;
      padding: 1.5rem 1.5rem;
    }

    /* Modal Header Styles */
    .modal-header {
      border-radius: 12px 12px 0 0;
    }

    .modal-user-avatar img {
      width: 60px;
      height: 60px;
      object-fit: cover;
      border: 3px solid rgba(255, 255, 255, 0.3);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .modal-title {
      font-weight: 700;
      font-size: 1.4rem;
      color: white;
    }

    /* Info Sections */
    .info-section {
      padding: 1rem 0;
    }

    .section-title {
      color: #2F6B78;
      font-weight: 600;
      margin-bottom: 1.5rem;
      padding-bottom: 0.5rem;
      border-bottom: 2px solid #e9ecef;
      text-transform: uppercase;
      font-size: 0.9rem;
      letter-spacing: 0.5px;
    }

    /* Info Items */
    .info-item {
      display: flex;
      align-items: flex-start;
      margin-bottom: 1.5rem;
      padding: 0.75rem;
      border-radius: 8px;
      transition: all 0.3s ease;
      background: #f8f9fa;
    }

    .info-item:hover {
      background: #e9ecef;
      transform: translateX(5px);
    }

    .info-icon {
      width: 40px;
      height: 40px;
      background: linear-gradient(135deg, #2F6B78, #154980);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 1rem;
      flex-shrink: 0;
    }

    .info-icon i {
      color: white;
      font-size: 1rem;
    }

    .info-content label {
      display: block;
      font-size: 0.8rem;
      color: #6c757d;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 0.25rem;
    }

    .info-value {
      margin: 0;
      font-weight: 500;
      color: #2c3e50;
      font-size: 0.95rem;
    }

    /* Bio Section */
    .bio-section {
      display: flex;
      align-items: flex-start;
      padding: 1rem;
      background: #f8f9fa;
      border-radius: 10px;
      border-left: 4px solid #2F6B78;
    }

    .bio-icon {
      width: 40px;
      height: 40px;
      background: linear-gradient(135deg, #2F6B78, #154980);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 1rem;
      flex-shrink: 0;
    }

    .bio-icon i {
      color: white;
      font-size: 1.2rem;
    }

    .bio-content {
      flex: 1;
    }

    .bio-text {
      color: #495057;
      line-height: 1.6;
      font-size: 0.95rem;
      margin: 0;
      font-style: normal;
      background: white;
      padding: 1rem;
      border-radius: 8px;
      border: 1px solid #e9ecef;
      min-height: 120px;
      max-height: 200px;
      overflow-y: auto;
    }

    /* Modal Content */
    .modal-content {
      border: none;
      border-radius: 12px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
      overflow: hidden;
    }

    .modal-body {
      padding: 2rem;
    }

    /* Footer */
    .modal-footer {
      border-top: 1px solid #e9ecef;
      padding: 1rem 2rem;
    }

    .btn-outline-secondary {
      border-color: #6c757d;
      color: #6c757d;
      border-radius: 6px;
      padding: 0.5rem 1.5rem;
      transition: all 0.3s ease;
    }

    .btn-outline-secondary:hover {
      background-color: #6c757d;
      color: white;
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    /* Responsive Design */
    @media (max-width: 768px) {
      .modal-dialog {
        margin: 1rem;
      }

      .modal-body {
        padding: 1rem;
      }

      .info-item {
        flex-direction: column;
        text-align: center;
      }

      .info-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
      }

      .bio-section {
        flex-direction: column;
        text-align: center;
      }

      .bio-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
      }
    }

    /* Scrollbar styling for bio */
    .bio-text::-webkit-scrollbar {
      width: 6px;
    }

    .bio-text::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 3px;
    }

    .bio-text::-webkit-scrollbar-thumb {
      background: #2F6B78;
      border-radius: 3px;
    }

    .bio-text::-webkit-scrollbar-thumb:hover {
      background: #154980;
    }

    /* Apply new UI ONLY for is_reference == True */
    .reference-style {
        background: #f1f1f1;
        padding: 8px;
        border-radius: 8px;
        margin-bottom: 0px;
        margin-top: 0px;
    }

    /* Title small clean look */
    .reference-style h5 {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 5px;
        color: #333;
    }

    /* Blue text link for PDF / DOCX / URL */
    .reference-style a.btn,
    .reference-style a {
        background: none !important;
        padding: 0;
        border: none;
        color: #1565c0 !important;
        font-size: 15px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .reference-style a:hover {
        text-decoration: underline;
    }

    /* Small icon */
    .reference-style a i {
        font-size: 18px;
        color: #1565c0;
    }

    /* Reduce height for iframe/video in reference section */
    .reference-style iframe,
    .reference-style video {
        height: 200px !important;
        border-radius: 6px;
    }

    /* Heading style */
    .mb-5 h3 {
        display: flex;
        align-items: center;
        font-size: 17px;
        font-weight: bold;
    }

    .mb-5 h3::before {
        content: "⤵ ";
        font-size: 20px;
        color: #4caf50;
        margin-right: 5px;
    }

    .ref-header {
        background: #e9e9e9;
        padding: 10px 10px;
        border-radius: 3px;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
    }

    .ref-header img {
        width: 28px;
        height: 28px;
        display: block; 
        margin-bottom: 0;
        margin-right: 0;
        margin-left: 0;
    }

    .ref-content {
        /* display: none;*/
        margin-top: 15px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .ref-content.open {
        max-height: 1000px;   /* enough space for content */
    }

    .ref-header strong {
        line-height: 1; 
        display: flex;
        align-items: center;  
        margin-right: 0;
        margin-left: 0;
        font-size: 15px;
        font-weight: 500;
        color: #333;
    }

