/* =======================
   GLOBAL
======================= */
body {
    background: #f5f6fa;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
}

a {
    text-decoration: none;
}

html {
    overflow-y: scroll;
}

/* =======================
   SUMMARY CARD
======================= */
.summary-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.summary-card h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.summary-card p.text-muted {
    margin-bottom: 0.75rem;
}

.summary-card .alert {
    margin-top: 18px;
}

/* =======================
   BREADCRUMB
======================= */
.breadcrumb {
    flex-wrap: wrap;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    margin: 0 6px;
    color: #888;
}

/* =======================
   CREATOR & AVATAR
======================= */
.creator-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.creator-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* =======================
   STAT BOX
======================= */
.stat-box {
    display: flex;
    gap: 20px;
    margin: 12px 0;
    color: #666;
}

.stat-box i {
    margin-right: 6px;
}

/* =======================
   BADGES
======================= */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
    margin: 0 6px 6px 0;
    font-weight: 500;
}

.badge-level { background: #e0f7ff; color: #1c7ed6; }
.badge-format { background: #f1eaff; color: #845ef7; }
.badge-category { background: #fff3bf; color: #fcc419; }

/* =======================
   BUTTONS
======================= */
.btn-main {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.btn-main a {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-weight: 500;
    color: #fff !important;
    text-align: center;
}

.btn-remember { background: #7a4bff; }
/* .btn-start { background: #4c6ef5; } */
.btn-download { background: #2f9e44; }

.btn-share {
    background: linear-gradient(90deg, #4e8cff, #c154ff);
    color: #fff !important;
    padding: 10px;
    border-radius: 8px;
    border: none;
    width: 100%;
    margin-bottom: 10px;
    font-weight: 500;
}

/* =======================
   SOCIAL ICON
======================= */
.share-div {
    padding-left: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.social-icon:hover {
    background: #e4e4e4;
    transform: scale(1.1);
}

/* =======================
   RELATED / HOT QUIZZES
======================= */
.related-div .marker {
    width: 6px;
    height: 22px;
    border-radius: 4px;
    margin-right: 8px;
    display: inline-block;
    background: #4c6ef5;
}

.related-div h4 { margin: 0; }
.related-div p { margin-bottom: 1rem; }

/* =======================
   QUIZ CARD
======================= */
.quiz-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.quiz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.quiz-card img {
    width: 100%;
    border-radius: 8px;
}

.quiz-title {
    font-weight: 600;
    margin-top: 8px;
    font-size: 0.95rem;
}

/* =======================
   AVATAR PRO
======================= */
.avatar-pro {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    padding: 2px;
    background: linear-gradient(135deg, #4c6ef5, #c154ff);
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

/* =======================
   MARKER COLORS
======================= */
.marker-green { background: linear-gradient(180deg, #4cd964, #34c759); }
.marker-red { background: linear-gradient(180deg, #ff6b6b, #ff4757); }
.marker-blue { background: linear-gradient(180deg, #4e8cff, #6678ff); }

/* =======================
   MODAL ANIMATION
======================= */
.modal-animate {
    transform: scale(0.8);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal.show .modal-animate {
    transform: scale(1);
}

/* =======================
   MEDIA QUERIES
======================= */
@media (max-width: 768px) {
    .share-div { padding-left: 0; margin-top: 20px; }
}

@media (max-width: 576px) {
    .summary-card { padding: 18px; }
    .stat-box { gap: 14px; flex-wrap: wrap; }
    .btn-main { flex-direction: column; }
    .btn-main a { width: 100%; }
    .social-icon { width: 34px; height: 34px; }
    .creator-avatar { width: 28px; height: 28px; }
    .quiz-card { padding: 10px; }
}

/* =======================
   MODAL OPEN OVERRIDE
======================= */
body.modal-open {
    padding-right: 0 !important;
}

.truncate-multi {
   display: -webkit-box;        /* cũ: WebKit */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;       /* cũ: WebKit */

  display: box;                /* chuẩn cũ (Firefox cũ) */
  box-orient: vertical;

  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;

  /* Chuẩn CSS mới (line-clamp) */
  line-clamp: 2;               /* future-proof */
}
