:root{
  --bg-1: linear-gradient(135deg,#0f2027 0%, #2c5364 100%);
  --card: rgba(255,255,255,0.06);
  --accent: #2ecc71; /* sporty green */
  --accent-2: #ffd166; /* warm yellow accent */
  --muted: rgba(255,255,255,0.7);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: radial-gradient(circle at 10% 20%, rgba(46,204,113,0.06), transparent 15%), var(--bg-1);
  color:var(--muted);
  display:grid;
  place-items:center;
  padding:2rem;
}

.counter-card{
  width:min(720px,96%);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
  border-radius:16px;
  padding:1.25rem 1.5rem;
  box-shadow: 0 8px 30px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  backdrop-filter: blur(6px) saturate(120%);
}

.header{display:flex;flex-direction:column;align-items:center;gap:4px}
.title{font-family:Oswald, sans-serif;margin:0;color:var(--accent-2);letter-spacing:1px}
.subtitle{margin:0;font-size:.9rem;color:rgba(255,255,255,0.55)}

.controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-top:1rem;gap:1rem}
.inputs{display:flex;gap:.75rem;align-items:center}
.inputs input{
  width:84px;
  max-width:22vw;
  padding:.6rem .5rem;
  border-radius:10px;
  border:2px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
  color: #fff;
  font-size:1.05rem;
  text-align:center;
  transition:transform .18s ease, box-shadow .18s;
}
.inputs input:focus{outline:none;transform:translateY(-3px);box-shadow:0 6px 20px rgba(46,204,113,0.09)}

.actions{display:flex;gap:.75rem}
.btn{cursor:pointer;padding:.6rem 1rem;border-radius:10px;border:none;font-weight:600;letter-spacing:.6px}
.btn:focus{outline:2px solid rgba(255,255,255,0.06)}
.start{background:linear-gradient(180deg,var(--accent),#1fa65b);color:#04260e;box-shadow:0 6px 18px rgba(46,204,113,0.12);transition:transform .18s ease}
.start:hover{transform:translateY(-4px) scale(1.02)}
.stop{background:linear-gradient(180deg,#ff6b6b,#ff4b4b);color:white;box-shadow:0 6px 18px rgba(255,75,75,0.12)}

.display{margin-top:1.2rem;display:flex;justify-content:center}
.timer{
  font-family:Oswald, sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  background: linear-gradient(90deg,var(--accent-2),#fff, var(--accent));
  -webkit-background-clip: text;
  background-clip:text;
  color: transparent;
  text-shadow: 0 6px 28px rgba(0,0,0,0.45);
  padding:.25rem .5rem;
  border-radius:8px;
  transition:transform .18s ease, text-shadow .25s ease;
}
.timer.tick{transform:scale(1.06);text-shadow:0 12px 40px rgba(46,204,113,0.18)}

/* small decorative pulse when finished */
.timer.finish{animation:finishGlow 900ms ease-in-out 1}
@keyframes finishGlow{
  0%{transform:scale(1);filter:drop-shadow(0 0 0 rgba(255,255,255,0))}
  50%{transform:scale(1.06);filter:drop-shadow(0 16px 40px rgba(255,209,102,0.08))}
  100%{transform:scale(1);}
}

.sr-only{position:absolute;border:0;padding:0;margin:-1px;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@media (max-width:520px){
  .inputs input{width:64px;padding:.5rem;font-size:1rem}
  .actions{width:100%;justify-content:center}
  .controls{flex-direction:column;align-items:center}
}

/* confetti canvas overlay */
canvas.confetti{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:9999;
}
