* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }

html, body {
    margin: 0; padding: 0; width: 100%; height: 100%; height: 100dvh;
    overflow: hidden;
    background: #020722 radial-gradient(circle at 50% 35%, #0d2c7d 0%, #051445 55%, #000414 100%);
    color: #fff;
    font-family: "Arial Black", "Impact", -apple-system, BlinkMacSystemFont, sans-serif;
}

body { display: flex; flex-direction: column; justify-content: space-between; position: relative; }

.timer-progress-track {
    width: 100%; height: 12px; background: #000; border-bottom: 2px solid #b38728; flex-shrink: 0;
}
.timer-progress-bar {
    height: 100%; width: 100%; background: linear-gradient(180deg, #55ff55 0%, #00aa00 100%);
    transform-origin: left; box-shadow: 0 0 10px #00ff00;
}
.timer-progress-bar.warning {
    background: linear-gradient(180deg, #ffff55 0%, #cc9900 100%); box-shadow: 0 0 10px #ffcc00;
}
.timer-progress-bar.danger {
    background: linear-gradient(180deg, #ff5555 0%, #aa0000 100%); box-shadow: 0 0 14px #ff0000;
    animation: retro-pulse 0.3s infinite alternate;
}
@keyframes retro-pulse { from { opacity: 1; } to { opacity: 0.45; } }

header {
    width: 100%; padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 10px 14px;
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(180deg, #091c52 0%, #020822 100%);
    border-bottom: 3px solid #f9d854; box-shadow: 0 4px 12px rgba(0,0,0,0.8);
    flex-shrink: 0; gap: 10px;
}
.prize-badge {
    font-weight: 900; color: #ffde59; font-size: clamp(22px, 5.5vw, 28px);
    line-height: 1.2; text-shadow: 2px 2px 0px #000, 0 0 10px #eab308;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.timer-badge {
    background: radial-gradient(circle, #ff2a2a 0%, #8b0000 100%);
    color: #ffffff; padding: 4px 16px; border-radius: 8px; border: 2px solid #ffcccc;
    font-weight: 900; font-size: clamp(24px, 6vw, 30px); min-width: 68px; text-align: center;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 0 12px #ff0000; flex-shrink: 0;
    text-shadow: 2px 2px 0px #000;
}

main { width: 100%; flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }

.question-card {
    background: radial-gradient(circle at center, #1b3d99 0%, #081a54 85%, #020a2b 100%);
    border: 4px solid #d4af37; outline: 2px solid #5a440c; border-radius: 12px; padding: 16px;
    text-align: center; font-size: clamp(28px, 6.5vw, 36px); font-weight: 900; line-height: 1.3;
    height: 35%; min-height: 130px; display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.3), 0 8px 25px rgba(0,0,0,0.9);
    word-break: break-word; flex-shrink: 0; color: #ffffff;
    text-shadow: 2px 2px 4px #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.answers-grid {
    flex: 1; display: flex; flex-direction: column; gap: 10px; width: 100%;
    margin-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}
.btn-opt {
    flex: 1; background: linear-gradient(180deg, #152b66 0%, #07153b 60%, #030a21 100%);
    border: 3px solid #b38728; outline: 1px solid #4a360a; color: #ffffff;
    padding: 8px 16px; border-radius: 10px; text-align: left; cursor: pointer;
    display: flex; align-items: center; gap: 16px; transition: all 0.1s ease; width: 100%;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), 0 4px 10px rgba(0,0,0,0.7);
}
.btn-opt:active { transform: scale(0.98); }
.btn-opt .letter {
    background: radial-gradient(circle, #ffe066 0%, #d4af37 60%, #8c6d1f 100%);
    color: #000000; font-weight: 900; border-radius: 8px; border: 2px solid #fff;
    width: 52px; height: 52px; font-size: 28px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 3px 6px rgba(0,0,0,0.6); text-shadow: 1px 1px 0px rgba(255,255,255,0.6);
}
.btn-opt .text {
    flex: 1; font-size: clamp(26px, 5.8vw, 32px); font-weight: 900; line-height: 1.25;
    word-break: break-word; text-shadow: 2px 2px 2px #000;
}
.btn-opt.correct {
    background: linear-gradient(180deg, #1fa33f 0%, #0b5e20 100%) !important;
    border-color: #55ff55 !important; box-shadow: 0 0 20px #00ff00 !important;
}
.btn-opt.wrong {
    background: linear-gradient(180deg, #b81414 0%, #5e0b0b 100%) !important;
    border-color: #ff5555 !important; box-shadow: 0 0 20px #ff0000 !important;
}

/* Vinheta de transição: oculta por padrão com display:none */
.splash-valendo {
    display: none;
    position: fixed; inset: 0;
    background: #020722 radial-gradient(circle at 50% 50%, #173b9e 0%, #071547 60%, #000314 100%);
    flex-direction: column; justify-content: center; align-items: center;
    padding: 24px; text-align: center; z-index: 25;
}
.splash-box {
    border: 5px solid #ffd700; outline: 3px solid #5a440c; border-radius: 16px;
    padding: 36px 20px; background: rgba(2, 8, 33, 0.95);
    box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.5), 0 0 40px rgba(0, 0, 0, 0.95);
    width: 100%; max-width: 380px;
}
.splash-title { color: #ffffff; font-size: clamp(26px, 7vw, 36px); font-weight: 900; text-shadow: 3px 3px 0 #000; margin-bottom: 8px; }
.splash-prize { color: #ffd700; font-size: clamp(32px, 8.5vw, 46px); font-weight: 900; text-shadow: 3px 3px 0 #000; text-transform: uppercase; }

.overlay {
    position: fixed; inset: 0;
    background: radial-gradient(circle at center, rgba(13, 44, 125, 0.98) 0%, rgba(2, 7, 34, 0.99) 100%);
    border: 6px solid #d4af37; display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 20px; text-align: center; z-index: 10; overflow-y: auto;
}
.overlay h1 { color: #ffd700; font-size: clamp(32px, 8vw, 44px); font-weight: 900; margin-bottom: 8px; text-shadow: 3px 3px 0 #000; }
.overlay p { color: #e2e8f0; font-size: clamp(20px, 5vw, 26px); font-weight: 800; margin-bottom: 14px; text-shadow: 2px 2px 0 #000; }

.won-prize-box {
    background: linear-gradient(180deg, #091a47 0%, #030a21 100%); border: 3px solid #ffd700;
    border-radius: 10px; padding: 12px 18px; width: 100%; max-width: 340px; margin-bottom: 14px;
}
.won-prize-label { font-size: 1rem; color: #cbd5e1; text-transform: uppercase; font-weight: 900; }
.won-prize-val { font-size: 1.4rem; color: #ffeb3b; font-weight: 900; margin-top: 4px; }

.input-name {
    width: 100%; max-width: 320px; padding: 14px 18px; border-radius: 8px; border: 3px solid #ffd700;
    background: #02081f; color: #fff; font-size: 24px; font-weight: 900; text-align: center; margin-bottom: 16px; outline: none;
}
.btn-action {
    background: linear-gradient(180deg, #ffe066 0%, #d4af37 60%, #997314 100%);
    color: #000; border: 2px solid #fff; padding: 16px 40px; border-radius: 40px; font-size: 1.4rem; font-weight: 900;
    cursor: pointer; box-shadow: 0 4px 20px rgba(255,215,0,0.6); width: 100%; max-width: 320px; margin-bottom: 12px;
}
.btn-whatsapp {
    background: linear-gradient(180deg, #2fe675 0%, #1e9e4d 100%);
    color: #fff; border: 2px solid #afffcf; padding: 14px 22px; border-radius: 40px; font-size: 1.25rem; font-weight: 900;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; max-width: 320px; margin-bottom: 14px; text-decoration: none;
}
.ranking-box { width: 100%; max-width: 340px; background: #040d2b; border: 2px solid #b38728; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.ranking-title { color: #ffd700; font-weight: 900; font-size: 1.1rem; margin-bottom: 8px; text-align: center; text-transform: uppercase; }
.ranking-list { list-style: none; padding: 0; margin: 0; font-size: 1rem; }
.ranking-item { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #16244f; }
.ranking-item:last-child { border-bottom: none; }
.ranking-item .rank-name { font-weight: 900; color: #fff; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-item .rank-prize { color: #ffd700; font-size: 0.9rem; font-weight: 800; }
.hidden { display: none !important; }

