/* ============================================
   QUIZZYGENIUS - Estilo geral
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #050510;
    color: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow-x: hidden;
}

/* ============================================
   FUNDO ANIMADO (orbs + grid)
   ============================================ */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    will-change: transform;
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: #ff006e;
    top: -120px;
    left: -120px;
    animation: orb-float-1 24s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #00c8ff;
    bottom: -80px;
    right: -100px;
    animation: orb-float-2 28s ease-in-out infinite;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: #8b5cf6;
    top: 40%;
    left: 40%;
    transform: translate(-50%, -50%);
    animation: orb-float-3 32s ease-in-out infinite;
}

@keyframes orb-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(120px, 80px) scale(1.15); }
}

@keyframes orb-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-100px, -80px) scale(1.1); }
}

@keyframes orb-float-3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-30%, -70%) scale(1.2); }
}

/* Grid sutil de fundo */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.container {
    max-width: 500px;
    margin: 0 auto;
    /* Padding com safe-area pra iPhones com notch/dynamic island */
    padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HOME - Header e Logo
   ============================================ */

.home-header {
    text-align: center;
    padding: 24px 0 18px;
    animation: fadeInDown 0.6s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 44px;
    animation: logo-glow 3.5s ease-in-out infinite, float 3s ease-in-out infinite;
}

@keyframes logo-glow {
    0%, 100% { filter: drop-shadow(0 0 16px rgba(255, 0, 110, 0.7)); }
    33%      { filter: drop-shadow(0 0 22px rgba(139, 92, 246, 0.8)); }
    66%      { filter: drop-shadow(0 0 22px rgba(0, 200, 255, 0.8)); }
}

.logo-text {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #ffffff 0%, #fde4f0 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shimmer 4s linear infinite;
}

@keyframes text-shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.logo-accent {
    background: linear-gradient(135deg, #ff006e 0%, #8b5cf6 50%, #00c8ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shimmer 4s linear infinite reverse;
}

.tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ============================================
   PAINEL DO USUÁRIO (RANK + XP) — Glassmorphism
   ============================================ */

.user-panel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 16px 16px 14px;
    margin-bottom: 20px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

/* Brilho sutil no canto do painel */
.user-panel::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.user-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    position: relative;
}

.user-rank-block {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.user-rank-badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #86efac 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.4);
    transition: all 0.5s;
    overflow: hidden;
}

.user-rank-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    pointer-events: none;
}

.rank-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    z-index: 1;
    position: relative;
}

.user-rank-info {
    flex: 1;
    min-width: 0;
}

.user-rank-name {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    line-height: 1;
    margin-bottom: 4px;
}

.user-level-line {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

.user-level-line strong {
    color: white;
    font-weight: 900;
    font-size: 14px;
}

.next-rank-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
}

/* XP bar com shine */
.user-xp-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-xp-bar {
    flex: 1;
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.user-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ff006e 100%);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.user-xp-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 50%);
    border-radius: 6px;
}

