/* * Styles dành cho giao diện Frontend
 */
.skool-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.skool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.skool-user-info { display: flex; align-items: center; gap: 15px; }
.skool-user-info img { border-radius: 50%; }
.skool-level-badge { font-size: 12px; color: #666; background: #f3f4f6; padding: 4px 8px; border-radius: 12px; margin-top: 4px; display: inline-block; }

.skool-create-post { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.skool-input, .skool-textarea { width: 100%; border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px; margin-bottom: 10px; font-family: inherit; }
.skool-textarea { resize: vertical; }
.skool-btn-submit { background: #2563eb; color: #fff; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.skool-btn-submit:hover { background: #1d4ed8; }

.skool-post-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.skool-post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.skool-post-header img { border-radius: 50%; }
.skool-post-meta strong { display: block; color: #111; }
.skool-post-meta span { font-size: 12px; color: #6b7280; }
.skool-post-title { margin: 0 0 10px 0; font-size: 18px; color: #1f2937; }
.skool-post-content { color: #4b5563; line-height: 1.5; margin-bottom: 15px; }

.skool-post-actions { display: flex; gap: 15px; border-top: 1px solid #e5e7eb; padding-top: 15px; }
.skool-btn-like, .skool-btn-comment { background: none; border: none; color: #6b7280; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 5px; text-decoration: none; padding: 5px 10px; border-radius: 4px; }
.skool-btn-like:hover, .skool-btn-comment:hover { background: #f3f4f6; color: #111; }
.skool-btn-like.liked { color: #ef4444; font-weight: bold; }

/* * Styles cho Leaderboard
 */
.skool-leaderboard-container { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px; }
.skool-leaderboard-title { margin: 0 0 15px 0; font-size: 18px; color: #1f2937; text-align: center; border-bottom: 1px solid #e5e7eb; padding-bottom: 10px; }
.skool-leaderboard-list { list-style: none; padding: 0; margin: 0; }
.skool-leaderboard-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #e5e7eb; }
.skool-leaderboard-item:last-child { border-bottom: none; }
.skool-lb-rank { font-weight: bold; color: #6b7280; width: 30px; }
.skool-lb-user { display: flex; align-items: center; gap: 10px; flex: 1; }
.skool-lb-user img { border-radius: 50%; }
.skool-lb-name { font-weight: 500; color: #111; }
.skool-lb-points { font-weight: bold; color: #2563eb; background: #eff6ff; padding: 4px 8px; border-radius: 12px; font-size: 13px; }

.skool-leaderboard-item.top-1 .skool-lb-rank { color: #fbbf24; font-size: 18px; }
.skool-leaderboard-item.top-2 .skool-lb-rank { color: #9ca3af; font-size: 16px; }
.skool-leaderboard-item.top-3 .skool-lb-rank { color: #b45309; font-size: 16px; }

/* * Styles cho Không gian Khóa học (Classroom)
 */
.skool-classroom-container { max-width: 1000px; margin: 0 auto; }
.skool-classroom-header { text-align: center; margin-bottom: 30px; }
.skool-classroom-header h2 { font-size: 24px; color: #111; margin-bottom: 5px; }
.skool-classroom-header p { color: #6b7280; margin: 0; }
.skool-courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.skool-course-card { background: #fff; border-radius: 12px; overflow: hidden; text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s; display: block; border: 1px solid #e5e7eb; }
.skool-course-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.skool-course-thumbnail { height: 160px; background-size: cover; background-position: center; border-bottom: 1px solid #f3f4f6; }
.skool-course-info { padding: 15px; }
.skool-course-title { margin: 0 0 10px 0; font-size: 16px; color: #1f2937; line-height: 1.4; }
.skool-course-meta { font-size: 12px; color: #9ca3af; margin-bottom: 15px; }
.skool-progress-bar { width: 100%; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin-bottom: 5px; }
.skool-progress-fill { height: 100%; background: #2563eb; border-radius: 3px; }
.skool-progress-text { font-size: 11px; color: #6b7280; }

.skool-single-course-container { max-width: 800px; margin: 0 auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 30px; }
.skool-course-header-banner { border-bottom: 1px solid #e5e7eb; padding-bottom: 20px; margin-bottom: 20px; }
.skool-course-header-banner h2 { font-size: 28px; color: #111; margin-top: 0; }
.skool-lesson-list { list-style: none; padding: 0; margin: 0; }
.skool-lesson-link { display: flex; align-items: center; padding: 15px; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 10px; text-decoration: none; color: #374151; transition: all 0.2s; }
.skool-lesson-link:hover { background: #f9fafb; border-color: #d1d5db; }
.skool-lesson-number { width: 30px; height: 30px; background: #eff6ff; color: #2563eb; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; margin-right: 15px; }
.skool-lesson-title { flex: 1; font-weight: 500; }
.skool-lesson-arrow { color: #9ca3af; font-size: 12px; }

.skool-lesson-layout { display: flex; gap: 30px; max-width: 1100px; margin: 0 auto; align-items: flex-start; }
@media (max-width: 768px) { .skool-lesson-layout { flex-direction: column; } }
.skool-lesson-sidebar { width: 300px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); flex-shrink: 0; }
@media (max-width: 768px) { .skool-lesson-sidebar { width: 100%; } }
.skool-sidebar-header { padding: 20px; border-bottom: 1px solid #e5e7eb; }
.skool-back-link { display: inline-block; font-size: 13px; color: #6b7280; text-decoration: none; margin-bottom: 10px; }
.skool-back-link:hover { color: #2563eb; }
.skool-sidebar-header h4 { margin: 0; font-size: 16px; color: #111; }
.skool-sidebar-nav { list-style: none; padding: 0; margin: 0; }
.skool-sidebar-nav li { border-bottom: 1px solid #f3f4f6; }
.skool-sidebar-nav li:last-child { border-bottom: none; }
.skool-sidebar-nav a { display: block; padding: 15px 20px; text-decoration: none; color: #4b5563; transition: background 0.2s; }
.skool-sidebar-nav a:hover { background: #f9fafb; }
.skool-sidebar-nav li.active a { background: #eff6ff; color: #2563eb; font-weight: 600; border-left: 3px solid #2563eb; }

.skool-lesson-content { flex: 1; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.skool-lesson-headline { margin-top: 0; font-size: 24px; color: #1f2937; border-bottom: 1px solid #e5e7eb; padding-bottom: 15px; margin-bottom: 20px; }
.skool-lesson-body { line-height: 1.6; color: #374151; }
.skool-lesson-body iframe { max-width: 100%; border-radius: 8px; margin-bottom: 20px; }
.skool-lesson-actions { margin-top: 30px; border-top: 1px solid #e5e7eb; padding-top: 20px; text-align: right; }
.skool-btn-complete { background: #10b981; color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background 0.2s; }
.skool-btn-complete:hover { background: #059669; }

.skool-calendar-container { max-width: 800px; margin: 0 auto; }
.skool-calendar-header { margin-bottom: 25px; border-bottom: 1px solid #e5e7eb; padding-bottom: 15px; }
.skool-calendar-header h2 { margin: 0 0 5px 0; font-size: 24px; color: #111; }
.skool-calendar-header p { margin: 0; color: #6b7280; }
.skool-event-card { display: flex; align-items: center; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 15px; border-left: 4px solid #2563eb; transition: transform 0.2s; }
.skool-event-card:hover { transform: translateX(5px); }
@media (max-width: 600px) { .skool-event-card { flex-direction: column; align-items: flex-start; gap: 15px; } }
.skool-event-date-box { text-align: center; min-width: 70px; padding-right: 20px; border-right: 1px solid #e5e7eb; margin-right: 20px; }
@media (max-width: 600px) { .skool-event-date-box { border-right: none; padding-right: 0; margin-right: 0; border-bottom: 1px solid #e5e7eb; padding-bottom: 10px; width: 100%; text-align: left; display: flex; gap: 10px; align-items: baseline; } }
.skool-event-month { font-size: 13px; color: #ef4444; font-weight: bold; text-transform: uppercase; }
.skool-event-day { font-size: 26px; font-weight: bold; color: #111; line-height: 1.1; }
.skool-event-info { flex: 1; }
.skool-event-title { margin: 0 0 8px 0; font-size: 18px; color: #1f2937; }
.skool-event-time { font-size: 14px; color: #6b7280; display: flex; align-items: center; }
.skool-event-action { margin-left: 20px; flex-shrink: 0; }
@media (max-width: 600px) { .skool-event-action { margin-left: 0; width: 100%; } .skool-event-action .skool-btn-join { display: block; text-align: center; } }
.skool-btn-join { background: #2563eb; color: #fff; padding: 10px 20px; border-radius: 6px; text-decoration: none; font-weight: 500; font-size: 14px; transition: background 0.2s; display: inline-block; }
.skool-btn-join:hover { background: #1d4ed8; color: #fff; }

.skool-profile-container { max-width: 600px; margin: 0 auto 30px; background: #fff; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); overflow: hidden; text-align: center; border: 1px solid #e5e7eb; }
.skool-profile-cover { height: 120px; background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%); }
.skool-profile-content { padding: 0 30px 30px; }
.skool-profile-avatar-wrap { margin-top: -60px; margin-bottom: 15px; }
.skool-profile-avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1); object-fit: cover; }
.skool-profile-name { margin: 0 0 10px 0; font-size: 24px; color: #111; }
.skool-profile-badges { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.skool-badge-level { background: #fef08a; color: #854d0e; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; }
.skool-badge-points { background: #eff6ff; color: #1d4ed8; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; }
.skool-profile-bio { color: #4b5563; line-height: 1.6; margin-bottom: 20px; font-size: 15px; }
.skool-text-muted { color: #9ca3af; font-style: italic; }
.skool-profile-social { margin-bottom: 25px; }
.skool-btn-social { background: #f3f4f6; color: #374151; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; display: inline-block; }
.skool-btn-social:hover { background: #e5e7eb; color: #111; }
.skool-profile-stats { border-top: 1px solid #f3f4f6; padding-top: 20px; display: flex; justify-content: center; }
.skool-stat-box { display: flex; flex-direction: column; padding: 0 15px; }
.skool-stat-box strong { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; }
.skool-stat-box span { font-size: 16px; color: #111; font-weight: 500; margin-top: 5px; }

.skool-members-container { max-width: 1000px; margin: 0 auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.skool-members-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid #e5e7eb; padding-bottom: 20px; }
@media (max-width: 768px) { .skool-members-header { flex-direction: column; align-items: flex-start; gap: 15px; } .skool-search-form { width: 100%; } .skool-search-input { flex: 1; } }
.skool-members-header h2 { margin: 0; font-size: 22px; color: #111; }
.skool-search-form { display: flex; gap: 10px; }
.skool-search-input { padding: 10px 15px; border: 1px solid #d1d5db; border-radius: 6px; outline: none; min-width: 250px; font-size: 14px; }
.skool-btn-search { background: #2563eb; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.skool-btn-search:hover { background: #1d4ed8; }

.skool-members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.skool-member-card { display: flex; align-items: center; gap: 15px; padding: 15px; border: 1px solid #f3f4f6; border-radius: 8px; transition: all 0.2s; background: #fafafa; }
.skool-member-card:hover { background: #fff; border-color: #d1d5db; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transform: translateY(-2px); }
.skool-member-avatar img { border-radius: 50%; display: block; }
.skool-member-info h4 { margin: 0 0 5px 0; color: #1f2937; font-size: 16px; }
.skool-member-level { font-size: 12px; color: #6b7280; background: #e5e7eb; padding: 4px 10px; border-radius: 12px; display: inline-block; }


/* =======================================================
   === CSS MỚI: DÀNH CHO BÌNH LUẬN ĐA TẦNG VÀ MODAL ===
   ======================================================= */

.skool-comment-wrapper { margin-bottom: 12px; }
.skool-comment-item-v2 { display: flex; gap: 12px; }
.skool-comment-avatar-col img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover;}
.skool-comment-content-col { flex: 1; }

.skool-comment-bubble { 
    background: #f3f4f6; 
    padding: 10px 14px; 
    border-radius: 12px; 
    border-top-left-radius: 2px;
}
.skool-comment-author-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.skool-comment-author-row strong { font-size: 14px; color: #111827; }
.skool-comment-lv { background: #fef08a; color: #854d0e; font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: bold; }
.skool-comment-date { font-size: 12px; color: #6b7280; }
.skool-comment-text { font-size: 14px; color: #374151; line-height: 1.4; }
.skool-comment-text p { margin: 0; }

.skool-comment-actions { display: flex; gap: 16px; margin-top: 6px; padding-left: 4px; }
.skool-btn-comment-like, .skool-btn-comment-reply { 
    background: none; border: none; font-size: 12px; font-weight: 600; color: #6b7280; cursor: pointer; padding: 0;
}
.skool-btn-comment-like:hover, .skool-btn-comment-reply:hover { color: #111827; }
.skool-btn-comment-like.liked { color: #2563eb; }

/* Form trả lời nhanh (nằm ngay dưới bình luận) */
.skool-reply-form-inner { margin-top: 10px; background: #fff; border: 1px solid #e5e7eb; padding: 8px; border-radius: 8px; }
.skool-reply-input { width: 100%; border: none; outline: none; font-size: 14px; padding: 4px; }
.skool-reply-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.skool-btn-reply-cancel { background: none; border: none; font-size: 12px; color: #6b7280; cursor: pointer; font-weight: 600;}
.skool-btn-reply-submit { background: #111827; color: #fff; border: none; padding: 4px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; font-weight: 600;}

/* Trạng thái tải bình luận */
.skool-loading { text-align: center; padding: 40px 0; color: #6b7280; font-style: italic; }

/* Thụt lề khi hiển thị trên Mobile (Responsive) */
@media (max-width: 600px) {
    .skool-comment-wrapper { margin-left: 20px !important; } 
}