/* ============ Tema DynamicQuiz ============ */
:root {
    --dq-primary: #6d28d9;
    --dq-primary-2: #4f46e5;
    --dq-accent: #ec4899;
    --dq-cyan: #06b6d4;
    --dq-dark: #1e1b4b;
    --dq-soft: #f5f3ff;
    --dq-gradient: linear-gradient(135deg, #6d28d9 0%, #4f46e5 45%, #06b6d4 100%);
    --dq-gradient-warm: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --bs-primary: #6d28d9;
    --bs-primary-rgb: 109, 40, 217;
}

body {
    background: #f7f7fb;
    color: #1f2937;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--dq-primary-2); }

h1:focus { outline: none; }

/* ---- Botões ---- */
.btn-primary {
    background-color: var(--dq-primary);
    border-color: var(--dq-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--dq-primary-2);
    border-color: var(--dq-primary-2);
}
.btn-outline-primary {
    color: var(--dq-primary);
    border-color: var(--dq-primary);
}
.btn-outline-primary:hover {
    background-color: var(--dq-primary);
    border-color: var(--dq-primary);
}
.btn-gradient {
    background: var(--dq-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 8px 20px rgba(109, 40, 217, .35);
    transition: transform .12s ease, box-shadow .12s ease;
}
.btn-gradient:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(109, 40, 217, .45);
}

.text-gradient {
    background: var(--dq-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Navbar ---- */
.dq-navbar {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(109,40,217,.12);
}
.dq-brand {
    font-weight: 800;
    letter-spacing: -.5px;
    font-size: 1.35rem;
}
.dq-brand i { color: var(--dq-accent); }

/* ---- Footer ---- */
.dq-footer {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(109,40,217,.12);
    color: #6b7280;
    font-size: .9rem;
}
.dq-footer a {
    font-weight: 600;
    color: var(--dq-primary-2);
    text-decoration: none;
}
.dq-footer a:hover { text-decoration: underline; }

/* ---- Hero ---- */
.dq-hero {
    position: relative;
    background: var(--dq-gradient);
    color: #fff;
    border-radius: 28px;
    padding: 4rem 2rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(79, 70, 229, .35);
}
.dq-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.25), transparent 40%),
               radial-gradient(circle at 10% 90%, rgba(236,72,153,.35), transparent 45%);
    pointer-events: none;
}
.dq-hero h1 {
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -1px;
}
.dq-hero .lead { opacity: .92; max-width: 620px; }

/* ---- Cards ---- */
.dq-card {
    background: #fff;
    border: 1px solid rgba(17,24,39,.06);
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(17, 24, 39, .06);
    transition: transform .12s ease, box-shadow .12s ease;
}
.dq-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(17, 24, 39, .12);
}
.dq-code-badge {
    font-family: 'Consolas', monospace;
    letter-spacing: 3px;
    font-weight: 700;
    background: var(--dq-soft);
    color: var(--dq-primary);
    border-radius: 10px;
    padding: .35rem .75rem;
}

/* ---- Quiz play option ---- */
.dq-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    text-align: left;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    background: #fff;
    margin-bottom: .75rem;
    cursor: pointer;
    transition: all .12s ease;
    font-size: 1.05rem;
}
.dq-option:hover { border-color: var(--dq-primary-2); background: var(--dq-soft); }
.dq-option.selected {
    border-color: var(--dq-primary);
    background: var(--dq-soft);
    box-shadow: 0 0 0 3px rgba(109,40,217,.15);
}
.dq-option .form-check-input { margin: 0; }

/* ---- Progress / pills ---- */
.dq-pill {
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    padding: .25rem .7rem;
}
.dq-pill-pending { background: #f3f4f6; color: #6b7280; }
.dq-pill-open { background: #dcfce7; color: #15803d; }
.dq-pill-closed { background: #fee2e2; color: #b91c1c; }

/* ---- Podium ---- */
.dq-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
}
.dq-podium-step {
    border-radius: 16px 16px 0 0;
    color: #fff;
    text-align: center;
    padding: 1rem .75rem;
    min-width: 110px;
}
.dq-podium-1 { background: var(--dq-gradient-warm); height: 170px; }
.dq-podium-2 { background: linear-gradient(135deg, #818cf8, #6366f1); height: 135px; }
.dq-podium-3 { background: linear-gradient(135deg, #22d3ee, #0891b2); height: 110px; }
.dq-podium-medal { font-size: 1.8rem; }

/* ---- Posição final do participante ---- */
.dq-rank-badge {
    display: inline-block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    background: var(--dq-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.dq-rank-badge sup { font-size: 1.5rem; }

/* ---- Monitoring grid ---- */
.dq-grid-table th, .dq-grid-table td { text-align: center; vertical-align: middle; }
.dq-grid-table th:first-child, .dq-grid-table td:first-child { text-align: left; }

/* ---- Cookie consent ---- */
.dq-consent {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    background: var(--dq-dark);
    color: #e5e7eb;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
    max-width: 720px;
    margin: 0 auto;
}

/* ---- Páginas legais (privacidade / termos) ---- */
.dq-legal { color: #374151; line-height: 1.7; }
.dq-legal h2 {
    font-weight: 700;
    font-size: 1.4rem;
    margin-top: 1.75rem;
    color: var(--dq-dark);
}
.dq-legal h3 {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--dq-dark);
}
.dq-legal h2:first-child { margin-top: 0; }
.dq-legal ul, .dq-legal ol { padding-left: 1.25rem; }
.dq-legal li { margin-bottom: .4rem; }

/* ---- Editor de perguntas ---- */
/* Cola a seta do accordion junto ao badge/contador (alinhado à direita) */
.dq-question-btn::after { margin-left: 0; }

/* ---- Misc ---- */
.dq-loading {
    display: flex; align-items: center; justify-content: center; min-height: 60vh;
}
.dq-page { max-width: 1180px; }

/* ---- Validações Blazor (mantido) ---- */
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
}
.blazor-error-boundary::after { content: "Ocorreu um erro."; }
