/* Zoom Quiz — build-your-own picture quiz, spotlight/camera theme */

:root {
    --zq-bg: #F7F8FA;
    --zq-panel: #FFFFFF;
    --zq-panel-2: #F3F4F6;
    --zq-border: #E5E7EB;
    --zq-border-strong: #D1D5DB;
    --zq-text: #111827;
    --zq-text-dim: #6B7280;
    --zq-accent: #3B82F6;
    --zq-accent-bright: #2563EB;
    --zq-danger: #EF4444;
    --zq-success: #22C55E;
    --zq-shadow: 0 8px 24px rgba(17, 24, 39, .08);
}

.zq-main {
    background:
        radial-gradient(circle at 20% -10%, rgba(59, 130, 246, .08), transparent 50%),
        radial-gradient(circle at 80% -10%, rgba(250, 204, 21, .07), transparent 50%),
        var(--zq-bg);
    color: var(--zq-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 24px 16px;
}

.zq-app {
    width: 100%;
    max-width: 640px;
}

#app h1, #app h2, #app h3, #app .display {
    font-family: 'Kanit', sans-serif;
    letter-spacing: .01em;
}

.card {
    background: linear-gradient(180deg, var(--zq-panel-2), var(--zq-panel));
    border: 1px solid var(--zq-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--zq-shadow);
}

.eyebrow {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .16em;
    color: var(--zq-accent);
    font-weight: 700;
    margin-bottom: 6px;
}

h1.display {
    font-size: 30px;
    margin: 0 0 4px;
    color: var(--zq-text);
    font-weight: 800;
}

h2.display {
    font-size: 22px;
    margin: 0;
    color: var(--zq-text);
    font-weight: 700;
}

.sub {
    color: var(--zq-text-dim);
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.6;
}

.zq-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.zq-head-row h2.display {
    margin: 0;
}

#app button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    background: transparent;
    color: var(--zq-text);
    border: 1px solid var(--zq-border-strong);
    border-radius: 10px;
    padding: 11px 18px;
    cursor: pointer;
    transition: all .15s ease;
}

#app button:hover:not(:disabled) {
    border-color: var(--zq-accent);
    color: var(--zq-accent-bright);
}

#app button:focus-visible {
    outline: 2px solid var(--zq-accent);
    outline-offset: 2px;
}

#app button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

#app button.primary {
    background: var(--zq-accent);
    color: #FFFFFF;
    border: none;
}

#app button.primary:hover:not(:disabled) {
    background: var(--zq-accent-bright);
    color: #FFFFFF;
}

#app button.danger {
    border-color: rgba(239, 68, 68, .4);
    color: var(--zq-danger);
    padding: 6px 10px;
    font-size: 12px;
}

#app button.ghost {
    background: var(--zq-panel-2);
}

#app button.confirm-danger {
    background: var(--zq-danger);
    color: #FFFFFF;
    border: none;
}

#app button.confirm-danger:hover:not(:disabled) {
    background: #B91C1C;
}

#app input, #app select, #app textarea {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: var(--zq-bg);
    color: var(--zq-text);
    border: 1px solid var(--zq-border-strong);
    border-radius: 8px;
    padding: 10px 12px;
    width: 100%;
}

#app input:focus, #app select:focus, #app textarea:focus {
    outline: 2px solid var(--zq-accent);
    border-color: var(--zq-accent);
}

#app input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--zq-accent);
    padding: 0;
    flex-shrink: 0;
}

.zq-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    font-size: 14px;
    color: var(--zq-text);
    cursor: pointer;
}

#app label {
    font-size: 12px;
    color: var(--zq-text-dim);
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
}

.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- setup screen ---------- */

.zq-settings-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin: 18px 0;
    flex-wrap: wrap;
}

.zq-settings-row .field {
    min-width: 160px;
}

.zq-settings-row .zq-prompt-field {
    flex: 1;
    min-width: 220px;
}

.zq-add-row {
    margin: 18px 0;
}

