/* USTP LIVE QUIZ — design tokens & pieces Tailwind's default utility set doesn't cover
   (glassmorphism surfaces, glow accents, keyframe animations). Loaded after the
   Tailwind CDN script + its inline config in the layout head. */

:root {
    --uq-bg-950: #05070f;
    --uq-bg-900: #0a0e27;
    --uq-bg-800: #0f1535;
    --uq-bg-700: #161d45;
    --uq-border: rgba(148, 163, 253, 0.14);
    --uq-glow-indigo: rgba(99, 102, 241, 0.45);
    --uq-glow-cyan: rgba(34, 211, 238, 0.35);
    --uq-glow-violet: rgba(167, 139, 250, 0.4);
}

body {
    background-color: var(--uq-bg-900);
    background-image:
        radial-gradient(circle at 15% 0%, rgba(99, 102, 241, 0.18), transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.12), transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(167, 139, 250, 0.10), transparent 50%);
    background-attachment: fixed;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

.uq-glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--uq-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.uq-glow-ring {
    box-shadow: 0 0 0 1px var(--uq-border), 0 8px 40px -12px var(--uq-glow-indigo);
}

.uq-gradient-text {
    background: linear-gradient(90deg, #818cf8, #22d3ee 60%, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.uq-btn-primary {
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    box-shadow: 0 10px 30px -10px var(--uq-glow-indigo);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.uq-btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 14px 36px -8px var(--uq-glow-indigo);
}
.uq-btn-primary:active { transform: translateY(0); }

.uq-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.uq-card:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 253, 0.3);
}

/* Participant answer buttons: large, high-contrast, shape-coded (not color-only). */
.uq-answer-btn {
    min-height: 88px;
    touch-action: manipulation;
    transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}
.uq-answer-btn:active:not(:disabled) { transform: scale(0.97); }
.uq-answer-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.uq-answer-btn.uq-selected { outline: 3px solid #fff; outline-offset: -3px; }
.uq-answer-btn.uq-correct { animation: uq-pulse-correct 0.6s ease; }
.uq-answer-btn.uq-wrong { animation: uq-shake 0.4s ease; }

@keyframes uq-pulse-correct {
    0% { transform: scale(1); }
    40% { transform: scale(1.04); }
    100% { transform: scale(1); }
}
@keyframes uq-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.uq-timer-ring {
    transition: stroke-dashoffset 1s linear;
}

@keyframes uq-fade-in-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.uq-animate-in { animation: uq-fade-in-up 0.35s ease both; }

.uq-leaderboard-row {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Final-results podium (public/assets/js/podium.js) */
.uq-podium { width: 100%; max-width: 640px; margin: 0 auto; }
.uq-podium-stage {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    min-height: 340px;
}
.uq-pod {
    flex: 1 1 0;
    min-width: 0;
    max-width: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(70px) scale(0.92);
    transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.uq-pod.uq-pod-show { opacity: 1; transform: none; }
.uq-pod-empty { visibility: hidden; }
.uq-pod-person { width: 100%; text-align: center; padding: 6px 4px 10px; border-radius: 14px; }
.uq-pod-me {
    background: rgba(34, 211, 238, 0.12);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.65);
}
.uq-pod-crown { display: block; font-size: 30px; line-height: 1; animation: uq-crown-bob 1.4s ease-in-out infinite; }
.uq-pod-avatar { font-size: 46px; line-height: 1.1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.uq-pod-1 .uq-pod-avatar { font-size: 60px; }
.uq-pod-name {
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uq-pod-score { font-weight: 700; font-size: 13px; color: #fde68a; }
.uq-pod-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8px;
    border-radius: 12px 12px 0 0;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    color: rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}
.uq-pod-1 .uq-pod-block { height: 170px; background: linear-gradient(180deg, #fde047, #f59e0b); }
.uq-pod-2 .uq-pod-block { height: 125px; background: linear-gradient(180deg, #e2e8f0, #94a3b8); }
.uq-pod-3 .uq-pod-block { height: 90px; background: linear-gradient(180deg, #fdba74, #c2410c); }

.uq-podium--compact .uq-podium-stage { min-height: 270px; gap: 6px; }
.uq-podium--compact .uq-pod-avatar { font-size: 34px; }
.uq-podium--compact .uq-pod-1 .uq-pod-avatar { font-size: 44px; }
.uq-podium--compact .uq-pod-crown { font-size: 22px; }
.uq-podium--compact .uq-pod-name { font-size: 12px; }
.uq-podium--compact .uq-pod-score { font-size: 12px; }
.uq-podium--compact .uq-pod-block { font-size: 30px; }
.uq-podium--compact .uq-pod-1 .uq-pod-block { height: 120px; }
.uq-podium--compact .uq-pod-2 .uq-pod-block { height: 88px; }
.uq-podium--compact .uq-pod-3 .uq-pod-block { height: 62px; }

.uq-podium-rest {
    list-style: none;
    margin: 18px auto 0;
    padding: 0;
    display: grid;
    gap: 6px;
    max-width: 420px;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.uq-podium-rest.uq-show { opacity: 1; }
.uq-podium-rest li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--uq-border);
    font-size: 13px;
    text-align: left;
}
.uq-podium-rest-me { border-color: rgba(34, 211, 238, 0.65) !important; }
.uq-podium-rest-score { font-weight: 700; color: #fde68a; }
.uq-podium-empty { color: #94a3b8; font-size: 14px; padding: 24px 0; }
.uq-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

@keyframes uq-crown-bob {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-6px) rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) {
    .uq-pod { transition: none; }
    .uq-pod-crown { animation: none; }
}

@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
}
