/**
 * Programming Quiz – Dynamic Duniya design
 * Colors: #14344d, linear-gradient(135deg, #4caf50, #2196f3), #fe0046 | Fonts: Georgia, Roboto
 */

/* Quiz – keyframe animations (site colors) */
@keyframes quiz-progress-glow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.3);
    }

    50% {
        opacity: 0.95;
        box-shadow: 0 0 12px 2px rgba(33, 150, 243, 0.25);
    }
}

@keyframes quiz-card-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes quiz-option-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(20, 52, 77, 0.08);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(20, 52, 77, 0.04);
    }
}

@keyframes quiz-btn-gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes quiz-info-border {

    0%,
    100% {
        border-left-color: #2196f3;
    }

    50% {
        border-left-color: #4caf50;
    }
}

/* Quiz index – guest & personalized cards */
.guest-quiz-card,
.quiz-index-card {
    background: #fff;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(20, 52, 77, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.guest-quiz-card:hover,
.quiz-index-card:hover {
    box-shadow: 0 12px 28px rgba(20, 52, 77, 0.12);
    transform: translateY(-2px);
}

.guest-quiz-card .card-header,
.quiz-index-card .card-header {
    background: linear-gradient(135deg, #14344d 0%, #1a4060 100%) !important;
    border: none;
}

.quiz-index-card__title .fa-user-circle {
    font-size: 1.4em;
    vertical-align: middle;
}

.guest-quiz-card .card-body {
    font-family: 'Georgia', serif;
    color: #505050;
}

.guest-quiz-label {
    display: block;
    font-weight: 600;
    color: #14344d;
    margin-bottom: 10px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
}

.guest-lang-select {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 10px 14px;
    color: #333;
}

.guest-difficulty-boxes {
    display: flex;
    flex-wrap: wrap;
}

.guest-diff-box {
    display: block;
    cursor: pointer;
    text-align: center;
    padding: 10px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.guest-diff-box:hover {
    border-color: #5A9AFC;
    background: #f8faff;
}

.guest-diff-box--active {
    border-color: #5A9AFC;
    background: #e8f0fe;
    box-shadow: 0 2px 8px rgba(90, 154, 252, 0.25);
}

.guest-diff-box__icon {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.guest-diff-box__name {
    display: block;
    font-weight: 600;
    color: #14344d;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

.guest-diff-box__hint {
    display: block;
    font-size: 10px;
    color: #626262;
    margin-top: 2px;
}

.guest-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.guest-cat-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 24px;
    border: 2px solid #e0e0e0;
    background: #fafafa;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.guest-cat-chip:hover {
    border-color: #5A9AFC;
    background: #f8faff;
}

.guest-cat-chip__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.guest-cat-chip__input:checked+.guest-cat-chip__label {
    font-weight: 600;
    color: #14344d;
}

.guest-cat-chip.guest-cat-chip--active {
    border-color: #5A9AFC;
    background: #e8f0fe;
    box-shadow: 0 2px 6px rgba(90, 154, 252, 0.2);
}

.guest-cat-chip__label {
    font-size: 14px;
    color: #505050;
}

.guest-quiz-submit {
    background-color: #5A9AFC;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.guest-quiz-submit:hover {
    background-color: #FF5733;
    color: #fff;
}

.quiz-last-attempt-card {
    background: #fff;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #5A9AFC;
}

.quiz-last-attempt-card .card-title {
    color: #14344d;
    font-family: 'Roboto', sans-serif;
}

.quiz-last-attempt-card a {
    color: #5A9AFC;
}

.quiz-last-attempt-card a:hover {
    color: #fe0046;
}

/* Personalized quiz */
.quiz-index-card .card-body {
    font-family: 'Georgia', serif;
    color: #505050;
    padding: 1.5rem 2rem !important;
}

.personal-quiz-label {
    display: block;
    font-weight: 600;
    color: #14344d;
    margin-bottom: 10px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
}

.personal-diff-box {
    display: block;
    cursor: pointer;
    text-align: center;
    padding: 10px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.personal-diff-box:hover {
    border-color: #5A9AFC;
    background: #f8faff;
}

.personal-diff-box.personal-diff-box--active {
    border-color: #5A9AFC;
    background: #e8f0fe;
    box-shadow: 0 2px 8px rgba(90, 154, 252, 0.25);
}

.personal-diff-box__icon {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.personal-diff-box__name {
    display: block;
    font-weight: 600;
    color: #14344d;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

.personal-diff-box__hint {
    display: block;
    font-size: 10px;
    color: #626262;
    margin-top: 2px;
}

.personal-lang-chip,
.personal-cat-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 24px;
    border: 2px solid #e0e0e0;
    background: #fafafa;
    transition: border-color 0.3s ease, background 0.3s ease;
    margin: 4px;
}

.personal-lang-chip:hover,
.personal-cat-chip:hover {
    border-color: #5A9AFC;
    background: #f8faff;
}

.personal-lang-chip input,
.personal-cat-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.personal-lang-chip.personal-chip--active,
.personal-cat-chip.personal-chip--active {
    border-color: #5A9AFC;
    background: #e8f0fe;
    box-shadow: 0 2px 6px rgba(90, 154, 252, 0.2);
}

.personal-count-row {
    flex-wrap: nowrap;
}

.personal-count-row .col {
    min-width: 0;
}

.personal-count-box {
    display: block;
    cursor: pointer;
    text-align: center;
    padding: 16px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.personal-count-box:hover {
    border-color: #5A9AFC;
    background: #f8faff;
}

.personal-count-box.personal-count-box--active {
    border-color: #5A9AFC;
    background: #e8f0fe;
    box-shadow: 0 2px 8px rgba(90, 154, 252, 0.25);
}

.personal-count-box__num {
    font-weight: 700;
    color: #14344d;
    font-size: 1.25rem;
    font-family: 'Roboto', sans-serif;
}

@media (max-width: 575.98px) {
    .personal-count-row .personal-count-box {
        padding: 10px 6px;
    }

    .personal-count-row .personal-count-box__num {
        font-size: 1rem;
    }

    .personal-count-row .personal-count-box .small {
        font-size: 0.7rem;
    }
}

.personal-quiz-submit {
    background-color: #72cc52;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 24px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.personal-quiz-submit:hover {
    background-color: #5ab845;
    color: #fff;
}

/* Quiz play – layout and left column (equal height with right card) */
.quiz-play-page {
    padding-bottom: 2rem;
}

.quiz-play-row .quiz-play-aside-col {
    display: flex;
    flex-direction: column;
}

.quiz-play-aside-col {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 1.25rem;
}

@media (min-width: 992px) {
    .quiz-play-aside-col {
        padding: 1.5rem;
    }
}

.quiz-info-card {
    position: sticky;
    top: 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem 1.5rem 1.5rem;
    border-left: 4px solid #2196f3;
    animation: quiz-info-border 4s ease-in-out infinite;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.quiz-info-card__title {
    margin: 0 0 1.25rem 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #14344d;
}

.quiz-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.quiz-info-list__item {
    padding: 0.65rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quiz-info-list__item:last-of-type {
    border-bottom: none;
}

/* Quiz info card – compact grid: row1 = Languages + Difficulty, row2 = Categories */
.quiz-info-card__grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.quiz-info-card__row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.quiz-info-card__row:last-child {
    border-bottom: none;
}

.quiz-info-card__cell {
    flex: 1;
    min-width: 0;
}

.quiz-info-card__cell--full {
    flex: 1 1 100%;
}

.quiz-info-card__cell .quiz-info-list__label,
.quiz-info-card__cell .quiz-info-list__val {
    display: block;
}

.quiz-info-list__label {
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
}

.quiz-info-list__val {
    font-family: 'Roboto', sans-serif;
    font-size: 1.05rem;
    color: #333;
    line-height: 1.5;
}

.quiz-info-card__meta {
    margin: 1rem 0 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #888;
}

.quiz-info-card__login-benefits {
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.quiz-info-card__benefits-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #14344d;
    margin: 0 0 0.75rem 0;
}

.quiz-info-card__benefits-list {
    margin: 0 0 0 1.1rem;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    color: #505050;
    line-height: 1.6;
}

.quiz-info-card__benefits-list li {
    font-family: 'Roboto', sans-serif;
    margin-bottom: 0.4rem;
}

.quiz-info-card__benefits-list li:last-child {
    margin-bottom: 0;
}

/* Quiz play – right column (min height ~4 options so buttons stay put) */
.quiz-play-row .col-lg-8 {
    display: flex;
    flex-direction: column;
}

.quiz-play-wrapper {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Min height ≈ header + question + 4 options + nav – keeps layout stable, card can grow if more options */
.quiz-play-card--dd {
    background: #fff;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(20, 52, 77, 0.08);
    animation: quiz-card-in 0.45s ease-out;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

@media (min-width: 768px) {
    .quiz-play-card--dd {
        min-height: 460px;
    }
}

@media (min-width: 992px) {
    .quiz-play-card--dd {
        min-height: 480px;
    }
}

.quiz-play-card--dd .quiz-play-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding-bottom: 1.5rem;
    overflow: hidden;
}

.quiz-play-card--dd .quiz-play-card__header {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.quiz-play-card--dd .quiz-play-card__content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.quiz-play-card--dd .quiz-play-nav {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.quiz-play-card--dd .quiz-play-header {
    display: block;
}

.quiz-play-card--dd .quiz-play-progress {
    width: 100%;
    height: 10px;
    background: rgba(20, 52, 77, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.quiz-play-card--dd .quiz-play-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #4caf50, #2196f3);
    background-size: 200% 200%;
    border-radius: 6px;
    transition: width 0.4s ease;
    animation: quiz-progress-glow 2.5s ease-in-out infinite;
}

.quiz-play-card--dd .quiz-play-title {
    font-family: 'Roboto', sans-serif;
    color: #14344d;
    font-weight: 600;
}

.quiz-play-card--dd .quiz-play-question-text {
    font-family: 'Georgia', serif;
    color: #505050;
    font-size: 1.1rem;
    line-height: 1.7;
}

.quiz-play-card--dd .quiz-play-hint {
    color: #626262;
}

/* Question image – large and readable */
.quiz-play-question-img {
    max-height: 420px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(20, 52, 77, 0.12);
    display: block;
}

@media (min-width: 768px) {
    .quiz-play-question-img {
        max-height: 480px;
    }
}

/* Option image – clearly readable in option row */
.quiz-play-option-img {
    max-height: 200px;
    max-width: 100%;
    min-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(20, 52, 77, 0.1);
    display: block;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .quiz-play-option-img {
        max-height: 260px;
        max-width: 360px;
    }
}

.quiz-play-card--dd .quiz-play-option {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.quiz-play-card--dd .quiz-play-option:hover {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.06);
    animation: quiz-option-pulse 1.5s ease-in-out infinite;
}

.quiz-play-card--dd .quiz-play-option-input:checked~.quiz-play-option-label {
    font-weight: 600;
    color: #14344d;
}

.quiz-play-card--dd .quiz-play-option--checked,
.quiz-play-card--dd .quiz-play-option:has(.quiz-play-option-input:checked) {
    border-color: #2196f3;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08), rgba(33, 150, 243, 0.08));
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.12);
}

.quiz-play-card--dd .quiz-play-option-label {
    font-family: 'Georgia', serif;
    color: #505050;
    cursor: pointer;
}

.quiz-play-card--dd .quiz-play-select-all {
    background: #fff;
    color: #2196f3;
    border: 1px solid #2196f3;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    transition: all 0.3s ease;
}

.quiz-play-card--dd .quiz-play-select-all:hover {
    background: linear-gradient(135deg, #4caf50, #2196f3);
    color: #fff;
    border-color: transparent;
}

.quiz-play-card--dd .quiz-play-btn-prev,
.quiz-play-card--dd .quiz-play-btn-next {
    background: #fff;
    color: #14344d;
    border: 2px solid #14344d;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.quiz-play-card--dd .quiz-play-btn-prev:hover:not(:disabled),
.quiz-play-card--dd .quiz-play-btn-next:hover {
    background: #14344d;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 52, 77, 0.25);
}

.quiz-play-card--dd .quiz-play-btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-play-card--dd .quiz-play-btn-submit {
    background: linear-gradient(135deg, #4caf50, #2196f3);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.3s ease;
}

.quiz-play-card--dd .quiz-play-btn-submit:hover {
    background-position: 100% 50%;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.35);
    transform: translateY(-1px);
}

.quiz-play-card--dd .quiz-play-empty {
    color: #505050;
}

.quiz-play-card--dd .quiz-play-empty a {
    color: #2196f3;
}

.quiz-play-card--dd .quiz-play-empty a:hover {
    color: #fe0046;
}

/* Quiz play – report question */
.quiz-play-report-col {
    flex-shrink: 0;
}

.quiz-play-report-btn {
    color: #fe0046;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    background: none;
}

.quiz-play-report-btn:hover {
    color: #14344d;
    text-decoration: underline;
}

.quiz-play-report-guest {
    font-size: 0.8rem;
    max-width: 180px;
}

.quiz-play-report-guest a {
    color: #2196f3;
}

.quiz-report-alert {
    margin-bottom: 1rem;
}

.quiz-report-modal-backdrop {
    z-index: 1050;
}

.quiz-report-modal .modal-header {
    border-bottom: 1px solid #eee;
}

.quiz-report-modal .modal-footer {
    border-top: 1px solid #eee;
}

/* Quiz result page */
.quiz-result-card {
    background: #fff;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(20, 52, 77, 0.08);
    overflow: hidden;
    animation: quiz-card-in 0.5s ease-out;
}

.quiz-result-card .card-header {
    border: none;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
}

.quiz-result-card .card-header.quiz-result-passed {
    background: linear-gradient(135deg, #4caf50, #43a047) !important;
}

.quiz-result-card .card-header.quiz-result-failed {
    background: linear-gradient(135deg, #14344d, #fe0046) !important;
}

.quiz-result-card .card-header h4 .fa,
.quiz-result-card .card-header h4 i[class*="fa-"] {
    font-size: 1.35em !important;
    vertical-align: middle;
}

.quiz-result-card .card-body {
    font-family: 'Georgia', serif;
    color: #505050;
}

/* Result screen – pass/fail icons (override global .fa font-size from style.css) */
.quiz-result-icon {
    font-size: 5rem;
    line-height: 1;
}

.quiz-result-card .quiz-result-icon .fa,
.quiz-result-card .quiz-result-icon i[class*="fa-"] {
    font-size: inherit !important;
}

@media (min-width: 576px) {
    .quiz-result-icon {
        font-size: 6rem;
    }
}

@media (min-width: 768px) {
    .quiz-result-icon {
        font-size: 7rem;
    }
}

.quiz-result-icon--pass {
    color: #4caf50;
    text-shadow: 0 2px 8px rgba(76, 175, 80, 0.35);
}

.quiz-result-icon--fail {
    color: #fe0046;
    text-shadow: 0 2px 8px rgba(254, 0, 70, 0.25);
}

.quiz-result-score {
    font-family: 'Roboto', sans-serif;
    color: #14344d;
    font-size: 1.5rem;
}

.quiz-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.quiz-result-actions__form {
    display: inline-flex;
}

.quiz-result-actions .btn,
.quiz-result-actions .quiz-result-actions__form .btn {
    background: linear-gradient(135deg, #4caf50, #2196f3);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    padding: 10px 20px;
    margin: 0;
    transition: all 0.3s ease;
}

.quiz-result-actions .btn:hover,
.quiz-result-actions .quiz-result-actions__form .btn:hover {
    box-shadow: 0 4px 14px rgba(33, 150, 243, 0.4);
    transform: translateY(-1px);
}

.quiz-result-actions .btn-reattempt {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.quiz-result-actions .btn-reattempt:hover {
    box-shadow: 0 4px 14px rgba(33, 150, 243, 0.4);
}

.quiz-result-actions .btn-outline-dd {
    background: transparent;
    color: #2196f3;
    border: 2px solid #2196f3;
    transition: all 0.3s ease;
}

.quiz-result-actions .btn-outline-dd:hover {
    background: #2196f3;
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 575.98px) {
    .quiz-result-actions {
        gap: 10px;
    }

    .quiz-result-actions .btn,
    .quiz-result-actions .quiz-result-actions__form .btn {
        min-width: 0;
        width: 100%;
    }

    .quiz-result-actions__form {
        width: 100%;
    }

    .quiz-result-actions__form .btn {
        width: 100%;
    }
}

/* Quiz attempt history – listing */
.quiz-history-table {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.quiz-history-table thead tr {
    background-color: #14344d;
    color: #fff;
    font-family: 'Roboto', sans-serif;
}

.quiz-history-table thead th {
    border: none;
    padding: 14px 16px;
    font-weight: 600;
}

.quiz-history-table tbody tr {
    transition: background 0.2s;
}

.quiz-history-table tbody tr:hover {
    background: #f8faff;
}

.quiz-history-table tbody td {
    padding: 12px 16px;
    color: #505050;
    font-family: 'Georgia', serif;
    vertical-align: middle !important;
}

.quiz-history-table .badge-passed {
    background-color: #72cc52;
    color: #fff;
}

.quiz-history-table .badge-failed {
    background-color: #fe0046;
    color: #fff;
}

.quiz-history-table .btn-view {
    background: #5A9AFC;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

.quiz-history-table .btn-view:hover {
    background: #FF5733;
    color: #fff;
}

/* Quiz attempt detail – history show (hero summary line) */
.quiz-attempt-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    line-height: 1.4;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.quiz-attempt-hero__date {
    color: #555;
    font-weight: 500;
}

.quiz-attempt-hero__score {
    color: #14344d;
    font-weight: 600;
}

.quiz-attempt-hero__score strong {
    font-weight: 700;
}

.quiz-attempt-hero__pct {
    font-weight: 500;
    opacity: 0.95;
    margin-left: 0.15em;
}

.quiz-attempt-hero__badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.quiz-attempt-hero--passed {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(67, 160, 71, 0.08));
    border-left: 4px solid #4caf50;
}

.quiz-attempt-hero--passed .quiz-attempt-hero__badge {
    background: #4caf50;
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.35);
}

.quiz-attempt-hero--failed {
    background: linear-gradient(135deg, rgba(254, 0, 70, 0.08), rgba(220, 0, 60, 0.06));
    border-left: 4px solid #fe0046;
}

.quiz-attempt-hero--failed .quiz-attempt-hero__badge {
    background: #fe0046;
    color: #fff;
    box-shadow: 0 2px 8px rgba(254, 0, 70, 0.3);
}

@media (min-width: 576px) {
    .quiz-attempt-hero {
        font-size: 1.2rem;
        padding: 1.35rem 1.75rem;
    }

    .quiz-attempt-hero__badge {
        font-size: 1.05rem;
        padding: 0.5rem 1.15rem;
    }
}

.quiz-detail-card {
    background: #fff;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1rem;
}

.quiz-detail-card .card-header {
    background-color: #14344d;
    color: #fff;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    padding: 12px 20px;
}

.quiz-detail-card .card-body {
    padding: 20px;
    font-family: 'Georgia', serif;
    color: #505050;
}

.quiz-detail-card dt {
    color: #14344d;
    font-family: 'Roboto', sans-serif;
}

.quiz-answer-card {
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid;
    transition: box-shadow 0.2s;
}

.quiz-answer-card.quiz-answer-correct {
    border-color: #72cc52;
    background: #f8fff8;
}

.quiz-answer-card.quiz-answer-incorrect {
    border-color: #fe0046;
    background: #fff8f8;
}

.quiz-answer-card .card-body {
    padding: 16px;
}

.quiz-answer-card .badge-correct {
    background: #72cc52;
    color: #fff;
}

.quiz-answer-card .badge-incorrect {
    background: #fe0046;
    color: #fff;
}

/* Profile page – quiz sidebar (top passed quizzes) */
.profile-quiz-sidebar {
    border-left: 4px solid #5A9AFC;
    font-family: 'Roboto', sans-serif;
}

.profile-quiz-sidebar__title {
    color: #14344d;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.profile-quiz-sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-quiz-sidebar__card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e8eef4;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.profile-quiz-sidebar__card:hover {
    background: #fff;
    border-color: #5A9AFC;
    box-shadow: 0 4px 12px rgba(90, 154, 252, 0.15);
}

.profile-quiz-sidebar__card-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.profile-quiz-sidebar__card:hover .profile-quiz-sidebar__card-icon {
    background: linear-gradient(135deg, #5A9AFC 0%, #2196f3 100%);
    color: #fff;
}

.profile-quiz-sidebar__card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.profile-quiz-sidebar__card-label {
    font-size: 0.85rem;
    color: #505050;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-quiz-sidebar__card:hover .profile-quiz-sidebar__card-label {
    color: #14344d;
}

.profile-quiz-sidebar__card-score {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2e7d32;
}

.profile-quiz-sidebar__card-pct {
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #14344d;
    padding: 0.25rem 0.5rem;
    background: rgba(90, 154, 252, 0.12);
    border-radius: 8px;
    min-width: 2.5em;
    text-align: center;
}

.profile-quiz-sidebar__card:hover .profile-quiz-sidebar__card-pct {
    background: #5A9AFC;
    color: #fff;
}

.profile-quiz-sidebar__footer-btn {
    display: block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #5A9AFC;
    border: 2px solid #5A9AFC;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.profile-quiz-sidebar__footer-btn:hover {
    background: #5A9AFC;
    color: #fff;
}

.profile-quiz-sidebar__empty-wrap {
    text-align: center;
}

.profile-quiz-sidebar__empty-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f4f8;
    color: #5A9AFC;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.profile-quiz-sidebar__empty {
    font-size: 0.95rem;
    line-height: 1.5;
}

.profile-quiz-sidebar .btn-primary {
    background-color: #5A9AFC;
    border-color: #5A9AFC;
}

.profile-quiz-sidebar .btn-primary:hover {
    background-color: #4a8aec;
    border-color: #4a8aec;
}

/* ========== Profile page – full redesign ========== */
.profile-page {
    background: linear-gradient(180deg, #f0f4f8 0%, #fff 220px);
    min-height: 60vh;
}

.profile-hero {
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

.profile-hero__banner {
    height: 100px;
    background: linear-gradient(135deg, #14344d 0%, #1a4060 50%, #5A9AFC 100%);
}

.profile-hero__body {
    padding: 0 2rem 2rem;
    margin-top: -50px;
    position: relative;
    background: #fff;
}

.profile-hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.5rem;
}

.profile-hero__avatar-wrap {
    flex-shrink: 0;
}

.profile-hero__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 20px rgba(20, 52, 77, 0.2);
}

.profile-hero__main {
    flex: 1;
    min-width: 0;
    padding-bottom: 4px;
}

.profile-hero__name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #12385c;
    margin: 0 0 0.35rem 0;
    font-family: 'Roboto', sans-serif;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.profile-hero__bio {
    font-size: 1rem;
    color: #505050;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.profile-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.profile-hero__meta-item {
    font-size: 0.9rem;
    color: #626262;
}

.profile-hero__meta-link {
    color: #5A9AFC;
    text-decoration: none;
}

.profile-hero__meta-link:hover {
    color: #14344d;
    text-decoration: underline;
}

.profile-hero__edit-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: #5A9AFC;
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.profile-hero__edit-btn:hover {
    background: #4a8aec;
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 575.98px) {
    .profile-hero__body {
        padding: 0 1.25rem 1.5rem;
        margin-top: -40px;
    }

    .profile-hero__avatar {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .profile-hero__name {
        font-size: 1.4rem;
    }

    .profile-hero__meta {
        gap: 0.5rem 1rem;
    }
}

.profile-alert {
    border-radius: 10px;
    border: none;
    font-family: 'Roboto', sans-serif;
}

.profile-card {
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

.profile-card__header {
    background: linear-gradient(135deg, #14344d 0%, #1a4060 100%);
    color: #fff;
    padding: 1rem 1.5rem;
}

.profile-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.profile-card__badge {
    font-weight: 600;
    background: rgb(255 255 255);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    color: #13385d;
}

.profile-card__body {
    padding: 1.5rem;
    background: #fff;
    color: #505050;
    font-family: 'Georgia', serif;
}

.profile-card__body--about {
    line-height: 1.7;
}

.profile-card__body--about p:last-child {
    margin-bottom: 0;
}

.profile-card__pagination {
    font-family: 'Roboto', sans-serif;
}

.profile-bookmark {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.profile-bookmark:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-bookmark:first-of-type {
    padding-top: 0;
}

.profile-bookmark:hover {
    background: #fafbfc;
}

.profile-bookmark__link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.profile-bookmark__link:hover .profile-bookmark__title {
    color: #5A9AFC;
}

.profile-bookmark__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #e8f0fe;
    color: #5A9AFC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.profile-bookmark__content {
    min-width: 0;
}

.profile-bookmark__title {
    display: block;
    font-weight: 600;
    color: #14344d;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    transition: color 0.2s;
}

.profile-bookmark__type {
    font-size: 0.8rem;
    color: #888;
    text-transform: capitalize;
}

.profile-bookmark__desc {
    font-size: 0.9rem;
    color: #626262;
    margin-top: 0.35rem;
    line-height: 1.45;
}

.profile-bookmark__remove {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
    font-size: 1.35rem;
}

.profile-bookmark__remove i {
    font-size: inherit;
}

.profile-bookmark__remove:hover {
    color: #fe0046;
    background: #fff5f7;
}

.profile-bookmark-empty {
    font-family: 'Roboto', sans-serif;
}

.profile-edit-submit {
    background: #5A9AFC;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.profile-edit-submit:hover {
    background: #4a8aec;
    color: #fff;
    transform: translateY(-1px);
}

.profile-footer-section {
    background: #fff;
}

.profile-footer-section .linkedin-box {
    margin-bottom: 0;
}

/* Watchlist remove – modern confirm modal */
.watchlist-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.watchlist-confirm-modal--open {
    opacity: 1;
    visibility: visible;
}

.watchlist-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 52, 77, 0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.watchlist-confirm-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.watchlist-confirm-modal__content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    text-align: center;
    animation: watchlist-modal-in 0.3s ease;
}

@keyframes watchlist-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.watchlist-confirm-modal__icon-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: #fff5f7;
    color: #fe0046;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watchlist-confirm-modal__icon {
    font-size: 1.5rem;
}

.watchlist-confirm-modal__title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #14344d;
    margin: 0 0 0.5rem 0;
}

.watchlist-confirm-modal__text {
    font-size: 0.95rem;
    color: #626262;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
}

.watchlist-confirm-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.watchlist-confirm-modal__btn {
    padding: 0.6rem 1.35rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    border: none;
}

.watchlist-confirm-modal__btn--cancel {
    background: #e9ecef;
    color: #495057;
}

.watchlist-confirm-modal__btn--cancel:hover {
    background: #dee2e6;
    color: #212529;
}

.watchlist-confirm-modal__btn--remove {
    background: #fe0046;
    color: #fff;
}

.watchlist-confirm-modal__btn--remove:hover {
    background: #e60040;
    color: #fff;
    transform: translateY(-1px);
}