.user-xp-shine {
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: xp-shine 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes xp-shine {
    0% { left: -50%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.user-xp-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Grupo do canto direito (gemas + streak) */
.user-streak-group {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-direction: column;
    align-items: stretch;
}

/* Gemas */
.user-gems {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.22), rgba(139, 92, 246, 0.18));
    border: 1px solid rgba(0, 200, 255, 0.45);
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(0, 200, 255, 0.2);
}

.user-gems .gems-icon { font-size: 16px; }
.user-gems .gems-value { font-size: 14px; color: #00c8ff; font-weight: 900; }

.user-streak {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.25), rgba(255, 0, 110, 0.2));
    border: 1px solid rgba(255, 107, 53, 0.4);
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 900;
    flex-shrink: 0;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

.user-streak.inactive {
    opacity: 0.4;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

.user-streak .streak-icon { font-size: 18px; }
.user-streak .streak-value { font-size: 16px; color: #ff6b35; font-weight: 900; }
.user-streak.inactive .streak-value { color: rgba(255, 255, 255, 0.5); }

/* ============================================
   GRID DE CATEGORIAS
   ============================================ */

.categories-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 4px 0;
    align-content: start;
}

.category-card {
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-family: inherit;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease-out backwards;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    min-height: 86px;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
}

.category-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.category-card:active { transform: scale(0.96); }

.category-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.45),
        0 0 20px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.category-emoji {
    font-size: 36px;
    line-height: 1;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
    z-index: 1;
    position: relative;
    flex-shrink: 0;
}

.category-info {
    z-index: 1;
    position: relative;
    flex: 1;
    min-width: 0;
}

.category-name {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-count {
    font-size: 10px;
    opacity: 0.85;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-record {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.category-record.empty {
    opacity: 0.55;
    background: rgba(0, 0, 0, 0.18);
    font-weight: 600;
    font-size: 9px;
}

/* Cores específicas por categoria */
.cat-futebol      { background: linear-gradient(135deg, #00b347 0%, #006e2e 100%); }
.cat-curiosidades { background: linear-gradient(135deg, #ff6b35 0%, #c2410c 100%); }
.cat-herois       { background: linear-gradient(135deg, #e11d48 0%, #7c1d3c 100%); }
.cat-famosos      { background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%); }
.cat-adivinha     { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }
.cat-daily        { background: linear-gradient(135deg, #ffd700 0%, #b45309 100%); }
.cat-survival     { background: linear-gradient(135deg, #f472b6 0%, #be185d 100%); }
.cat-study        { background: linear-gradient(135deg, #34d399 0%, #047857 100%); }
.cat-duel         { background: linear-gradient(135deg, #00c8ff 0%, #6366f1 100%); }
.cat-speedrun     { background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%); }
.cat-treino       { background: linear-gradient(135deg, #a78bfa 0%, #6d28d9 100%); }
.cat-infantil     { background: linear-gradient(135deg, #fb923c 0%, #ec4899 100%); }
.cat-cinema       { background: linear-gradient(135deg, #ef4444 0%, #6b21a8 100%); }
.cat-brasil       { background: linear-gradient(135deg, #16a34a 0%, #facc15 100%); }
.cat-musica       { background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%); }
.cat-geografia    { background: linear-gradient(135deg, #2563eb 0%, #0d9488 100%); }

/* ============================================
   HISTÓRICO DE PARTIDAS
   ============================================ */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
}

.history-item-emoji {
    font-size: 28px;
    flex-shrink: 0;
}

.history-item-info {
    flex: 1;
    min-width: 0;
}

.history-item-name {
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 2px;
}

.history-item-stats {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

.history-item-stats .stat-correct { color: #34d399; }
.history-item-stats .stat-wrong { color: #ff6b8a; }

.history-item-score {
    text-align: right;
    flex-shrink: 0;
}

.history-item-score-val {
    font-weight: 900;
    font-size: 18px;
    color: #ffd700;
    line-height: 1;
}

.history-item-score-lbl {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.history-item-mode-tag {
    display: inline-block;
    background: rgba(0, 200, 255, 0.18);
    color: #00c8ff;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    margin-left: 4px;
    letter-spacing: 0.3px;
}

/* ============================================
   RECOMPENSA DIÁRIA
   ============================================ */
.daily-reward-modal .ranks-modal-content {
    max-width: 380px;
    text-align: center;
}

.daily-reward-content {
    padding: 6px 0;
}

.daily-reward-icon {
    font-size: 64px;
    margin-bottom: 8px;
    animation: float 2.5s ease-in-out infinite;
}

.daily-reward-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffd700 0%, #ff006e 50%, #00c8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.daily-reward-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    margin-bottom: 20px;
}

.daily-reward-prize {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 0, 110, 0.15));
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 22px;
    padding: 16px 28px;
    margin-bottom: 14px;
}

.daily-reward-gems {
    font-size: 44px;
    font-weight: 900;
    color: #ffd700;
    line-height: 1;
}

.daily-reward-gem-icon {
    font-size: 32px;
}

.daily-reward-streak {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
    margin-bottom: 16px;
}

.daily-reward-calendar {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.daily-reward-day {
    flex: 1 1 calc(14% - 4px);
    min-width: 0;
    max-width: 48px;
    padding: 6px 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    text-align: center;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.daily-reward-day.completed {
    background: rgba(52, 211, 153, 0.18);
    border-color: rgba(52, 211, 153, 0.4);
    color: #34d399;
}

.daily-reward-day.current {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 0, 110, 0.2));
    border-color: #ffd700;
    color: #ffd700;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.3);
}

.daily-reward-day-num {
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2px;
}

.daily-reward-day-gems {
    font-size: 9px;
}

/* ============================================
   RECOMPENSA DE RANK (modal épico de promoção)
   ============================================ */
.rank-reward-modal .ranks-modal-content {
    max-width: 380px;
    text-align: center;
    background: radial-gradient(circle at top, rgba(255, 215, 0, 0.2), rgba(20, 20, 35, 0.97) 70%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    overflow: hidden;
}

.rank-reward-content {
    position: relative;
    padding: 8px 0;
}

.rank-reward-burst {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 90px;
    opacity: 0.18;
    animation: rank-burst-spin 8s linear infinite;
    pointer-events: none;
}

@keyframes rank-burst-spin {
    from { transform: translateX(-50%) rotate(0deg); }
    to   { transform: translateX(-50%) rotate(360deg); }
}

.rank-reward-promo-label {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    margin-bottom: 12px;
    animation: rank-label-pulse 1.6s ease-in-out infinite;
}

@keyframes rank-label-pulse {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

.rank-reward-badge {
    width: 100px;
    height: 100px;
    margin: 0 auto 14px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rank-start, #ffd700) 0%, var(--rank-end, #ff006e) 100%);
    box-shadow:
        0 0 40px rgba(255, 215, 0, 0.5),
        0 8px 26px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    animation: rank-badge-pop 0.8s cubic-bezier(0.34, 1.8, 0.5, 1) backwards;
}

.rank-reward-badge span {
    font-size: 56px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

@keyframes rank-badge-pop {
    0%   { opacity: 0; transform: scale(0.2) rotate(-180deg); }
    60%  { opacity: 1; transform: scale(1.2) rotate(15deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.rank-reward-rank-name {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #ff006e 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 3s linear infinite;
}

.rank-reward-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 16px;
    font-weight: 600;
}

.rank-reward-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
    padding: 0 8px;
}

.rank-reward-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 14px;
    padding: 10px 14px;
    animation: rank-item-slide 0.5s ease-out backwards;
}

.rank-reward-item:nth-child(1) { animation-delay: 0.6s; }
.rank-reward-item:nth-child(2) { animation-delay: 0.75s; }
.rank-reward-item:nth-child(3) { animation-delay: 0.9s; }
.rank-reward-item:nth-child(4) { animation-delay: 1.05s; }
.rank-reward-item:nth-child(5) { animation-delay: 1.2s; }

@keyframes rank-item-slide {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.rank-reward-item-icon { font-size: 26px; flex-shrink: 0; }
.rank-reward-item-text { font-weight: 700; font-size: 14px; flex: 1; text-align: left; }
.rank-reward-item-amount { font-weight: 900; color: #ffd700; font-size: 17px; }

/* ============================================
   MARCOS DE NÍVEL (Modal de Recompensas)
   ============================================ */
.level-rewards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.level-reward-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    transition: all 0.25s;
}

.level-reward-card.ready {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 0, 110, 0.1));
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.2);
    animation: level-ready-pulse 2s ease-in-out infinite;
}

@keyframes level-ready-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(255, 215, 0, 0.2); }
    50%      { box-shadow: 0 4px 24px rgba(255, 215, 0, 0.4); }
}

.level-reward-card.claimed {
    opacity: 0.55;
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.25);
}

.level-reward-card.locked {
    opacity: 0.5;
}

.level-reward-num {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.level-reward-card.ready .level-reward-num {
    background: linear-gradient(135deg, #ffd700, #ff006e);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.level-reward-card.claimed .level-reward-num {
    background: rgba(52, 211, 153, 0.25);
    color: #34d399;
}

.level-reward-info {
    flex: 1;
    min-width: 0;
}

.level-reward-items {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    line-height: 1.4;
}

.level-reward-claim-btn {
    background: linear-gradient(135deg, #ffd700, #ff006e);
    color: white;
    border: none;
    border-radius: 22px;
    padding: 8px 16px;
    font-family: inherit;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 0, 110, 0.4);
    transition: transform 0.15s, box-shadow 0.2s;
    flex-shrink: 0;
}

.level-reward-claim-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 0, 110, 0.5);
}

.level-reward-status {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.level-reward-card.claimed .level-reward-status { color: #34d399; }

/* Contador no botão "🎁 Recompensas" quando tem mimo pra pegar */
.level-reward-counter {
    background: linear-gradient(135deg, #ffd700, #ff006e);
    color: white;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 900;
    margin-left: 4px;
    display: none;
}
.level-reward-counter.has-ready {
    display: inline-block;
    animation: level-counter-pulse 1.3s ease-in-out infinite;
}

@keyframes level-counter-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

/* Loja: badge "Desbloqueia em X" pra itens travados por rank */
.shop-item-rank-lock {
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.35);
    color: #fca5a5;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 4px;
}

.shop-item.rank-locked {
    opacity: 0.55;
    filter: saturate(0.5);
}

/* ============================================
   MODOS ESPECIAIS (Daily + Survival) na home
   ============================================ */
.modes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.mode-card {
    border-radius: 18px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.mode-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
}

.mode-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.3);
}

.mode-card:active { transform: scale(0.96); }

.mode-card.mode-daily {
    background: linear-gradient(135deg, #ffd700 0%, #b45309 100%);
}
.mode-card.mode-survival {
    background: linear-gradient(135deg, #f472b6 0%, #be185d 100%);
}
.mode-card.mode-study {
    background: linear-gradient(135deg, #34d399 0%, #047857 100%);
}
.mode-card.mode-duel {
    background: linear-gradient(135deg, #00c8ff 0%, #6366f1 100%);
}
.mode-card.mode-speedrun {
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
    color: #1a0a00;
}
.mode-card.mode-speedrun .mode-name,
.mode-card.mode-speedrun .mode-meta { color: #1a0a00; }
.mode-card.mode-treino {
    background: linear-gradient(135deg, #a78bfa 0%, #6d28d9 100%);
}

.mode-card.mode-done {
    opacity: 0.7;
}

.mode-card.mode-disabled {
    opacity: 0.5;
    filter: saturate(0.5);
}

.mode-card.mode-disabled:hover {
    transform: none;
}

.mode-icon {
    font-size: 36px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    z-index: 1;
    flex-shrink: 0;
}

.mode-info { z-index: 1; min-width: 0; flex: 1; }

.mode-name {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mode-meta {
    font-size: 11px;
    opacity: 0.92;
    font-weight: 600;
    line-height: 1.2;
}

/* ============================================
   GRID DE CONQUISTAS (no modal)
   ============================================ */
.achievements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.ach-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
    transition: transform 0.2s;
}

.ach-card.unlocked {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 0, 110, 0.12));
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.12);
}

.ach-card.locked {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.ach-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.25);
}

.ach-card.unlocked .ach-card-icon {
    background: linear-gradient(135deg, #ffd700, #ff006e);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.ach-card-info { flex: 1; min-width: 0; }

.ach-card-name {
    font-size: 14px;
    font-weight: 800;
    color: white;
    margin-bottom: 2px;
}

.ach-card-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    line-height: 1.3;
}

/* Contador X/Y no botão de Conquistas */
.ach-counter {
    background: rgba(0, 0, 0, 0.35);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    color: #ffd700;
}

/* Contador de missões */
.mission-counter {
    background: rgba(0, 0, 0, 0.35);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
}

.mission-counter.has-claimable {
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    color: #1a0a00;
    animation: pulse 1.4s ease-in-out infinite;
}

/* Botões especiais (Missões + Loja) — destaque colorido */
.user-panel-action.missions-btn {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.18), rgba(255, 0, 110, 0.15));
    border-color: rgba(0, 200, 255, 0.4);
    color: #00c8ff;
}
.user-panel-action.missions-btn:hover {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.3), rgba(255, 0, 110, 0.25));
    color: white;
}

.user-panel-action.shop-btn {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 107, 53, 0.15));
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
}
.user-panel-action.shop-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 107, 53, 0.25));
    color: white;
}

/* ============================================
   MODAL DE MISSÕES
   ============================================ */
.missions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mission-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px;
    transition: all 0.3s;
}

.mission-card.mission-ready {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.15), rgba(255, 0, 110, 0.12));
    border-color: rgba(0, 200, 255, 0.45);
    box-shadow: 0 6px 20px rgba(0, 200, 255, 0.18);
}

.mission-card.mission-claimed {
    opacity: 0.55;
    filter: grayscale(0.6);
}

.mission-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mission-icon { font-size: 24px; flex-shrink: 0; }

.mission-label {
    font-size: 13px;
    color: white;
    font-weight: 600;
    line-height: 1.3;
}

.mission-label b { font-weight: 900; color: #ffd700; }

.mission-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.mission-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00c8ff, #ff006e);
    border-radius: 4px;
    transition: width 0.6s ease;
    box-shadow: 0 0 8px rgba(0, 200, 255, 0.4);
}

.mission-card.mission-ready .mission-bar-fill {
    background: linear-gradient(90deg, #ffd700, #ff006e);
    animation: mission-bar-shine 2s ease-in-out infinite;
}

@keyframes mission-bar-shine {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.4); }
    50%      { box-shadow: 0 0 18px rgba(255, 215, 0, 0.7); }
}

.mission-foot {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 8px;
}

.mission-progress {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.mission-reward {
    color: #ffd700;
    font-weight: 800;
}

.mission-claim-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd700, #ff006e);
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 4px;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.35);
    transition: all 0.2s;
    animation: pulse 1.6s ease-in-out infinite;
}

.mission-claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
}

.mission-status {
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: #00ff88;
    margin-top: 6px;
}

/* ============================================
   MODAL DA LOJA
   ============================================ */
.shop-balance {
    text-align: center;
    font-size: 16px;
    color: white;
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.18), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(0, 200, 255, 0.4);
    padding: 10px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 700;
}

.shop-balance strong {
    color: #00c8ff;
    font-size: 22px;
    font-weight: 900;
}

.shop-owned {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    padding: 8px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    margin-bottom: 10px;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px;
}

.shop-item-locked { opacity: 0.55; }

.shop-item-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shop-item-info { flex: 1; min-width: 0; }

.shop-item-name {
    font-size: 13px;
    font-weight: 800;
    color: white;
    margin-bottom: 2px;
}

.shop-item-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.3;
}

.shop-item-btn {
    background: linear-gradient(135deg, #00c8ff, #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 200, 255, 0.3);
}

.shop-item-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 200, 255, 0.45);
}

.shop-item-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

/* ============================================
   COROAS NOS CARDS DE CATEGORIA
   ============================================ */
.category-crowns {
    display: inline-flex;
    gap: 1px;
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
}

.category-crowns .crown {
    font-size: 10px;
    opacity: 0.25;
    filter: grayscale(1);
    transition: all 0.4s;
}

.category-crowns .crown.crown-on {
    opacity: 1;
    filter: none;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.6);
}

/* ============================================
   TOAST de Conquista (canto da tela)
   ============================================ */
.achievement-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 0, 110, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(20px);
    max-width: 360px;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.achievement-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.ach-toast-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    animation: ach-bounce 0.6s ease;
}

@keyframes ach-bounce {
    0%, 100% { transform: scale(1) rotate(0); }
    40%      { transform: scale(1.3) rotate(-10deg); }
    70%      { transform: scale(0.9) rotate(5deg); }
}

.ach-toast-content { color: white; min-width: 0; }

.ach-toast-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 2px;
}

.ach-toast-name {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.ach-toast-desc {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
    line-height: 1.2;
}

@media (max-width: 500px) {
    .achievement-toast {
        right: 12px;
        left: 12px;
        max-width: none;
    }
}

/* ============================================
   TOAST (notificação no topo) — substitui alert()
   ============================================ */
.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 92vw;
    width: 420px;
}

.qg-toast {
    background: rgba(20, 20, 35, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 14px 18px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: opacity 0.35s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    cursor: pointer;
}

.qg-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.qg-toast .toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.qg-toast .toast-msg {
    flex: 1;
}

.toast-success {
    border-color: rgba(0, 255, 136, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 255, 136, 0.2);
}

.toast-error {
    border-color: rgba(255, 77, 109, 0.45);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 77, 109, 0.2);
}

.toast-info {
    border-color: rgba(0, 200, 255, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 200, 255, 0.2);
}

.toast-warning {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 215, 0, 0.2);
}

/* ============================================
   DIALOG (substitui confirm())
   ============================================ */
.qg-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 3500;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.qg-dialog-overlay.show { opacity: 1; }

.qg-dialog {
    background: rgba(20, 20, 35, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 26px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
    transform: scale(0.85) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qg-dialog-overlay.show .qg-dialog {
    transform: scale(1) translateY(0);
}

.qg-dialog-icon {
    font-size: 46px;
    margin-bottom: 10px;
    line-height: 1;
}

.qg-dialog-title {
    font-size: 19px;
    font-weight: 900;
    color: white;
    margin-bottom: 8px;
    line-height: 1.2;
}

.qg-dialog-msg {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 22px;
    white-space: pre-line;
}

.qg-dialog-actions {
    display: flex;
    gap: 10px;
}

.qg-dialog-btn {
    flex: 1;
    padding: 13px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
}

.qg-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.qg-cancel:hover {
    background: rgba(255, 255, 255, 0.14);
    color: white;
}

.qg-confirm {
    background: linear-gradient(135deg, #ff006e, #c2185b);
    color: white;
    box-shadow: 0 6px 16px rgba(255, 0, 110, 0.4);
}

.qg-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(255, 0, 110, 0.5);
}

.qg-confirm:active { transform: scale(0.97); }

/* Variante perigo (reset) */
.qg-dialog-overlay.dialog-danger .qg-confirm {
    background: linear-gradient(135deg, #ff4d6d, #b91c1c);
    box-shadow: 0 6px 16px rgba(255, 77, 109, 0.4);
}

.qg-dialog-overlay.dialog-danger .qg-confirm:hover {
    box-shadow: 0 10px 22px rgba(255, 77, 109, 0.5);
}

.home-footer {
    text-align: center;
    padding: 16px 0 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   TELAS DO QUIZ
   ============================================ */

.screen {
    display: none;
    flex: 1;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
}

.screen.active { display: flex; }

/* ----- TELA INICIAL DO QUIZ ----- */
.screen-start {
    position: relative;
    justify-content: center;
    text-align: center;
}

.btn-back, .btn-sound {
    position: absolute;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    z-index: 5;
}

.btn-back { left: 0; }
.btn-sound { right: 0; font-size: 18px; }

.btn-back:hover, .btn-sound:hover { background: rgba(255, 255, 255, 0.2); }
.btn-back:active, .btn-sound:active { transform: scale(0.92); }

.start-content { animation: fadeInUp 0.6s ease-out; }

.start-emoji {
    font-size: 96px;
    margin-bottom: 18px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
    animation: float 3s ease-in-out infinite;
}

.start-title {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: -1px;
    /* Gradiente colorido neon — chama atenção igual o logo */
    background: linear-gradient(135deg, #ffffff 0%, #fde4f0 25%, #00c8ff 50%, #ff006e 75%, #ffd700 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: start-title-shimmer 5s linear infinite, start-title-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    filter: drop-shadow(0 4px 18px rgba(255, 0, 110, 0.35));
    position: relative;
}

/* Estrelinhas sparkle decorando o título */
.start-title::before,
.start-title::after {
    content: '✨';
    position: absolute;
    font-size: 22px;
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    animation: start-sparkle 2s ease-in-out infinite;
}
.start-title::before {
    top: -8px;
    left: -18px;
    animation-delay: 0s;
}
.start-title::after {
    top: -4px;
    right: -22px;
    animation-delay: 0.7s;
}

@keyframes start-title-shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 300% center; }
}

@keyframes start-title-pop {
    0%   { opacity: 0; transform: scale(0.5) translateY(20px); }
    60%  { opacity: 1; transform: scale(1.08) translateY(-4px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes start-sparkle {
    0%, 100% { opacity: 0.4; transform: scale(0.8) rotate(0deg); }
    50%      { opacity: 1;   transform: scale(1.2) rotate(180deg); }
}

.start-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 28px;
    line-height: 1.5;
    padding: 0 20px;
    font-weight: 500;
    animation: fadeInUp 0.6s ease-out 0.15s backwards;
}

.start-info {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

/* Info-items viraram "chips" coloridos com glow sutil */
.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 7px 12px;
    border-radius: 30px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.info-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.info-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.info-text strong { color: white; font-weight: 900; }

/* Em low-end: para o shimmer infinito mas mantém o gradient e o pop de entrada */
body.low-end .start-title {
    animation: start-title-pop 0.5s ease-out backwards !important;
}
body.low-end .start-title::before,
body.low-end .start-title::after {
    animation: none !important;
    opacity: 0.6;
}

.start-record {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 0, 110, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 22px;
    font-size: 13px;
    font-weight: 700;
    color: #ffd700;
}

.record-icon { font-size: 16px; }

/* ============================================
   BOTÕES
   ============================================ */

.btn-primary {
    width: 100%;
    max-width: 320px;
    padding: 18px 32px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff006e 0%, #c2185b 100%);
    color: white;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 0, 110, 0.4);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    margin: 0 auto;
    display: block;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 0, 110, 0.5);
}

.btn-primary:hover::before { left: 100%; }

.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
    width: 100%;
    max-width: 320px;
    padding: 16px 32px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 12px auto 0;
    display: block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.btn-tertiary {
    display: inline-block;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    transition: color 0.2s;
}

.btn-tertiary:hover {
    color: white;
    text-decoration: underline;
}

/* Botão de baixar imagem pro TikTok — destaque */
.btn-share-image {
    width: 100%;
    max-width: 320px;
    margin: 12px auto 0;
    display: block;
    padding: 16px 24px;
    border: 2px solid transparent;
    border-radius: 50px;
    background:
        linear-gradient(#1a0a2a, #1a0a2a) padding-box,
        linear-gradient(135deg, #ffd700, #ff006e, #00c8ff) border-box;
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 22px rgba(255, 215, 0, 0.25),
        0 0 16px rgba(255, 0, 110, 0.2);
}

.btn-share-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.7s;
}

.btn-share-image:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 30px rgba(255, 215, 0, 0.35),
        0 0 24px rgba(255, 0, 110, 0.3);
}

.btn-share-image:hover::after { left: 100%; }
.btn-share-image:active { transform: scale(0.97); }
.btn-share-image:disabled { opacity: 0.7; cursor: default; }

/* Botões secundários lado a lado na tela de resultado */
.result-actions-row {
    display: flex;
    gap: 10px;
    max-width: 320px;
    width: 100%;
    margin: 12px auto 0;
}

.btn-secondary-alt {
    flex: 1;
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary-alt:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 16px rgba(255, 215, 0, 0.15);
}

.btn-secondary-alt:active {
    transform: scale(0.97);
}

/* ============================================
   TELA DE PERGUNTAS
   ============================================ */

.quiz-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 8px;
}

.btn-back-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.btn-back-small:hover { background: rgba(255, 255, 255, 0.2); }

/* CORAÇÕES (vidas) */
.hearts {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.heart {
    font-size: 22px;
    transition: all 0.3s;
    filter: drop-shadow(0 2px 6px rgba(255, 0, 0, 0.3));
}

.heart.lost {
    opacity: 0.35;
    filter: grayscale(1);
    transform: scale(0.85);
}

.heart.breaking {
    animation: heart-break 0.4s ease;
}

@keyframes heart-break {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.5) rotate(-15deg); }
    60%  { transform: scale(0.6) rotate(10deg); }
    100% { transform: scale(0.85); }
}

/* SCORE */
.quiz-score {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    color: #ffd700;
    flex-shrink: 0;
    transition: all 0.3s;
}

.score-icon { font-size: 14px; }

/* LINHA DE PROGRESSO */
.progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
    flex-shrink: 0;
    min-width: 32px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    flex: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff006e 0%, #00c8ff 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
    box-shadow: 0 0 8px rgba(255, 0, 110, 0.4);
}

/* STREAK (combo) */
.streak {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.5);
    padding: 4px 10px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 13px;
    color: #ff6b35;
    transition: opacity 0.3s, transform 0.2s;
    flex-shrink: 0;
    opacity: 0;
}

.streak.pulse { animation: streak-pulse 0.4s ease; }

@keyframes streak-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.streak .streak-icon { font-size: 14px; }

/* TIMER */
.timer-wrapper {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 18px;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88 0%, #ffd700 50%, #ff006e 100%);
    width: 100%;
    transform-origin: left;
    border-radius: 2px;
}

@keyframes countdown {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ÁREA DA PERGUNTA */
.question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 0 12px;
}

.question-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
    min-height: 90px;
}

.question-emoji {
    font-size: 80px;
    line-height: 1;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.4));
    animation: emoji-enter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.question-image {
    max-width: 180px;
    max-height: 180px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: emoji-enter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    object-fit: cover;
}

@keyframes emoji-enter {
    from { opacity: 0; transform: scale(0.4) rotate(-12deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}

.question-text {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    margin-bottom: 22px;
    padding: 0 4px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-out;
}

.answers-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-btn {
    padding: 15px 17px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.4s ease-out backwards;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.answer-btn:nth-child(1) { animation-delay: 0.05s; }
.answer-btn:nth-child(2) { animation-delay: 0.10s; }
.answer-btn:nth-child(3) { animation-delay: 0.15s; }
.answer-btn:nth-child(4) { animation-delay: 0.20s; }

.answer-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.answer-text { flex: 1; line-height: 1.3; }

.answer-btn:not(:disabled):hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.answer-btn:not(:disabled):active { transform: scale(0.98); }

.answer-btn:disabled { cursor: default; opacity: 0.55; }

.answer-btn.correct {
    background: linear-gradient(135deg, #00b347 0%, #006e2e 100%);
    border-color: #00ff88;
    opacity: 1;
    animation: correct-pulse 0.5s ease;
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
}

.answer-btn.correct .answer-letter {
    background: rgba(255, 255, 255, 0.3);
}

.answer-btn.wrong {
    background: linear-gradient(135deg, #e11d48 0%, #7c1d3c 100%);
    border-color: #ff4d6d;
    opacity: 1;
    animation: shake 0.5s ease;
    box-shadow: 0 4px 16px rgba(255, 77, 109, 0.3);
}

.answer-btn.wrong .answer-letter {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes correct-pulse {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.04); }
}

/* FEEDBACK */
.feedback {
    text-align: center;
    padding: 12px;
    font-size: 17px;
    font-weight: 800;
    min-height: 48px;
    opacity: 0;
    transition: opacity 0.25s;
}

.feedback.show { opacity: 1; }
.feedback.correct { color: #00ff88; text-shadow: 0 0 12px rgba(0, 255, 136, 0.4); }
.feedback.wrong   { color: #ff4d6d; text-shadow: 0 0 12px rgba(255, 77, 109, 0.4); }

/* ============================================
   MODAL DE STATS
   ============================================ */
.stats-overall {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 6px;
}

.stats-overall-row {
    display: flex;
    gap: 8px;
}

.stat-mini {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
}

.stat-mini-val {
    font-size: 18px;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #ffd700, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-mini-lbl {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}

.stats-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-cat-card {
    border-radius: 16px;
    padding: 12px 14px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.stats-cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 60%);
    pointer-events: none;
}

.stats-cat-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.stats-cat-emoji { font-size: 22px; }

.stats-cat-name {
    font-weight: 900;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.stats-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    position: relative;
    z-index: 1;
}

.stats-cat-grid > div {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 8px 4px;
    text-align: center;
}

.stats-cat-grid strong {
    display: block;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 3px;
}

.stats-cat-grid span {
    font-size: 9px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

/* ============================================
   MODAL DE CONFIGURAÇÕES
   ============================================ */
.settings-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #ff4d6d;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: white;
    font-weight: 600;
}

.setting-icon { font-size: 20px; }

.setting-hint-inline {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    margin-top: 2px;
}

.setting-row + .setting-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Toggle estilo iOS */
.setting-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 26px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    outline: none;
}

.setting-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.setting-toggle:checked {
    background: linear-gradient(135deg, #00ff88, #00b347);
}

.setting-toggle:checked::after {
    transform: translateX(18px);
}

.btn-danger {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 77, 109, 0.4);
    background: rgba(255, 77, 109, 0.12);
    color: #ff4d6d;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(255, 77, 109, 0.25);
    color: white;
    border-color: #ff4d6d;
}

.settings-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    line-height: 1.4;
}

.settings-about {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.settings-about strong {
    color: white;
    font-weight: 800;
}

.settings-credit {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   MODAL DE REVISÃO DE RESPOSTAS
   ============================================ */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px;
    border-left: 4px solid rgba(255, 255, 255, 0.2);
}

.review-card.review-correct { border-left-color: #00ff88; }
.review-card.review-wrong   { border-left-color: #ff4d6d; }

.review-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.review-num {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.review-emoji {
    font-size: 22px;
}

.review-status {
    margin-left: auto;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.review-card.review-correct .review-status { color: #00ff88; }
.review-card.review-wrong   .review-status { color: #ff4d6d; }

.review-q {
    font-size: 14px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    line-height: 1.3;
}

.review-opts {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.15);
}

.review-opt.opt-correct {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    font-weight: 700;
}

.review-opt.opt-wrong {
    color: #ff4d6d;
    background: rgba(255, 77, 109, 0.1);
    border: 1px solid rgba(255, 77, 109, 0.3);
    font-weight: 700;
    text-decoration: line-through;
}

.opt-letter {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

.review-fact {
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(0, 200, 255, 0.08);
    border: 1px solid rgba(0, 200, 255, 0.25);
    border-radius: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

/* ============================================
   TUTORIAL / ONBOARDING (carrossel de slides)
   ============================================ */
.tutorial-modal .tutorial-content {
    max-width: 440px;
    padding: 30px 24px 22px;
    position: relative;
    overflow: hidden;
}

.tutorial-skip {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.tutorial-skip:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.tutorial-slides {
    position: relative;
    min-height: 280px;
    margin-bottom: 20px;
}

.tutorial-slide {
    position: absolute;
    inset: 0;
    text-align: center;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.tutorial-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}

.tutorial-visual {
    font-size: 76px;
    line-height: 1;
    margin-bottom: 16px;
    animation: tutorial-bounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 8px 20px rgba(255, 0, 110, 0.35));
}

@keyframes tutorial-bounce {
    0%   { transform: scale(0.3); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.tutorial-title {
    font-size: 24px;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    line-height: 1.15;
}

.tutorial-accent {
    background: linear-gradient(135deg, #ff006e 0%, #00c8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tutorial-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-bottom: 10px;
    font-weight: 500;
}

.tutorial-text strong {
    color: white;
    font-weight: 800;
}

.tutorial-text-small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.45;
    font-weight: 500;
    margin-top: 4px;
}

/* Dots de progresso */
.tutorial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}

.tutorial-dot.active {
    background: linear-gradient(135deg, #ff006e, #00c8ff);
    width: 28px;
    border-radius: 4px;
}

/* Botões de navegação */
.tutorial-nav {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.tutorial-btn {
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.2s;
}

.tutorial-btn-back {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.tutorial-btn-back:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.tutorial-btn-next,
.tutorial-btn-finish {
    flex: 1;
    background: linear-gradient(135deg, #ff006e, #c2185b);
    color: white;
    box-shadow: 0 6px 16px rgba(255, 0, 110, 0.4);
}

.tutorial-btn-next:hover,
.tutorial-btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(255, 0, 110, 0.55);
}

.tutorial-btn-finish {
    background: linear-gradient(135deg, #ffd700, #ff006e);
}

/* ============================================
   BOTÃO HINT "Eliminar 2"
   ============================================ */
.btn-hint {
    margin: 16px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 0, 110, 0.15));
    border-radius: 50px;
    color: #ffd700;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.15);
    align-self: center;
}

.btn-hint:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 0, 110, 0.25));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(255, 215, 0, 0.25);
}

.btn-hint:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Container que agrupa os power-ups durante a partida */
.quiz-powerups {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.quiz-powerups .btn-hint { margin: 0; }

/* +10s tempo extra: visual ciano */
.btn-power-time {
    border-color: rgba(0, 200, 255, 0.4) !important;
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.18), rgba(99, 102, 241, 0.15)) !important;
    color: #00c8ff !important;
}
.btn-power-time:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.3), rgba(99, 102, 241, 0.25)) !important;
    color: white !important;
    box-shadow: 0 8px 18px rgba(0, 200, 255, 0.25);
}

/* Pular pergunta: visual verde */
.btn-power-skip {
    border-color: rgba(52, 211, 153, 0.4) !important;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(4, 120, 87, 0.15)) !important;
    color: #34d399 !important;
}
.btn-power-skip:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.3), rgba(4, 120, 87, 0.25)) !important;
    color: white !important;
    box-shadow: 0 8px 18px rgba(52, 211, 153, 0.25);
}

.hint-cost {
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: white;
}

/* Alternativa eliminada pelo hint */
.answer-btn.eliminated {
    opacity: 0.25;
    text-decoration: line-through;
    pointer-events: none;
    filter: grayscale(1);
}

/* ============================================
   TIMER do SPEED RUN (60s)
   ============================================ */
.speedrun-timer {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid #00c8ff;
    background: rgba(0, 200, 255, 0.12);
    color: #00c8ff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.4px;
    transition: color 0.3s, border-color 0.3s;
}

.speedrun-timer strong {
    font-size: 18px;
    font-weight: 900;
    margin-left: 4px;
}

/* ============================================
   MODO DUELO (2 Jogadores)
   ============================================ */

/* Splash de "VEZ DE X" */
.duel-splash {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
    background: rgba(5, 5, 16, 0.92);
}

.duel-splash.show {
    opacity: 1;
    pointer-events: auto;
}

.duel-splash .splash-label {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 8px;
    margin-bottom: 6px;
    text-shadow: 0 0 24px currentColor;
    animation: splash-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.duel-splash .splash-name {
    font-size: 64px;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
    letter-spacing: -1px;
    animation: splash-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0 20px;
    text-align: center;
}

.duel-splash .splash-sub {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    animation: splash-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes splash-pop {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

/* Placar VS do duelo */
.duel-vs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 4px;
}

.duel-side {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 16px 8px;
    text-align: center;
    transition: all 0.4s;
    position: relative;
}

.duel-side.winner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 0, 110, 0.25));
    border-color: #ffd700;
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.duel-name {
    font-size: 14px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.duel-side.winner .duel-name { color: #ffd700; }

.duel-score {
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #ffd700, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.duel-correct {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 700;
}

.duel-crown {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 36px;
    animation: crown-bounce 1s ease infinite alternate;
}

@keyframes crown-bounce {
    from { transform: translateX(-50%) translateY(0); }
    to   { transform: translateX(-50%) translateY(-6px); }
}

.duel-vs-text {
    font-size: 24px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    flex-shrink: 0;
}

/* Modal de Setup do Duelo */
.duel-setup {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.duel-input-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.4px;
    margin-bottom: -6px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Inputs lado a lado dos 2 jogadores */
.duel-players-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.duel-player-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.duel-player-field .name-prompt-input {
    width: 100%;
    font-size: 14px;
    padding: 10px 12px;
}

.player-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.player-num.p1 { background: #00c8ff; box-shadow: 0 0 8px rgba(0, 200, 255, 0.5); }
.player-num.p2 { background: #ff006e; box-shadow: 0 0 8px rgba(255, 0, 110, 0.5); }

.duel-vs-mini {
    font-size: 16px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.45);
    padding-bottom: 12px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.duel-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.duel-cat-opt {
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.duel-cat-opt > span:first-child { font-size: 20px; }

.duel-cat-opt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.duel-cat-opt.selected {
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25), 0 8px 20px rgba(255, 215, 0, 0.3);
}

.duel-setup .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* "Sabia que?" — curiosidade após responder */
.fact-box {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(0, 200, 255, 0.4);
    border-radius: 14px;
    padding: 10px 14px;
    margin: 0 auto;
    max-width: 460px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.4;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 14px rgba(0, 200, 255, 0.12);
    display: none;
}

.fact-box.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.fact-label {
    display: inline-block;
    color: #00c8ff;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.4px;
    margin-right: 6px;
}

.fact-text { font-weight: 500; }

/* POP-UP DE COMBO */
.combo-popup {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 1000;
    pointer-events: none;
    text-align: center;
    opacity: 0;
}

.combo-popup.show { animation: combo-pop 1.4s ease forwards; }

.combo-popup-text {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(255, 0, 110, 0.6);
    letter-spacing: 1px;
}

.combo-popup-multiplier {
    font-size: 72px;
    font-weight: 900;
    color: #ffd700;
    line-height: 1;
    text-shadow: 0 6px 24px rgba(255, 215, 0, 0.7), 0 0 40px rgba(255, 215, 0, 0.4);
}

@keyframes combo-pop {
    0%   { transform: translate(-50%, -50%) scale(0) rotate(-10deg); opacity: 0; }
    15%  { transform: translate(-50%, -50%) scale(1.3) rotate(5deg); opacity: 1; }
    30%  { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
    80%  { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* ============================================
   TELA DE RESULTADO
   ============================================ */

.screen-result {
    justify-content: center;
    text-align: center;
}

.result-content { animation: fadeInUp 0.6s ease-out; }

.result-emoji {
    font-size: 90px;
    margin-bottom: 14px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
    animation: bounce 1s ease;
}

.result-title {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.result-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 22px;
    padding: 0 16px;
}

.result-score {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18) 0%, rgba(255, 0, 110, 0.18) 100%);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 24px;
    padding: 20px;
    margin: 0 auto 16px;
    max-width: 320px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 12px 32px rgba(255, 0, 110, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.result-score::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.12), transparent, rgba(255, 0, 110, 0.12), transparent);
    animation: rotate-shine 8s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.result-score > * { position: relative; z-index: 1; }

@keyframes rotate-shine {
    to { transform: rotate(360deg); }
}

.score-big {
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #ffd700 0%, #ff006e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.new-record-badge {
    display: inline-block;
    margin-top: 10px;
    background: linear-gradient(135deg, #ffd700, #ff6b35);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.4);
    animation: record-bounce 0.6s ease;
}

@keyframes record-bounce {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    60%  { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.result-stats {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin: 0 auto 18px;
    max-width: 320px;
}

.stat {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 6px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    transition: transform 0.2s;
}

.stat:hover { transform: translateY(-3px); }

.stat-value { font-size: 22px; font-weight: 900; margin-bottom: 2px; }
.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* XP RESULT — Glassmorphism com bloco de rank */
.xp-result {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 16px 18px;
    margin: 0 auto 16px;
    max-width: 340px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.xp-result-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.result-rank-block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.result-rank-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #86efac, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

.result-rank-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
}

.result-rank-info {
    text-align: left;
    min-width: 0;
}

.result-rank-name {
    font-size: 13px;
    font-weight: 900;
    color: white;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 4px;
}

.result-rank-level {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

.result-rank-level strong {
    color: white;
    font-weight: 900;
}

.xp-result-gained {
    color: #00ff88;
    font-weight: 900;
    font-size: 16px;
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
    flex-shrink: 0;
}

.xp-result-gained strong { font-size: 20px; }

.xp-bar {
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ff006e 100%);
    width: 0;
    transition: width 1.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    border-radius: 6px;
    position: relative;
}

.xp-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 50%);
    border-radius: 6px;
}

.xp-bar-shine {
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: xp-shine 2.5s ease-in-out infinite;
    pointer-events: none;
}

.xp-result-bottom {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 8px;
    font-weight: 600;
    text-align: center;
}

.level-up-banner {
    background: linear-gradient(135deg, #ffd700 0%, #ff006e 100%);
    color: white;
    font-weight: 900;
    padding: 12px;
    border-radius: 14px;
    margin: 0 auto 16px;
    max-width: 320px;
    text-align: center;
    font-size: 16px;
    letter-spacing: 1px;
    animation: level-up-pulse 1s ease infinite;
    box-shadow: 0 6px 24px rgba(255, 215, 0, 0.4);
}

@keyframes level-up-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 8px 28px rgba(255, 215, 0, 0.55); }
}

.result-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   CONFETE
   ============================================ */

.confetti-piece {
    position: fixed;
    top: -20px;
    z-index: 9999;
    pointer-events: none;
    animation: confetti-fall linear forwards;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0.7;
    }
}

.confetti-burst-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    animation: confetti-burst 1.2s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes confetti-burst {
    0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3) rotate(540deg); opacity: 0; }
}

/* ============================================
   ANIMAÇÕES GERAIS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    25%      { transform: translateY(-20px); }
    50%      { transform: translateY(0); }
    75%      { transform: translateY(-10px); }
}

/* ============================================
   RESPONSIVO (telas maiores)
   ============================================ */

@media (min-width: 600px) {
    .logo-text { font-size: 40px; }
    .logo-icon { font-size: 46px; }
    .start-emoji { font-size: 110px; }
    .start-title { font-size: 40px; }
    .question-text { font-size: 24px; }
    .question-emoji { font-size: 100px; }
    .answer-btn { font-size: 16px; padding: 16px 20px; }
    .category-emoji { font-size: 52px; }
    .category-name { font-size: 19px; }
}

@media (max-width: 360px) {
    /* Logo encolhe em telas estreitas (320px etc.) pra "QUIZZYGENIUS" não cortar */
    .logo { gap: 8px; }
    .logo-text { font-size: 32px; }
    .logo-icon { font-size: 38px; }
    .start-info { gap: 12px; }
    .info-text { font-size: 12px; }
    .question-text { font-size: 18px; }
    .question-emoji { font-size: 68px; }
    .answer-btn { font-size: 14px; padding: 13px 14px; }
}

/* ============================================
   MASCOTE (Super Cérebro)
   ============================================ */

.mascot-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mascot-wrap {
    position: relative;
    display: inline-block;
    animation: mascot-idle 3.5s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.mascot-svg {
    display: block;
    overflow: visible;
}

/* Tamanhos (proporção 200x220 — cérebro com capa e máscara) */
.mascot-size-sm .mascot-svg { width: 72px;  height: 80px; }
.mascot-size-md .mascot-svg { width: 105px; height: 116px; }
.mascot-size-lg .mascot-svg { width: 140px; height: 154px; }

/* Saudação (home, quiz start, result) */
.mascot-greeting {
    padding-top: 46px;
    margin-bottom: 18px;
    animation: fadeInUp 0.6s ease-out;
}

/* Mascote flutuante (durante o quiz) */
.mascot-floating {
    position: fixed;
    bottom: 18px;
    right: 12px;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transform: translateX(120%) scale(0.4);
    transition: opacity 0.4s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mascot-floating.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Animação idle (flutuando levinho) */
@keyframes mascot-idle {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

/* Bounce quando muda de expressão */
.mascot-wrap.mascot-bounce {
    animation: mascot-bounce 0.45s ease, mascot-idle 3.5s ease-in-out infinite 0.45s;
}

@keyframes mascot-bounce {
    0%   { transform: scale(1) rotate(0); }
    35%  { transform: scale(1.15) rotate(-4deg); }
    65%  { transform: scale(0.95) rotate(3deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Capa balançando */
.mascot-svg .mascot-cape {
    transform-origin: 100px 90px;
    animation: cape-wave 3s ease-in-out infinite;
}

@keyframes cape-wave {
    0%, 100% { transform: skewX(0deg) translateX(0); }
    50%      { transform: skewX(-2deg) translateX(1px); }
}

/* ============================================
   EXPRESSÕES (alternam olhos e boca)
   ============================================ */

/* Esconde tudo por padrão */
.mascot-svg .eye-set,
.mascot-svg .mouth { display: none; }
.mascot-svg .cheek,
.mascot-svg .tear,
.mascot-svg .flame,
.mascot-svg .sparkle { opacity: 0; transition: opacity 0.3s; }

/* HAPPY (default) */
.mascot-svg.expr-happy .eye-normal,
.mascot-svg.expr-happy .mouth-smile { display: block; }
.mascot-svg.expr-happy .cheek { opacity: 0.55; }

/* EXCITED */
.mascot-svg.expr-excited .eye-stars,
.mascot-svg.expr-excited .mouth-big { display: block; }
.mascot-svg.expr-excited .cheek { opacity: 0.7; }
.mascot-svg.expr-excited .sparkle { opacity: 1; animation: sparkle-twinkle 1.2s ease-in-out infinite; }
.mascot-svg.expr-excited .sparkle-2 { animation-delay: 0.3s; }
.mascot-svg.expr-excited .sparkle-3 { animation-delay: 0.6s; }
.mascot-svg.expr-excited .sparkle-4 { animation-delay: 0.9s; }

/* SAD */
.mascot-svg.expr-sad .eye-sad,
.mascot-svg.expr-sad .mouth-sad { display: block; }
.mascot-svg.expr-sad .tear { opacity: 0.85; animation: tear-drop 1.5s ease-in-out infinite; }
.mascot-svg.expr-sad .tear-right { animation-delay: 0.3s; }

/* SHOCKED */
.mascot-svg.expr-shocked .eye-shocked,
.mascot-svg.expr-shocked .mouth-shocked { display: block; }

/* THINKING */
.mascot-svg.expr-thinking .eye-closed,
.mascot-svg.expr-thinking .mouth-flat { display: block; }

/* FIRE (em chamas) */
.mascot-svg.expr-fire .eye-stars,
.mascot-svg.expr-fire .mouth-big { display: block; }
.mascot-svg.expr-fire .flame { opacity: 1; animation: flame-flicker 0.35s ease-in-out infinite alternate; }
.mascot-svg.expr-fire .flame-2 { animation-delay: 0.1s; }
.mascot-svg.expr-fire .flame-3 { animation-delay: 0.2s; }

/* WINK */
.mascot-svg.expr-wink .eye-wink,
.mascot-svg.expr-wink .mouth-smirk { display: block; }
.mascot-svg.expr-wink .cheek { opacity: 0.6; }

/* DIZZY (game over) - cabeça toda balança */
.mascot-svg.expr-dizzy .eye-dizzy,
.mascot-svg.expr-dizzy .mouth-flat { display: block; }
.mascot-svg.expr-dizzy .mascot-body { animation: dizzy-spin 1.5s linear infinite; transform-origin: 100px 105px; }

@keyframes dizzy-spin {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
}

/* Animações dos efeitos */
@keyframes flame-flicker {
    from { transform: scale(1) translateY(0); opacity: 1; }
    to   { transform: scale(1.15) translateY(-4px); opacity: 0.85; }
}

@keyframes sparkle-twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.7) rotate(0); }
    50%      { opacity: 1;   transform: scale(1.2) rotate(15deg); }
}

@keyframes tear-drop {
    0%   { transform: translateY(-3px); opacity: 0; }
    20%  { opacity: 0.9; }
    100% { transform: translateY(12px); opacity: 0; }
}

/* ============================================
   BALÃOZINHO DE FALA
   ============================================ */

.speech-bubble {
    position: absolute;
    top: 0;
    left: 50%;
    background: white;
    color: #0a0a0a;
    padding: 10px 16px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateX(-50%) scale(0) translateY(8px);
    transform-origin: bottom center;
    transition: opacity 0.2s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 10;
    letter-spacing: 0.3px;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.speech-bubble.show {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
}

/* No mascote flutuante, balão aparece acima e à direita */
.mascot-floating .speech-bubble {
    top: auto;
    bottom: calc(100% + 10px);
    left: auto;
    right: 0;
    transform: scale(0) translateY(8px);
    transform-origin: bottom right;
}

.mascot-floating .speech-bubble.show {
    transform: scale(1) translateY(0);
}

.mascot-floating .speech-bubble::after {
    left: auto;
    right: 18px;
    transform: rotate(45deg);
}

/* ============================================
   RIPPLE (efeito de onda nos botões)
   ============================================ */

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transform: scale(0);
    animation: ripple-expand 0.7s ease-out;
}

@keyframes ripple-expand {
    to { transform: scale(2.2); opacity: 0; }
}

/* ============================================
   SPARKLES (faísquinhas ao hover nas categorias)
   ============================================ */

.sparkles-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
    z-index: 2;
}

.sparkle-dot {
    position: absolute;
    font-size: 16px;
    pointer-events: none;
    animation: sparkle-pop 1.1s ease-out forwards;
    z-index: 5;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

@keyframes sparkle-pop {
    0%   { opacity: 0; transform: scale(0) rotate(0deg); }
    40%  { opacity: 1; transform: scale(1.3) rotate(180deg); }
    100% { opacity: 0; transform: scale(0.3) rotate(360deg) translateY(-24px); }
}

/* ============================================
   AJUSTES NA TELA INICIAL DO QUIZ (mascote substitui o emoji)
   ============================================ */

.screen-start .mascot-greeting {
    margin-bottom: 22px;
}

/* Tela de resultado: mascote grande no topo */
.mascot-result {
    margin-bottom: 12px;
}

/* ============================================
   PROMPT DE NOME (1ª visita)
   ============================================ */
.name-prompt {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 0, 110, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
    animation: fadeInUp 0.7s ease-out;
    transition: all 0.5s;
}

.name-prompt.saved {
    transform: scale(0.95);
    opacity: 0;
}

.name-prompt-label {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.name-prompt-row {
    display: flex;
    gap: 8px;
}

.name-prompt-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 14px;
    color: white;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s;
}

.name-prompt-input:focus {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.name-prompt-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.name-prompt-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd700 0%, #ff006e 100%);
    color: white;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
    box-shadow: 0 4px 14px rgba(255, 0, 110, 0.4);
}

.name-prompt-btn:active { transform: scale(0.92); }
.name-prompt-btn:hover { transform: translateY(-2px); }

/* Tag do rank ao lado do nome */
.rank-tag {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Botão de editar nome (lápis) */
.btn-edit-name {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    margin-left: 4px;
    font-size: 11px;
    cursor: pointer;
    vertical-align: middle;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.6;
}

.btn-edit-name:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    opacity: 1;
    transform: scale(1.1);
}

/* ============================================
   AÇÕES DO PAINEL DO USUÁRIO (Ranks, Instalar)
   ============================================ */
.user-panel-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.user-panel-action {
    flex: 1 1 calc(50% - 3px);
    min-width: 90px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 9px 8px;
    color: rgba(255, 255, 255, 0.85);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.user-panel-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 215, 0, 0.4);
    color: white;
    transform: translateY(-1px);
}

.user-panel-action span { font-size: 16px; }

/* Botão "Instalar app" — cor especial pra destacar */
.user-panel-action.install-btn {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(0, 200, 255, 0.45);
    color: #00c8ff;
    animation: install-glow 2.4s ease-in-out infinite;
}

.user-panel-action.install-btn:hover {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.35), rgba(139, 92, 246, 0.35));
    border-color: rgba(0, 200, 255, 0.7);
    color: white;
}

@keyframes install-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(0, 200, 255, 0); }
    50%      { box-shadow: 0 0 16px rgba(0, 200, 255, 0.35); }
}

/* ============================================
   MODAL DO PLACAR DE RANKS
   ============================================ */
.ranks-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Safe-area: evita modais ficarem sob notch/home indicator no iPhone */
    padding:
        max(20px, env(safe-area-inset-top))
        max(20px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom))
        max(20px, env(safe-area-inset-left));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0s linear 0.3s;
}

.ranks-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s, visibility 0s linear 0s;
}

.ranks-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ranks-modal-content {
    position: relative;
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(20, 20, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 22px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ranks-modal.open .ranks-modal-content {
    transform: scale(1) translateY(0);
}

.ranks-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ranks-modal-title {
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.ranks-modal-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranks-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.ranks-modal-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 18px;
}

.ranks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.rank-card.current {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--rank-start) 20%, transparent),
        color-mix(in srgb, var(--rank-end) 20%, transparent));
    border-color: var(--rank-end);
    box-shadow: 0 6px 24px color-mix(in srgb, var(--rank-end) 35%, transparent);
    transform: scale(1.02);
}

.rank-card.locked {
    opacity: 0.55;
}

.rank-card-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--rank-start) 0%, var(--rank-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--rank-end) 40%, transparent);
}

