/* 🥚 Easter eggs (js/eggs.js) */
#home .paopao { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#home .logo { cursor: pointer; -webkit-user-select: none; user-select: none; }
#home .logo .lt { display: inline-block; font-style: normal; }
#home .logo.egg-wave .lt { animation: egg-letter .55s cubic-bezier(.3, 1.6, .5, 1) calc(var(--k) * 60ms); }
#home .stars-total { cursor: pointer; -webkit-user-select: none; user-select: none; }
.screen-title { -webkit-user-select: none; user-select: none; }

/* Pao Pao's moves (each replaces the bob for a moment) */
#home .paopao.egg-jump   { animation: egg-jump .7s cubic-bezier(.3, 1.4, .5, 1); }
#home .paopao.egg-spin   { animation: egg-spin .8s ease-in-out; }
#home .paopao.egg-squish { animation: egg-squish .6s ease-in-out; transform-origin: 50% 100%; }
#home .paopao.egg-flip   { animation: egg-flip .8s ease-in-out; }
#home .paopao.egg-wiggle { animation: egg-wiggle .6s ease-in-out; }
#home .paopao.egg-dizzy  { animation: egg-dizzy 1.1s ease-in; }
@keyframes egg-jump   { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-34px) scale(.92, 1.1); } 70% { transform: translateY(0) scale(1.12, .88); } }
@keyframes egg-spin   { to { transform: rotate(360deg); } }
@keyframes egg-squish { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.3, .6); } 60% { transform: scale(.8, 1.25); } }
@keyframes egg-flip   { 0% { transform: rotateY(0); } 100% { transform: rotateY(360deg); } }
@keyframes egg-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-18deg); } 40% { transform: rotate(16deg); } 60% { transform: rotate(-12deg); } 80% { transform: rotate(8deg); } }
@keyframes egg-dizzy  { 0% { transform: rotate(0) scale(1); } 80% { transform: rotate(1080deg) scale(1.15); } 100% { transform: rotate(1080deg) scale(0); } }
@keyframes egg-letter { 0%, 100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-22px) rotate(-8deg); } }

/* a hat on special days */
#home .brand.has-hat { position: relative; }
#home .paopao-hat { position: absolute; left: 31px; top: -14px; transform: translateX(-50%) rotate(-12deg); font-size: 34px; line-height: 1; pointer-events: none; animation: egg-hat 2.6s ease-in-out infinite; }
@keyframes egg-hat { 0%, 100% { margin-top: 0; } 50% { margin-top: -8px; } }
@media (max-width: 900px) { #home .paopao-hat { left: 24px; font-size: 28px; } }

/* Pao Pao's speech bubble */
.paopao-bubble {
  position: fixed; z-index: 60; max-width: min(440px, calc(100vw - 32px));
  background: #fff; color: #1d2233; border: 3px solid #1d2233; border-radius: 20px;
  padding: 12px 18px 14px; box-shadow: 0 6px 0 rgba(29, 34, 51, .18);
  font-family: "Nunito", -apple-system, "PingFang SC", sans-serif; font-weight: 800;
  opacity: 0; transform: scale(.6); transform-origin: var(--tip, 30px) 0; pointer-events: none;
  transition: opacity .18s, transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.paopao-bubble.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.paopao-bubble::before { content: ""; position: absolute; left: calc(var(--tip, 30px) - 13px); top: -13px; width: 20px; height: 20px; background: #fff; border-left: 3px solid #1d2233; border-top: 3px solid #1d2233; transform: rotate(45deg); }
.paopao-bubble .pb-tag { display: inline-block; font-size: 14px; font-weight: 800; color: #fff; background: #7c4dff; border-radius: 999px; padding: 3px 10px; margin-bottom: 6px; }
.paopao-bubble .pb-zh { font-size: 26px; line-height: 1.3; font-family: "PingFang SC", "Hiragino Sans GB", sans-serif; font-weight: 600; }
.paopao-bubble .pb-py { font-size: 17px; color: #ff3d7f; margin-top: 2px; }
.paopao-bubble .pb-en { font-size: 15px; color: #6b7080; margin-top: 6px; font-weight: 700; }

/* emoji rain and pops */
.egg-rain { position: fixed; top: -60px; z-index: 70; pointer-events: none; animation: egg-fall linear forwards; }
@keyframes egg-fall { to { transform: translateY(calc(100vh + 120px)) rotate(540deg); } }
.egg-pop { position: fixed; z-index: 70; pointer-events: none; font-size: 26px; margin: -13px 0 0 -13px; animation: egg-pop .9s ease-out forwards; }
@keyframes egg-pop { 0% { transform: translate(0, 0) scale(.4); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  #home .paopao[class*="egg-"], #home .logo .lt, #home .paopao-hat { animation: none !important; }
}
