:root {
  --sky-top: #6ec8ef;
  --sky-bot: #c8ec9a;
  --cta: #2fd36a;
  --cta-shadow: #1a8f44;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b1d12;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#playfield {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  line-height: 0;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#top-bar {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  pointer-events: none;
  padding: 18px 88px 36px 20px;
  background: linear-gradient(180deg, #06180fd9 0%, #06180f00 100%);
}

#back-btn,
#mute-btn {
  position: absolute;
  z-index: 7;
  top: 16px;
  width: 56px;
  height: 56px;
  border: 2px solid #fff;
  border-radius: 16px;
  background: #1a3d14cc;
  color: #fff;
  box-shadow: 0 4px 12px #0006;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#back-btn {
  left: 16px;
}

#back-btn[hidden] {
  display: none;
}

#back-btn svg,
#mute-btn svg {
  width: 28px;
  height: 28px;
}

#back-btn:active,
#mute-btn:active {
  transform: translateY(2px);
}

body.has-exit #top-bar {
  padding-left: 88px;
}

#mute-btn {
  right: 16px;
}

#mute-btn svg {
  display: none;
}

#mute-btn .ico-on { display: block; }
#mute-btn.is-muted .ico-on { display: none; }
#mute-btn.is-muted .ico-off { display: block; }

#logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px #0006;
  object-fit: cover;
  background: #1a3d14;
}

#title {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 2px 0 #1a5a22, 0 4px 10px #000a;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

#hint-text {
  color: #fffbe6;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 2px 6px #000a;
  line-height: 1.25;
  margin-top: 2px;
}

#cta {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #06140ccc;
}

#cta[hidden] { display: none; }

#fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 21;
  pointer-events: none;
}

#fx[hidden] {
  display: none !important;
}

.cta-card {
  width: min(86vw, 420px);
  text-align: center;
  background: linear-gradient(180deg, #fff8e7, #ffe7a8);
  border-radius: 28px;
  padding: 22px 18px 26px;
  border: 4px solid #fff;
  box-shadow: 0 16px 0 #c48a1a, 0 22px 40px #0007;
  animation: cta-pop 0.45s cubic-bezier(0.2, 1.4, 0.3, 1);
}

@keyframes cta-pop {
  from { transform: scale(0.72) translateY(24px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.cta-kicker {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a5a12;
  font-weight: 800;
}

.cta-hero {
  width: 220px;
  height: auto;
  margin: 6px auto 0;
  filter: drop-shadow(0 10px 0 #0002);
}

.cta-name {
  font-size: 28px;
  font-weight: 900;
  color: #1e3d14;
}

.cta-copy {
  margin: 4px 0 16px;
  color: #4a3a18;
  font-weight: 600;
}

#play-now {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 16px 12px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(180deg, #5dff8a, var(--cta));
  box-shadow: 0 7px 0 var(--cta-shadow);
  cursor: pointer;
}

#play-now:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 var(--cta-shadow);
}

#play-again {
  width: 100%;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: #6a4a12;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#eggs-btn {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 3.6%;
  transform: translateX(-50%);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  width: min(72vw, 280px);
  height: 74px;
  border: 0;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #ffe27a, #f0b43a);
  box-shadow: 0 7px 0 #c48412, 0 12px 22px #0006;
  color: #3a2408;
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
}

#eggs-btn img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 #0003);
}

#eggs-btn:active {
  transform: translateX(-50%) translateY(4px);
  box-shadow: 0 3px 0 #c48412;
}

#eggs-btn.is-hint {
  animation: eggs-hint-pulse 0.85s ease-in-out infinite;
  box-shadow: 0 7px 0 #c48412, 0 12px 22px #0006, 0 0 0 4px #fff8dc, 0 0 26px #ffe27a;
}

#eggs-btn.is-hint:active {
  animation: none;
  transform: translateX(-50%) translateY(4px);
}

@keyframes eggs-hint-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}

#eggs-btn:disabled {
  filter: grayscale(0.4);
  opacity: 0.7;
}
