
:root {
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --bg-light: #f8f9fa;
    --text-main: #212529;
    --correct: #198754;
    --wrong: #dc3545;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
}

.qd-container {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 15px 40px;
}

.qd-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    padding: 20px;
    margin-bottom: 20px;
}

.qd-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.qd-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 15px;
}

a.qd-btn, button.qd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    transition: background 0.15s ease, transform 0.1s ease;
}

a.qd-btn:hover, button.qd-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.qd-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.qd-btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.qd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.qd-tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #e9ecef;
    color: #495057;
    margin-right: 6px;
}

.qd-question {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 16px;
    margin-bottom: 12px;
}

.qd-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.qd-question-title {
    font-weight: 600;
    font-size: 0.98rem;
}

.qd-options {
    margin-top: 8px;
}

.qd-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.1s ease;
}

.qd-option:hover {
    background: #f1f3f5;
}

.qd-option.correct {
    background: rgba(25, 135, 84, 0.08);
    border: 1px solid rgba(25, 135, 84, 0.5);
}

.qd-option.wrong {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.5);
}

.qd-option input[type="radio"] {
    margin-top: 4px;
}

.qd-option-label {
    font-size: 0.95rem;
}

.qd-badge-correct {
    color: var(--correct);
    font-weight: 600;
    font-size: 0.8rem;
}

.qd-badge-wrong {
    color: var(--wrong);
    font-weight: 600;
    font-size: 0.8rem;
}

.qd-fundamentacao {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #495057;
    border-top: 1px dashed #dee2e6;
    padding-top: 6px;
}

.qd-alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.qd-alert-info {
    background: #e7f1ff;
    color: #084298;
}

.qd-alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

.qd-alert-danger {
    background: #f8d7da;
    color: #842029;
}

.qd-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.qd-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
}

.qd-logo img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.qd-user {
    font-size: 0.9rem;
    color: #495057;
}

.qd-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.qd-link:hover {
    text-decoration: underline;
}

.qd-more {
    text-align: center;
    margin-top: 12px;
}

.qd-footer {
    margin-top: 24px;
    font-size: 0.8rem;
    color: #868e96;
    text-align: center;
}

@media (max-width: 576px) {
    .qd-container {
        padding: 0 10px 30px;
    }
}
/* Botão azul: Responder */
.qd-btn-blue {
    background: #0d6efd;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}
.qd-btn-blue:disabled {
    background: #7cb4ff;
    cursor: not-allowed;
}

/* Botão vermelho: Refazer */
.qd-btn-red {
    background: #dc3545;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

/* Alternativas */
.qd-option.correct {
    background: rgba(25,135,84,0.18);
    border-left: 4px solid #198754;
}
.qd-option.wrong {
    background: rgba(220,53,69,0.18);
    border-left: 4px solid #dc3545;
}

/* Questão respondida */
.qd-question.qd-respondida {
    border: 2px solid #198754 !important;
    border-radius: 8px;
    padding: 8px;
    background: #f4fff7;
}
/* Questão respondida corretamente */
.qd-respondida-correta {
    background: #e9f7ef; /* verde clarinho */
    border: 2px solid #2ecc71 !important;
    border-radius: 8px;
}

/* Questão respondida errada */
.qd-respondida-errada {
    background: #fdecea; /* vermelho clarinho */
    border: 2px solid #e74c3c !important;
    border-radius: 8px;
}
.hidden {
    display: none !important;
}