.rank-card-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
}

.rank-card.locked .rank-card-badge {
    filter: grayscale(0.6);
    box-shadow: none;
}

.rank-card-icon {
    font-size: 30px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    z-index: 1;
    position: relative;
}

.rank-card-info { flex: 1; min-width: 0; }

.rank-card-name {
    font-size: 17px;
    font-weight: 900;
    color: white;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.rank-card-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    margin-bottom: 6px;
}

.rank-card-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.rank-card-status.current {
    background: linear-gradient(135deg, var(--rank-start), var(--rank-end));
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--rank-end) 40%, transparent);
    animation: pulse 2s ease-in-out infinite;
}

.rank-card-status.achieved {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.rank-card-status.locked {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   IMAGEM REAL DA PERGUNTA (com loading e fallback)
   ============================================ */
.question-image-wrap {
    position: relative;
    display: inline-block;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.08);
    animation: emoji-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 220px;
    max-height: 220px;
}

.question-image-wrap.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg,
            rgba(255,255,255,0.05) 0%,
            rgba(255,255,255,0.15) 50%,
            rgba(255,255,255,0.05) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    z-index: 1;
}

@keyframes skeleton-shimmer {
    0%   { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

.question-image-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    opacity: 0.4;
    z-index: 2;
}

.question-image-wrap .question-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 220px;
    max-height: 220px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 18px;
    margin: 0;
    animation: none;
    box-shadow: none;
}

