/* ══════════════════════════════════════════════
   RITMO MENTAL — MODO APP
   ══════════════════════════════════════════════ */

/* ── Barra superior ── */
.app-topbar {
  position: sticky;
  top: 0;
  background: #2A7C6F;
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 18px;
  font-family: 'Nunito', sans-serif;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ── En modo app: ocultar todo lo que es web ── */
body.app-mode header,
body.app-mode .hero,
body.app-mode footer {
  display: none !important;
}

/* ══════════════════════════════════════════════
   TARJETA GRANDE DE RITI
   ══════════════════════════════════════════════ */
.riti-card {
  background: linear-gradient(135deg, #2A7C6F 0%, #1D5C52 100%);
  border-radius: 24px;
  margin: 14px 0 6px;
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(42,124,111,0.35);
  position: relative;
  overflow: hidden;
}

.riti-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.riti-card-buho {
  flex-shrink: 0;
  width: 90px;
}

.riti-card-buho img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.riti-card-texto {
  flex: 1;
}

.riti-card-saludo {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.riti-card-mensaje {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: white;
  line-height: 1.45;
}

/* Animación búho */
@keyframes buho-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.buho-anim {
  animation: buho-bounce 3.5s ease-in-out infinite;
  width: 90px;
  height: 90px;
  object-fit: contain;
  display: block;
}

/* ══════════════════════════════════════════════
   HOME: SUBTÍTULO Y GRID DE JUEGOS
   ══════════════════════════════════════════════ */
.app-home-subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  color: #888;
  font-weight: 700;
  margin: 18px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.app-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.app-game-card {
  background: white;
  border-radius: 20px;
  padding: 20px 14px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  border: 2px solid transparent;
}

.app-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(42,124,111,0.18);
  border-color: #E6F4F1;
}

.app-game-card:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.app-game-icon {
  font-size: 40px;
  margin-bottom: 8px;
  display: block;
  line-height: 1;
}

.app-game-name {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: #1E1E1E;
  margin-bottom: 3px;
}

.app-game-desc {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  color: #999;
  line-height: 1.3;
}

/* ── Botones volver más grandes en app ── */
body.app-mode .btn-back,
body.app-mode .btn-back-light {
  padding: 14px 32px;
  font-size: 1.05rem;
}

a, button { -webkit-tap-highlight-color: transparent; }

/* ══════════════════════════════════════════════
   CELEBRACIÓN DE RITI
   ══════════════════════════════════════════════ */
#riti-celebracion {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.celeb-contenido {
  background: white;
  border-radius: 28px;
  padding: 28px 32px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  position: relative;
  max-width: 280px;
  width: 80%;
}

.celeb-buho {
  font-size: 64px;
  display: block;
  margin-bottom: 10px;
  line-height: 1;
}

.celeb-mensaje {
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: #2A7C6F;
  line-height: 1.3;
}

/* Emojis flotantes */
.celeb-emojis {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.celeb-emoji {
  position: absolute;
  font-size: 28px;
  left: var(--x, 50%);
  top: 100%;
  animation: emoji-sube 2s ease-out var(--delay, 0s) both;
}

@keyframes emoji-sube {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* Animación entrada/salida del overlay */
@keyframes celeb-pop-in {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes celeb-pop-out {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0; }
}

.celeb-entrar .celeb-contenido {
  animation: celeb-pop-in 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

.celeb-salir .celeb-contenido {
  animation: celeb-pop-out 0.35s ease-in both;
}

/* Búho saltando en la celebración */
@keyframes buho-celeb {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%       { transform: translateY(-16px) rotate(-8deg); }
  75%       { transform: translateY(-10px) rotate(8deg); }
}

.celeb-buho-bounce {
  animation: buho-celeb 0.5s ease-in-out 3 !important;
}