/* ---- Game layer: level, streak, round feedback, timer, rewards ---- */

/* Header HUD: explorer level + daily streak */
.hud{display:flex;align-items:center;gap:10px;margin-left:auto;margin-right:16px}
.hud .lvl{display:flex;align-items:center;gap:9px;background:#fffcf5;border:1px solid #d3d8cb;border-radius:30px;padding:5px 14px 5px 5px}
.hud .lvl strong{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#224a45;color:#fff;font-size:14px}
.hud .lvl div{display:flex;flex-direction:column;gap:4px;min-width:118px}
.hud .lvl em{font-style:normal;font-size:12px;font-weight:700;color:#224a45;line-height:1.1;white-space:nowrap}
.xpbar{display:block;height:6px;border-radius:6px;background:#e3e6dc;overflow:hidden}
.xpbar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#dc733f,#e9a23b);border-radius:6px;transition:width .9s cubic-bezier(.2,.8,.2,1)}
.hud .streak{font-size:14px;font-weight:700;color:#96613b;background:#f1e7d8;border-radius:30px;padding:9px 13px;white-space:nowrap}
.hud .streak.cold{color:#7b8378;background:#ecebe2}
@media(max-width:1100px){header small,.edition span{display:none}}
@media(max-width:800px){.hud{margin-right:8px;gap:6px}.hud .lvl div{min-width:70px}.hud .lvl em{max-width:90px;overflow:hidden;text-overflow:ellipsis}.hud .streak{padding:7px 10px;font-size:13px}}
@media(max-width:430px){.hud .lvl div{display:none}.hud .lvl{padding:4px}}

/* Daily card streak line */
.streakline{margin:0;font-size:14px;font-weight:600;color:#f3c7a6}
.streakline.done{color:#9fd3a9}

/* Round dots 1–5 */
.progress{gap:8px!important}
.progress i{height:30px!important;flex:0 0 30px!important;border-radius:50%!important;background:#ecebe2!important;color:#8a938b;font-style:normal;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:transform .25s,background .25s}
.progress i.current{background:#224a45!important;color:#fff;transform:scale(1.12);box-shadow:0 0 0 4px #224a4522}
.progress i.t-perfect{background:#2f8a5f!important;color:#fff}
.progress i.t-great{background:#5fa463!important;color:#fff}
.progress i.t-good{background:#e9a23b!important;color:#fff}
.progress i.t-ok{background:#dc733f!important;color:#fff}
.progress i.t-cold,.progress i.t-out{background:#9aa9a4!important;color:#fff}

/* Visual timer */
.timer{height:8px;border-radius:8px;background:#e3e6dc;overflow:hidden;margin:-12px 0 16px}
.timer i{display:block;height:100%;width:100%;background:#224a45;transition:width 1s linear,background .3s}
.timer.low i{background:#e9a23b}
.timer.crit i{background:#c5453b;animation:blink .8s infinite}
@keyframes blink{50%{opacity:.45}}
@media(max-width:800px){.timer{margin:-4px 0 12px}}

/* Round verdict */
.verdict{position:relative;display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:10px;background:#ecebe2;margin:4px 0 6px;animation:pop .45s cubic-bezier(.2,1.4,.4,1)}
.verdict .emoji{font-size:34px;line-height:1}
.verdict strong{display:block;font-family:'Playfair Display',Georgia,serif;font-size:24px;font-weight:600;line-height:1.15}
.verdict small{font-size:13px;color:#5f716d}
.verdict.t-perfect{background:#dcefe2;color:#1f6b47}.verdict.t-great{background:#e4efd9;color:#3d7a3f}
.verdict.t-good{background:#f7ead2;color:#8a5a14}.verdict.t-ok{background:#f6e2d6;color:#9a4a22}
.verdict.t-cold,.verdict.t-out{background:#e6eaea;color:#4c5f5d}
@keyframes pop{0%{transform:scale(.7);opacity:0}100%{transform:scale(1);opacity:1}}
.burst{position:absolute;left:34px;top:50%;width:0;height:0;pointer-events:none}
.burst i{position:absolute;width:8px;height:8px;border-radius:2px;background:var(--c);animation:fly .9s ease-out forwards;transform:rotate(var(--a)) translateY(0)}
@keyframes fly{to{transform:rotate(var(--a)) translateY(-70px);opacity:0}}
.roundpoints b{font-weight:inherit}
.gain{display:inline-block;margin-left:10px;font-family:'DM Sans',sans-serif;font-size:14px;font-weight:700;color:#dc733f;vertical-align:middle}

/* Score counter bump */
#total{display:inline-block;transition:transform .2s}
#total.bump{animation:bump .6s}
@keyframes bump{30%{transform:scale(1.25);color:#dc733f}}

/* Guess pin */
.guess-pin{background:none;border:0}
.guess-pin b{position:absolute;left:3px;top:0;width:24px;height:24px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:#dc733f;border:3px solid #fff;box-shadow:0 3px 8px #182f3560;animation:drop .35s cubic-bezier(.3,1.5,.5,1)}
@keyframes drop{0%{transform:translateY(-30px) rotate(-45deg);opacity:0}100%{transform:translateY(0) rotate(-45deg);opacity:1}}
#map{cursor:crosshair}
.leaflet-dragging #map{cursor:grabbing}

/* Confirm button: pulse when a pin is ready */
#confirm.ready{background:#dc733f;font-weight:600;animation:pulse 1.6s infinite}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 #dc733f66}50%{box-shadow:0 0 0 10px #dc733f00}}
.keyhint{display:block;font-size:12px;color:#7b8378;text-align:center;margin-top:6px}
@media(max-width:800px){.keyhint{display:none}}

/* Summary: stars, rank title, XP */
.stars{font-size:34px;letter-spacing:4px;line-height:1;margin:6px 0 4px;color:#d3d0c2}
.stars b{color:#e9a23b;font-weight:400;display:inline-block;animation:pop .5s cubic-bezier(.2,1.4,.4,1) backwards}
.stars b:nth-child(2){animation-delay:.2s}.stars b:nth-child(3){animation-delay:.4s}
.ranktitle{font-weight:700;font-size:16px;color:#224a45;margin-bottom:4px}
.xpgain{display:inline-block;margin-top:10px!important;padding:5px 12px;border-radius:20px;background:#fffcf5;color:#96613b!important;font-weight:700}

/* Toast (level up) */
.toast{position:fixed;left:50%;top:18px;transform:translate(-50%,-30px);opacity:0;z-index:2000;background:#224a45;color:#fff;padding:14px 22px;border-radius:40px;font-weight:700;box-shadow:0 10px 30px #102b2550;transition:transform .35s cubic-bezier(.2,1.4,.4,1),opacity .35s;max-width:calc(100% - 32px);text-align:center}
.toast.show{transform:translate(-50%,0);opacity:1}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