.question-image-wrap.loaded .question-image {
    opacity: 1;
}

.question-image-wrap.loaded .question-image-loader { display: none; }

@media (min-width: 600px) {
    .question-image-wrap,
    .question-image-wrap .question-image {
        max-width: 260px;
        max-height: 260px;
    }
}

/* Na categoria "Adivinha?", a imagem é o protagonista — maior */
body.quiz-cat-adivinha .question-image-wrap,
body.quiz-cat-adivinha .question-image-wrap .question-image {
    max-width: 280px;
    max-height: 280px;
}

body.quiz-cat-adivinha .question-text {
    font-size: 17px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

@media (min-width: 600px) {
    body.quiz-cat-adivinha .question-image-wrap,
    body.quiz-cat-adivinha .question-image-wrap .question-image {
        max-width: 340px;
        max-height: 340px;
    }
}

/* ============================================
   OTIMIZAÇÃO PARA DISPOSITIVOS FRACOS
   Aplicada via Effects.device.applyClasses() no JS:
   - body.low-end: mobile, CPU<4 cores, RAM<4GB, reduced-motion
   - body.is-touch: tela com toque (celular/tablet)
   ============================================ */

/* Fundo animado: orbs gigantes com blur custam GPU. Desliga em low-end. */
body.low-end .bg-orbs { display: none; }
body.low-end .bg-grid { opacity: 0.4; }

/* backdrop-filter é um dos efeitos mais pesados que existe.
   Em low-end, substitui por background opaco (visual quase igual). */
body.low-end .user-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(20, 20, 35, 0.92);
}
body.low-end .ranks-modal-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.85);
}
body.low-end .achievement-toast,
body.low-end .qg-dialog,
body.low-end .qg-toast,
body.low-end .name-prompt,
body.low-end .btn-secondary-alt,
body.low-end .answer-btn,
body.low-end .btn-hint,
body.low-end .fact-box,
body.low-end .result-score,
body.low-end .stat,
body.low-end .xp-result {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Animações infinitas custam ciclos contínuos da CPU/GPU.
   Para todas em low-end (logo, mascote, sparkles do mascote). */
body.low-end .logo-icon,
body.low-end .logo-text,
body.low-end .logo-accent,
body.low-end .start-emoji,
body.low-end .orb,
body.low-end .mascot-svg .mascot-cape,
body.low-end .mascot-svg .sparkle,
body.low-end .user-xp-shine,
body.low-end .mission-counter,
body.low-end .level-reward-counter,
body.low-end .install-btn,
body.low-end .god-btn,
body.low-end .rank-reward-burst,
body.low-end .rank-reward-promo-label,
body.low-end .rank-reward-rank-name {
    animation: none !important;
}

/* Bounce do mascote quando muda expressão: mantém o pulinho mas remove
   o mascot-idle infinito que vinha depois. */
body.low-end .mascot-wrap.mascot-bounce {
    animation: mascot-bounce 0.45s ease !important;
}

/* Modal fechado: pausa qualquer animação por dentro. Vários modais
   (recompensa de rank, caixa diária) tinham animações em loop rodando
   atrás das cenas — gastando GPU/CPU à toa mesmo com o modal invisível.
   Vale pra todos os aparelhos, não só os fracos. */
.ranks-modal:not(.open),
.ranks-modal:not(.open) *,
.ranks-modal:not(.open) *::before,
.ranks-modal:not(.open) *::after {
    animation-play-state: paused !important;
}

/* Animações de entrada (fadeInUp) ficam mais rápidas — site abre "no soco". */
body.low-end .category-card,
body.low-end .mode-card,
body.low-end .user-panel,
body.low-end .home-header,
body.low-end .mascot-greeting,
body.low-end .start-content,
body.low-end .result-content {
    animation-duration: 0.3s !important;
    animation-delay: 0s !important;
}

/* Em touch (celular/tablet), o :hover fica "preso" depois do toque.
   Remove o transform do hover — feedback visual fica por conta do :active. */
body.is-touch .category-card:hover,
body.is-touch .mode-card:hover,
body.is-touch .user-panel-action:hover,
body.is-touch .answer-btn:hover,
body.is-touch .btn-primary:hover {
    transform: none;
}

/* Preferência do usuário "reduzir movimento" (acessibilidade do sistema):
   zera animações em loop e acelera transições. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.15s !important;
        scroll-behavior: auto !important;
    }
}

/* CSS Containment: isola cada card/modal pro browser não repintar a
   tela inteira quando algo muda. Ganho real em listas com hover. */
.category-card,
.mode-card,
.ach-card,
.rank-card,
.stat-mini,
.stats-cat-card,
.mission-card,
.shop-item,
.history-item,
.god-section,
.level-reward-card {
    contain: layout style;
}
.ranks-modal { contain: layout style paint; }

/* ============================================
   MOBILE TOUCH IMPROVEMENTS
   Garantia de touch targets mínimos + feedback :active em devices touch
   (não substitui o :hover de desktop, é independente).
   ============================================ */

/* Touch target mínimo 44px em botões do painel (recomendação Apple/WCAG) */
.user-panel-action {
    min-height: 44px;
}

/* Botão ✏️ de editar nome — touch target maior */
.btn-edit-name {
    min-width: 32px;
    min-height: 32px;
    padding: 4px 6px;
    cursor: pointer;
}

/* ============================================
   BADGES DE MODOS ATIVOS (Fácil / Gravação)
   ============================================ */
.user-mode-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 0 2px;
}
.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    animation: mode-badge-pulse 2.5s ease-in-out infinite;
}
.mode-badge-easy {
    background: linear-gradient(135deg, #fb923c 0%, #ec4899 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.4);
}
.mode-badge-rec {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}
@keyframes mode-badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.85; transform: scale(0.97); }
}

