/* Tiny Stars - Stage 0 styles
   Sab kuch khud host: koi bahari font ya script nahi. */

:root {
  --yellow: #FFC93C;
  --blue: #4DB6FF;
  --green: #5CCB7A;
  --coral: #FF7B7B;
  --cream: #FFF8E7;
  --navy: #2B3A55;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--cream);
  color: var(--navy);
  font-family: "Baloo 2", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto,
               "Noto Sans Devanagari", "Noto Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #FFFFFF 0%, var(--cream) 60%, #FFE9B8 100%);
}

/* twinkling stars in background */
.sky { position: absolute; inset: 0; pointer-events: none; }
.sky .s {
  position: absolute;
  color: var(--yellow);
  opacity: .8;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { transform: scale(.8); opacity: .45; }
  50%      { transform: scale(1.15); opacity: 1; }
}

.title {
  position: relative;
  margin: 0;
  text-align: center;
  line-height: 1.1;
}
.title-hi { display: block; font-size: clamp(2.4rem, 11vw, 4rem); font-weight: 800; color: var(--coral); }
.title-en { display: block; font-size: clamp(1.4rem, 6vw, 2rem); font-weight: 700; color: var(--blue); letter-spacing: .04em; }

.chicky-btn {
  position: relative;
  width: min(60vw, 260px);
  padding: 0;
  margin: 8px 0 0;
  border: 0;
  background: none;
  cursor: pointer;
  /* bada touch target */
  min-height: 64px;
}
.chicky { width: 100%; height: auto; display: block; overflow: visible; }

.chicky-btn:focus-visible { outline: 4px solid var(--blue); outline-offset: 6px; border-radius: 24px; }

/* gentle idle animation */
.chicky { animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.ear-l { transform-origin: 72px 100px; animation: earL 4s ease-in-out infinite; }
.ear-r { transform-origin: 128px 100px; animation: earR 4s ease-in-out infinite .4s; }
@keyframes earL { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@keyframes earR { 0%,100% { transform: rotate(0); } 50% { transform: rotate(6deg); } }
.eyes { transform-origin: 100px 120px; animation: blink 5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* when tapped */
.chicky-btn.hop .chicky { animation: hop .6s ease-out; }
@keyframes hop {
  0%   { transform: translateY(0) scale(1, 1); }
  30%  { transform: translateY(-34px) scale(.96, 1.06); }
  60%  { transform: translateY(0) scale(1.06, .94); }
  100% { transform: translateY(0) scale(1, 1); }
}

.hello {
  position: relative;
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  text-align: center;
}
.hint { position: relative; margin: 0; font-size: 1.1rem; color: #6B7A99; }

.foot { position: absolute; bottom: max(10px, env(safe-area-inset-bottom)); font-size: .8rem; color: #9AA5BD; }

/* burst stars when Chicky is tapped */
.burst {
  position: fixed;
  pointer-events: none;
  color: var(--yellow);
  font-size: 28px;
  animation: burst .9s ease-out forwards;
}
@keyframes burst {
  from { transform: translate(0, 0) scale(.4); opacity: 1; }
  to   { transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(120deg); opacity: 0; }
}

/* halke motion wale users ke liye animation band */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
