/* =====================================================================
   Quiz Corporativo Online - Interface publica estilo "programa de TV"
   ===================================================================== */

.qz-body {
    --qz-primary: #6C2BD9;
    --qz-secondary: #FFC700;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    color: #fff;
    background:
        radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--qz-primary) 55%, transparent), transparent 55%),
        radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--qz-secondary) 25%, transparent), transparent 45%),
        linear-gradient(180deg, #120821 0%, #1a0b2e 55%, #0d0616 100%);
    background-attachment: fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
}
.qz-body.has-bg { background-image: linear-gradient(180deg, rgba(10,4,20,.82), rgba(10,4,20,.92)), var(--qz-bg-image); background-size: cover; background-position: center; }

.qz-wrap { max-width: 720px; margin: 0 auto; padding: 2em 1.2em; width: 100%; flex: 1; display: flex; flex-direction: column; }
.qz-header { display: flex; align-items: center; justify-content: center; gap: .8em; margin-bottom: 1.4em; flex-direction: column; text-align: center; }
.qz-header img.qz-logo { max-height: 72px; max-width: 220px; object-fit: contain; }
.qz-header h1 { font-size: 1.6rem; margin: .2em 0 0; }
.qz-header .qz-company { color: #d9cdfb; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; font-size: .8rem; }

.qz-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(6px);
    border-radius: 22px;
    padding: 1.8em;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.qz-card h2 { margin-top: 0; }
.qz-muted { color: #cabce9; }

.qz-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .9em 1.6em; border-radius: 999px; border: none; font-weight: 800; font-size: 1rem;
    cursor: pointer; background: linear-gradient(135deg, var(--qz-secondary), color-mix(in srgb, var(--qz-secondary) 70%, #b36b00));
    color: #1a0b0b; box-shadow: 0 8px 24px color-mix(in srgb, var(--qz-secondary) 45%, transparent);
    transition: transform .1s ease;
    text-decoration: none;
}
.qz-btn:hover { transform: translateY(-2px); text-decoration: none; }
.qz-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.qz-btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.4); box-shadow: none; }

.qz-field { margin-bottom: 1em; text-align: left; }
.qz-field label { display: block; font-weight: 700; margin-bottom: .35em; font-size: .88rem; color: #ead9ff; }
.qz-field input, .qz-field select, .qz-field textarea {
    width: 100%; padding: .75em .9em; border-radius: 10px; border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08); color: #fff; font-size: 1rem;
}
.qz-field input::placeholder { color: #ad9fd1; }
.qz-field input:focus, .qz-field select:focus { outline: 2px solid var(--qz-secondary); }
.qz-consent { display: flex; gap: .6em; align-items: flex-start; font-size: .85rem; color: #dcd0f5; margin: 1em 0; }
.qz-error { color: #ff9ab0; font-size: .82rem; margin-top: .3em; font-weight: 700; }

.qz-rules-toggle { cursor: pointer; text-decoration: underline; color: var(--qz-secondary); font-size: .85rem; background: none; border: none; padding: 0; }
.qz-rules-box { margin-top: .8em; padding: 1em; background: rgba(0,0,0,.25); border-radius: 12px; font-size: .85rem; white-space: pre-wrap; }

/* Tela de jogo */
.qz-play-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2em; gap: 1em; flex-wrap: wrap; }
.qz-progress { flex: 1; height: 8px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; min-width: 120px; }
.qz-progress-bar { height: 100%; background: linear-gradient(90deg, var(--qz-secondary), var(--qz-primary)); transition: width .3s ease; }
.qz-sound-toggle { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 999px; width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem; }

.qz-timer { position: relative; width: 78px; height: 78px; flex-shrink: 0; }
.qz-timer svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.qz-timer circle { fill: none; stroke-width: 8; }
.qz-timer .bg { stroke: rgba(255,255,255,.15); }
.qz-timer .fg { stroke: var(--qz-secondary); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.qz-timer .fg.warn { stroke: #ff4d6d; }
.qz-timer .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; }

.qz-question-card { text-align: center; }
.qz-category-badge { display: inline-block; background: rgba(255,255,255,.12); padding: .3em .9em; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .8em; }
.qz-statement { font-size: 1.4rem; font-weight: 800; margin: .3em 0 1em; line-height: 1.35; }
.qz-question-image { max-width: 100%; border-radius: 14px; margin-bottom: 1em; max-height: 260px; object-fit: contain; }

.qz-options { display: grid; grid-template-columns: 1fr 1fr; gap: .9em; margin-top: 1em; }
@media (max-width: 560px) { .qz-options { grid-template-columns: 1fr; } }
.qz-option {
    display: flex; align-items: center; gap: .8em; text-align: left;
    padding: 1em 1.1em; border-radius: 16px; border: 2px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.07); color: #fff; cursor: pointer; font-size: 1rem; font-weight: 600;
    transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.qz-option:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--qz-secondary); }
.qz-option .qz-option-label {
    width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.14);
    display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.qz-option:disabled { cursor: default; }
.qz-option.correct { background: rgba(53, 214, 126, .25); border-color: #35d67e; animation: qz-pop .4s ease; }
.qz-option.correct .qz-option-label { background: #35d67e; color: #063; }
.qz-option.wrong { background: rgba(255, 77, 109, .22); border-color: #ff4d6d; animation: qz-shake .4s ease; }
.qz-option.wrong .qz-option-label { background: #ff4d6d; }
.qz-option.dim { opacity: .45; }

@keyframes qz-pop { 0% { transform: scale(1); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes qz-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
    .qz-option, .qz-option.correct, .qz-option.wrong, .qz-btn { animation: none !important; transition: none !important; transform: none !important; }
}

.qz-feedback-banner {
    text-align: center; font-weight: 800; font-size: 1.15rem; padding: .8em; border-radius: 14px; margin-top: 1em;
}
.qz-feedback-banner.correct { background: rgba(53,214,126,.2); color: #b9ffd6; }
.qz-feedback-banner.wrong { background: rgba(255,77,109,.2); color: #ffc3cf; }
.qz-feedback-banner.timeout { background: rgba(255,199,0,.18); color: #ffe9a8; }
.qz-explanation { margin-top: .8em; font-size: .9rem; color: #e6dcff; background: rgba(0,0,0,.2); border-radius: 12px; padding: .9em; }

.qz-round-transition {
    position: fixed; inset: 0; background: rgba(10,4,20,.92); display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 900; color: var(--qz-secondary); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.qz-round-transition.show { opacity: 1; }

/* Tela final / podio */
.qz-podium { display: flex; align-items: flex-end; justify-content: center; gap: 1em; margin: 1.6em 0; }
.qz-podium .place { text-align: center; }
.qz-podium .bar { border-radius: 12px 12px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: .5em; font-weight: 900; font-size: 1.3rem; }
.qz-podium .p1 .bar { height: 130px; background: linear-gradient(180deg, #ffe27a, #d9a300); width: 100px; }
.qz-podium .p2 .bar { height: 100px; background: linear-gradient(180deg, #e4e4e4, #a7a7a7); width: 90px; }
.qz-podium .p3 .bar { height: 76px; background: linear-gradient(180deg, #e3ad7a, #b3703a); width: 90px; }
.qz-podium .name { font-size: .82rem; margin-top: .4em; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qz-score-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: .8em; margin: 1.2em 0; }
.qz-score-item { background: rgba(255,255,255,.08); border-radius: 14px; padding: 1em; text-align: center; }
.qz-score-item .num { font-size: 1.7rem; font-weight: 900; color: var(--qz-secondary); }
.qz-score-item .lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #d9cdfb; }

.qz-footer { text-align: center; padding: 1.4em; font-size: .78rem; color: #9781c2; }

.qz-ranking-table { width: 100%; border-collapse: collapse; margin-top: 1em; }
.qz-ranking-table th, .qz-ranking-table td { padding: .7em .8em; text-align: left; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .9rem; }
.qz-ranking-table th { color: #d9cdfb; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
.qz-ranking-table tr:first-child td { color: var(--qz-secondary); font-weight: 800; }