/* ============================================
   VESTIÁRIO (Skins + Acessórios do mascote)
   ============================================ */

/* Badge X/total no botão Vestiário (igual ao ach-counter) */
.vest-counter {
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 10px;
    padding: 2px 7px;
    margin-left: 4px;
    line-height: 1.4;
}

/* Preview do mascote no topo do modal */
.vestiario-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 0 6px;
    min-height: 170px;
    position: relative;
}
.vestiario-preview .mascot-container {
    transform: scale(1.05);
}

/* Tabs (Skins / Acessórios) */
.vestiario-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    padding: 4px;
    margin: 10px 0 16px;
}
.vest-tab {
    flex: 1;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
    min-height: 44px;
}
.vest-tab.active {
    background: linear-gradient(135deg, #ff006e 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}
.vest-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Conteúdo das tabs */
.vest-tab-content {
    display: none;
}
.vest-tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* Grid de cards (skins ou acessórios) */
.vestiario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

/* Card individual */
.vest-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
    transition: transform 0.15s, background 0.15s, border-color 0.2s, box-shadow 0.2s;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}
.vest-card.unlocked:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}
.vest-card.locked {
    opacity: 0.55;
    cursor: pointer; /* clica pra ver o hint do que falta */
}
.vest-card.locked .vest-card-icon {
    filter: grayscale(0.7);
}
.vest-card.equipped {
    background: linear-gradient(160deg, rgba(255, 0, 110, 0.18) 0%, rgba(139, 92, 246, 0.18) 100%);
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2), 0 10px 24px rgba(255, 215, 0, 0.18);
}