.zq-file-input {
    display: none;
}

.zq-question-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.zq-empty {
    text-align: center;
    color: var(--zq-text-dim);
    font-size: 13px;
    padding: 32px 16px;
    border: 1px dashed var(--zq-border-strong);
    border-radius: 12px;
}

.zq-qcard {
    display: flex;
    gap: 14px;
    background: var(--zq-panel-2);
    border: 1px solid var(--zq-border);
    border-radius: 12px;
    padding: 14px;
}

.zq-qcard-thumb {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--zq-bg);
    border: 1px solid var(--zq-border);
}

.zq-qcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zq-qcard-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zq-qcard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.zq-qcard-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--zq-accent);
    letter-spacing: .04em;
}

.zq-choices-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.zq-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--zq-bg);
    border: 1px solid var(--zq-border-strong);
    border-radius: 999px;
    padding: 4px 6px 4px 12px;
    font-size: 12px;
}

.zq-chip button {
    border: none;
    background: transparent;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 50%;
    line-height: 1;
    color: var(--zq-text-dim);
}

.zq-chip button:hover:not(:disabled) {
    color: var(--zq-danger);
    border-color: transparent;
}

.zq-choice-add {
    display: flex;
    gap: 6px;
}

.zq-choice-add input {
    flex: 1;
}

.zq-validation-note {
    font-size: 12px;
    color: var(--zq-accent-bright);
    margin-top: 10px;
}

/* ---------- play screen ---------- */

.zq-play-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.zq-timer {
    font-family: 'Kanit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--zq-accent-bright);
    font-variant-numeric: tabular-nums;
}

.zq-timer.zq-timer-done {
    color: var(--zq-success);
}

.zq-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: inset 0 0 0 1px var(--zq-border), var(--zq-shadow);
}

.zq-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: 50% 50%;
    will-change: transform;
}

.zq-frame.zq-revealed img {
    transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}

.zq-frame.zq-hidden-frame {
    background: var(--zq-panel-2);
}

.zq-ready-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 24px;
}

.zq-ready-icon {
    font-size: 40px;
}

.zq-ready-text {
    font-size: 13px;
    color: var(--zq-text-dim);
    font-weight: 600;
}

.zq-paused-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 17, 21, .85);
    border: 1px solid var(--zq-border-strong);
    color: var(--zq-accent-bright);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    letter-spacing: .04em;
}

.zq-choices-hint {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zq-choice-pill {
    background: var(--zq-panel-2);
    border: 1px solid var(--zq-border-strong);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--zq-text);
}

.zq-choice-pill.zq-correct {
    border-color: var(--zq-success);
    background: rgba(34, 197, 94, .12);
    color: #15803D;
    font-weight: 700;
}

.zq-answer-banner {
    margin-top: 14px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(34, 197, 94, .08);
    border: 1px solid rgba(34, 197, 94, .35);
    text-align: center;
}

.zq-answer-banner .zq-answer-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #15803D;
    font-weight: 700;
    margin-bottom: 4px;
}

.zq-answer-banner .zq-answer-text {
    font-family: 'Kanit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--zq-text);
}

.zq-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.zq-actions button {
    flex: 1;
}

.zq-countdown {
    flex: 1;
    text-align: center;
    padding: 11px 18px;
    background: var(--zq-panel-2);
    border: 1px solid var(--zq-border-strong);
    border-radius: 10px;
    color: var(--zq-accent-bright);
    font-weight: 700;
}

.zq-leave-row {
    margin-top: 16px;
    text-align: center;
}

.zq-leave-row button {
    font-size: 12px;
    color: var(--zq-text-dim);
    border-color: transparent;
    padding: 6px 10px;
}

/* ---------- summary screen ---------- */

.zq-summary-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .zq-main {
        padding: 14px 10px;
    }

    .card {
        padding: 18px;
    }

    .zq-qcard {
        flex-direction: column;
    }

    .zq-qcard-thumb {
        width: 100%;
        height: 140px;
    }
}
