

body[data-page="quizes"] #attempt-prev,
body[data-page="model-questions"] #attempt-prev {
    background: var(--slate-100);
    color: var(--slate-500);
    padding: 8px 16px;
    justify-self: start;
}

body[data-page="quizes"] #attempt-prev:hover:not(:disabled),
body[data-page="model-questions"] #attempt-prev:hover:not(:disabled) {
    background: var(--slate-200);
}

body[data-page="quizes"] #attempt-prev:disabled,
body[data-page="model-questions"] #attempt-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body[data-page="quizes"] #attempt-next,
body[data-page="quizes"] #attempt-submit,
body[data-page="model-questions"] #attempt-next,
body[data-page="model-questions"] #attempt-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--sky-500) 100%);
    color: var(--white);
    padding: 8px 18px;
    justify-self: end;
}

body[data-page="quizes"] #attempt-next:hover:not(:disabled),
body[data-page="quizes"] #attempt-submit:hover:not(:disabled),
body[data-page="model-questions"] #attempt-next:hover:not(:disabled),
body[data-page="model-questions"] #attempt-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--alpha-primary-30);
}

body[data-page="quizes"] #attempt-next:disabled,
body[data-page="quizes"] #attempt-submit:disabled,
body[data-page="model-questions"] #attempt-next:disabled,
body[data-page="model-questions"] #attempt-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body[data-page="quizes"] #attempt-submit,
body[data-page="model-questions"] #attempt-submit {
    background: linear-gradient(135deg, var(--success-dark) 0%, var(--green-600) 100%);
}

body[data-page="quizes"] #attempt-submit:hover:not(:disabled),
body[data-page="model-questions"] #attempt-submit:hover:not(:disabled) {
    box-shadow: 0 4px 12px var(--alpha-success-30);
}

body[data-page="quizes"] #results-retake,
body[data-page="model-questions"] #results-retake {
    background: linear-gradient(135deg, var(--primary) 0%, var(--sky-500) 100%);
    color: var(--white);
}

body[data-page="quizes"] #results-retake:hover,
body[data-page="model-questions"] #results-retake:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--alpha-primary-30);
}

body[data-page="quizes"] #results-retake,
body[data-page="model-questions"] #results-retake {
    background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-600) 100%);
    color: var(--white);
}

body[data-page="quizes"] #results-retake:hover,
body[data-page="model-questions"] #results-retake:hover {
    box-shadow: 0 12px 26px var(--alpha-blue-600-30);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    body[data-page="quizes"] #attempt-prev,
    body[data-page="model-questions"] #attempt-prev {
        grid-column: 1;
        justify-self: stretch;
    }
    body[data-page="quizes"] #attempt-next,
    body[data-page="quizes"] #attempt-submit,
    body[data-page="model-questions"] #attempt-next,
    body[data-page="model-questions"] #attempt-submit {
        grid-column: 2;
        justify-self: stretch;
    }
}

#history-grid {
    grid-template-columns: none !important;
}

.quiz-participants {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.quiz-participants i {
    color: var(--accent-blue);
}

.quiz-attempts-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.quiz-attempts-section.compact {
    padding-top: 12px;
    margin-top: 12px;
}

.dark-theme .quiz-participants {
    color: var(--gray-400);
}

.dark-theme .quiz-attempts-section {
    border-top-color: var(--gray-700);
}

.dark-theme .quiz-attempts-section {
    border-top-color: var(--alpha-white-10);
}

.attempts-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.attempts-count {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.attempt-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attempt-chip {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    background: var(--slate-50);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.85rem;
}

.attempt-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--alpha-black-08);
}

.attempt-chip .chip-label {
    font-weight: 700;
    color: var(--gray-900);
}

.attempt-chip .chip-score {
    font-weight: 600;
    color: var(--gray-800);
}

.attempt-chip .chip-percent {
    font-weight: 700;
}

.attempt-chip .chip-date {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.attempt-chip .chip-action {
    color: var(--accent-blue);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--alpha-primary-10);
    box-shadow: 0 2px 6px var(--alpha-primary-20);
}

.attempt-chip .chip-action i {
    font-size: 0.85rem;
}

.attempt-chip.grade-excellent {
    border-color: var(--success-dark);
}

.attempt-chip.grade-good {
    border-color: var(--primary);
}

.attempt-chip.grade-fair {
    border-color: var(--warning);
}

.attempt-chip.grade-needs-improvement {
    border-color: var(--danger);
}

.attempts-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.attempts-title i {
    color: var(--accent-blue);
    font-size: 0.875rem;
}

.dark-theme .attempts-title {
    color: var(--gray-200);
}

.dark-theme .attempts-title {
    color: var(--slate-200);
}

.dark-theme .attempt-chip {
    background-color: var(--slate-950);
    border: 1px solid var(--alpha-white-10);
}

.dark-theme .attempt-chip:hover {
    border-color: var(--blue-400);
    box-shadow: 0 4px 12px var(--alpha-black-20);
}

.dark-theme .attempt-chip .chip-label {
    color: var(--slate-100);
}

.dark-theme .attempt-chip .chip-score {
    color: var(--slate-200);
}

.dark-theme .attempt-chip .chip-date {
    color: var(--slate-500);
}

.dark-theme .attempt-chip .chip-action {
    background-color: var(--alpha-white-10);
    color: var(--slate-300);
}

@media (max-width: 600px) {
    .attempt-chips {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .attempt-chips {
        display: flex;
        flex-direction: column;
    }
    .attempt-chip {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 10px;
        align-items: center;
    }
    .attempt-chip .chip-label {
        flex: 1 1 100%;
    }
    .attempt-chip .chip-score {
        flex: 0 0 auto;
    }
    .attempt-chip .chip-percent {
        flex: 0 0 auto;
    }
    .attempt-chip .chip-date {
        flex: 0 0 auto;
    }
    .attempt-chip .chip-action {
        margin-left: auto;
        flex: 0 0 auto;
    }
}

.quiz-disclaimer { margin-bottom: 18px; }
.quiz-coming-soon-label { color: var(--warning); font-size: 0.8em; margin-top: 8px; }