/* Snowball Showdown: extra styles on top of style.css */

/* ---------- intro ---------- */
.scoring { list-style: none; padding: 0; margin: 0 auto 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 340px; }
.scoring li {
  display: grid; gap: 2px; padding: 12px 8px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--line);
}
.scoring b { font-family: var(--display); font-style: normal; font-weight: 400; font-size: 30px; line-height: 1; color: #fff; }
.scoring span { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.scoring .hat { border-color: rgba(255, 201, 92, .55); background: linear-gradient(180deg, rgba(255, 201, 92, .16), rgba(255, 157, 58, .06)); }
.scoring .hat b { color: var(--gold); }
.best-line { color: var(--gold); font-weight: 800; margin: 0 0 16px; }
.lb-open { margin-top: 12px; }

/* ---------- in-game HUD ---------- */
.game-hud {
  position: absolute; left: 0; right: 0; top: calc(74px + env(safe-area-inset-top));
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0 12px; pointer-events: none;
}
.pill {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  background: rgba(8, 14, 34, .58); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-weight: 800;
}
.pill span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.pill b { font-size: 20px; color: #fff; font-variant-numeric: tabular-nums; }
.score b { color: var(--gold); }
.balls { gap: 5px; }
.balls:empty { display: none; }
.balls .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); transition: all .3s; }
.balls .dot.used { background: rgba(255,255,255,.18); box-shadow: none; transform: scale(.8); }
.wind b { font-size: 16px; color: var(--frost); letter-spacing: -2px; }

.combo {
  position: absolute; left: 50%; top: calc(126px + env(safe-area-inset-top)); transform: translateX(-50%);
  padding: 6px 16px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  background: linear-gradient(90deg, var(--berry), var(--gold-2)); color: #fff;
  font-weight: 800; font-size: 18px; letter-spacing: -.01em; box-shadow: 0 8px 24px -6px rgba(255, 79, 109, .7);
  animation: pop .45s cubic-bezier(.2, .9, .3, 1.4);
}
.pop-text {
  position: absolute; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap;
  font-weight: 800; font-size: 24px; letter-spacing: -.01em; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  animation: floatUp 1.3s ease-out forwards;
}
.pop-text.miss { color: #d5ddff; font-size: 20px; font-weight: 700; }
.pop-text.hat { color: var(--gold); font-size: 30px; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
#pops { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* placing the snowman */
.place .reticle {
  width: 130px; height: 50px; border: 3px solid var(--gold); border-radius: 50%; margin-bottom: 18vh;
  box-shadow: 0 0 18px rgba(255, 201, 92, .7), inset 0 0 18px rgba(255, 201, 92, .35); animation: breathe 1.6s ease-in-out infinite;
}

.flick-hint {
  position: absolute; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: grid; justify-items: center; gap: 6px; pointer-events: none; font-weight: 800; font-size: 15px;
}
.flick-hint > span:last-child { padding: 8px 14px; border-radius: 999px; background: rgba(8, 14, 34, .6); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.flick-hint .finger { font-size: 36px; animation: flick 1.4s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
@keyframes flick { 0% { transform: translateY(40px); opacity: 0; } 25% { opacity: 1; } 70% { transform: translateY(-40px); opacity: 1; } 100% { transform: translateY(-60px); opacity: 0; } }

/* ---------- end of game ---------- */
.end-card h2 { font-size: 30px; color: #fff; margin: 4px 0 0; line-height: 1.15; }
.final { margin: 10px 0 0; display: grid; }
.final span {
  font-family: var(--display); font-style: normal; font-weight: 400; font-size: 84px; line-height: .95; letter-spacing: -.03em;
  background: linear-gradient(180deg, #fff8e6, var(--gold) 60%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.final small { color: var(--muted); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.end-best { color: var(--gold); font-weight: 800; min-height: 1.2em; margin: 8px 0 0; }
.end-stats { list-style: none; padding: 0; margin: 12px 0 4px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.end-stats li { background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-weight: 700; font-size: 13px; }

/* ---------- leaderboard ---------- */
.lb-form {
  margin: 16px 0 4px; display: grid; gap: 8px; padding: 14px; border-radius: 20px;
  background: rgba(255, 201, 92, .08); border: 1px solid rgba(255, 201, 92, .3);
}
.lb-form label { font-weight: 800; }
.lb-tip { color: var(--muted); font-size: 12.5px; margin-top: -4px; }
.lb-row { display: flex; gap: 8px; justify-content: center; }
.lb-row input {
  flex: 1; min-width: 0; width: 100%; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(6, 11, 26, .55); color: #fff; font: 700 16px var(--ui); text-align: center; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.lb-row input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 92, .25); }
.lb-row input::placeholder { color: rgba(255,255,255,.4); font-weight: 600; }
.lb-row .big-btn { white-space: nowrap; }
.lb-result { margin: 14px 0 4px; }
.lb-result .rank { font-weight: 800; color: var(--gold); font-size: 18px; margin: 0 0 10px; }
.lb-result .rank small { color: var(--muted); font-weight: 600; }
#lb-modal { background: rgba(4, 8, 20, .9); }
.lb-card { max-width: 420px; }
.lb-card h2 { font-size: 30px; color: #fff; margin: 0 0 12px; }
.lb-tabs { display: inline-flex; background: rgba(6, 11, 26, .5); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 14px; }
.lb-tabs button { border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; transition: all .2s; }
.lb-tabs button.on { background: linear-gradient(180deg, #ffe39a, var(--gold) 50%, var(--gold-2)); color: #2a1200; }
.lb-list { list-style: none; margin: 0; padding: 0; text-align: left; display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.lb-list li {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
  background: var(--glass); border: 1px solid transparent; border-radius: 14px; padding: 10px 14px; font-weight: 700;
}
.lb-list li .pos { text-align: center; color: var(--muted); font-size: 15px; font-weight: 800; }
.lb-list li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-list li .sc { font-family: var(--display); font-style: normal; font-weight: 400; color: var(--gold); font-size: 20px; font-variant-numeric: tabular-nums; }
.lb-list li.me { background: rgba(255, 201, 92, .14); border-color: rgba(255, 201, 92, .6); }
.lb-list li.empty { display: block; text-align: center; color: var(--muted); font-weight: 600; padding: 18px 14px; }
.lb-result .lb-list { max-height: 30vh; }

.credit { position: fixed; left: 0; right: 0; bottom: 4px; margin: 0; text-align: center; font-size: 10px; color: rgba(255,255,255,.4); z-index: 1; }
.credit a { color: inherit; }
#ar:not([hidden]) ~ .credit { display: none; }
.aim-dist { justify-self: center; margin-top: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 201, 92, .14); border: 1px solid rgba(255, 201, 92, .4); color: var(--gold) !important; font-weight: 800 !important; font-variant-numeric: tabular-nums; }