.vest-card-icon {
    font-size: 38px;
    line-height: 1;
    margin-bottom: 6px;
}
.vest-card-name {
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.vest-card-desc {
    font-size: 11px;
    opacity: 0.7;
    line-height: 1.3;
    margin-top: 2px;
}
.vest-lock-hint {
    margin-top: auto;
    padding-top: 6px;
    font-size: 11px;
    color: #fde047;
    font-weight: 700;
}

/* Tag "EQUIPADO" no topo do card */
.vest-equipped-tag {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
    color: #000;
    font-weight: 900;
    font-size: 9px;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 6px;
    margin-top: 2px;
}

/* Swatches de cor (3 bolinhas mostrando cores da skin) */
.vest-swatches {
    display: flex;
    gap: 4px;
    margin: 4px 0;
}
.vest-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* Hint da loja na aba de acessórios */
.vest-shop-hint {
    margin-top: 16px !important;
    font-size: 12px;
    opacity: 0.7;
    text-align: center;
}

/* Estilo "owned" na loja (acessório já comprado) */
.shop-item.shop-item-owned {
    opacity: 0.65;
}
.shop-item.shop-item-owned .shop-item-btn {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #fff;
    cursor: not-allowed;
}

/* Estilo "estoque cheio" na loja (atingiu o limite máximo do item) */
.shop-item.shop-item-full {
    opacity: 0.7;
}
.shop-item.shop-item-full .shop-item-btn {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #fff;
    cursor: not-allowed;
}
.shop-item.shop-item-full .shop-item-rank-lock {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Em devices com toque (sem mouse fino), todo botão ganha feedback visível
   no :active — necessário pra mobile já que :hover não dispara. */
@media (pointer: coarse) {
    .category-card:active,
    .mode-card:active,
    .user-panel-action:active,
    .answer-btn:active,
    .btn-primary:active,
    .btn-secondary-alt:active,
    .btn-hint:active,
    .btn-power-time:active,
    .btn-power-skip:active,
    .shop-item-btn:active,
    .mission-claim-btn:active,
    .level-reward-claim-btn:active,
    .vest-tab:active,
    .vest-card.unlocked:active,
    .god-btn-action:active {
        transform: scale(0.96);
        opacity: 0.85;
        transition: transform 0.08s, opacity 0.08s;
    }
}

/* Containment pros cards do vestiário (paint isolation, mesmo que outros cards) */
.vest-card { contain: layout style; }

/* ============================================
   MODO PERGUNTA ISCA (link ?p=cat-N do TikTok)
   ============================================ */
.screen-single {
    display: none;
    padding: 20px 16px 40px;
}
.screen-single.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

.single-content {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

/* Badge da categoria */
.single-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin: 8px 0 18px;
}

/* No modo isca a pergunta e alternativas usam o layout do quiz normal,
   mas a tela é mais respirada (sem HUD de vidas/timer). */
.screen-single .question-text {
    text-align: center;
    margin-bottom: 18px;
}
.screen-single .answers-grid {
    width: 100%;
}

/* Curiosidade no modo isca — reusa .fact-box, só garante largura */
.screen-single .fact-box {
    width: 100%;
    margin-top: 16px;
}

/* Bloco de CTA — começa escondido, aparece com .show após responder */
.single-cta {
    width: 100%;
    margin-top: 20px;
    padding: 20px 16px;
    background: linear-gradient(160deg, rgba(255, 0, 110, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
    border: 1.5px solid rgba(255, 0, 110, 0.3);
    border-radius: 18px;
    text-align: center;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.4s, transform 0.4s;
}
.single-cta.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.single-cta-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
}
.single-cta .btn-primary {
    width: 100%;
    margin-bottom: 10px;
}
.single-cta .btn-tertiary {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-decoration: none;
    padding: 8px;
}

/* Botão 🔗 de copiar link na review */
.review-share-btn {
    margin-left: auto;
    background: rgba(0, 200, 255, 0.12);
    border: 1px solid rgba(0, 200, 255, 0.35);
    color: #67e8f9;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
}
.review-share-btn:hover {
    background: rgba(0, 200, 255, 0.25);
    transform: scale(1.08);
}
.review-share-btn:active {
    transform: scale(0.94);
}

/* ============================================
   GOD MODE (só pro criador)
   ============================================ */

/* Botão GOD no painel — destaque dourado */
.user-panel-action.god-btn {
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
    color: #000;
    font-weight: 900;
    letter-spacing: 0.05em;
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.35);
    border: 1.5px solid #ffd700;
    animation: god-glow 2s ease-in-out infinite;
}
.user-panel-action.god-btn:hover {
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
    transform: translateY(-2px);
}
@keyframes god-glow {
    0%, 100% { box-shadow: 0 6px 16px rgba(255, 215, 0, 0.35); }
    50%      { box-shadow: 0 6px 26px rgba(255, 215, 0, 0.6); }
}

/* Modal God Mode — header dourado */
.god-modal .ranks-modal-content {
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.15), 0 20px 60px rgba(0, 0, 0, 0.6);
}
.god-modal .ranks-modal-title {
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 50%, #dc2626 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 24px rgba(255, 215, 0, 0.3);
}
.god-warning {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: #fde68a;
    margin-bottom: 14px !important;
}

/* Seções */
.god-section {
    margin-bottom: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.god-section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffd700;
    text-transform: uppercase;
}
.god-section-danger {
    background: rgba(220, 38, 38, 0.07);
    border-color: rgba(220, 38, 38, 0.25);
}
.god-section-danger .god-section-title {
    color: #fca5a5;
}

/* Grid de ações: 2 colunas em mobile, 3 em telas maiores */
.god-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 480px) {
    .god-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.god-btn-action {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    line-height: 1.25;
    min-height: 44px;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.god-btn-action:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
}
.god-btn-action.god-btn-danger {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.4);
    color: #fecaca;
}
.god-btn-action.god-btn-danger:hover {
    background: rgba(220, 38, 38, 0.2);
}
.god-btn-action.god-btn-narrow {
    flex: 0 0 auto;
    min-width: 70px;
}

/* Linha de XP custom (input + botão) */
.god-xp-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.god-xp-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    min-height: 44px;
}
.god-xp-input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(0, 0, 0, 0.4);
}
.god-xp-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

/* Gerador de links de isca */
.god-hint {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
}
.god-field-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fde68a;
    margin: 10px 0 5px;
}
.god-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    min-height: 44px;
    cursor: pointer;
}
.god-select:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(0, 0, 0, 0.4);
}
.god-select option {
    background: #181828;
    color: #fff;
}
.god-link-preview {
    margin-top: 12px;
    font-size: 13px;
    font-style: italic;
    line-height: 1.5;
    color: #fde68a;
}
.god-link-url {
    margin: 8px 0 12px;
    padding: 9px 11px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed rgba(255, 215, 0, 0.35);
    border-radius: 8px;
    font-size: 11px;
    color: #93c5fd;
    word-break: break-all;
}
.god-link-preview:empty,
.god-link-url:empty {
    display: none;
}

