/* ═══════════════════════════════════════
   SPLASH SCREEN & CINEMATIC INTRO
   ═══════════════════════════════════════ */

/* SPLASH SCREEN */
#splashScreen {
  position: fixed;
  inset: 0;
  background: #0a0a1a;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease;
}

#splashScreen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: splashIn .8s ease-out;
}

@keyframes splashIn {
  from { opacity: 0; transform: scale(.8) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.splash-emoji {
  font-size: 72px;
  animation: splashBounce 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255,215,0,.4));
  position: relative;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-emoji::before {
  content: '😎';
  animation: emojiSwap 3s steps(1) infinite;
}

@keyframes emojiSwap {
  0%   { content: '😎'; }
  33%  { content: '🥶'; }
  66%  { content: '😡'; }
}

@keyframes splashBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-12px) rotate(-3deg); }
  75%      { transform: translateY(-6px) rotate(3deg); }
}

.splash-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(38px, 11vw, 68px);
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 40%, #FF6B35 70%, #FFD700 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 4px;
  filter: drop-shadow(0 4px 20px rgba(255,165,0,0.6));
  margin-bottom: 4px;
  animation: titleGlow 2s ease-in-out infinite, titleShine 3s linear infinite;
  text-shadow: none;
  position: relative;
}

@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 4px 20px rgba(255,165,0,0.6)); }
  50% { filter: drop-shadow(0 4px 35px rgba(255,215,0,0.9)); }
}

@keyframes titleShine {
  0% { background-position: 200% 0%; }
  100% { background-position: -200% 0%; }
}

.splash-subtitle {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(14px, 3vw, 18px);
  color: rgba(255,255,255,.6);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-top: -8px;
  font-weight: 400;
  opacity: 0.8;
}

.splash-bar {
  width: min(300px, 85vw);
  height: 14px;
  background: rgba(0,0,0,0.7);
  border: 2px solid rgba(255,215,0,0.5);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 24px;
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.9),
    0 0 30px rgba(255,165,0,0.3),
    0 0 60px rgba(255,215,0,0.15);
  position: relative;
}

.splash-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.05) 50%,
    transparent 100%);
  animation: barTrackPulse 2s ease-in-out infinite;
  z-index: 0;
}

@keyframes barTrackPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.splash-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FFD700, #FFA500, #FF6B35, #FF8C00);
  border-radius: 12px;
  transition: width .2s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  box-shadow:
    0 0 25px rgba(255,215,0,0.8),
    0 0 50px rgba(255,165,0,0.4),
    inset 0 2px 4px rgba(255,255,255,0.4),
    inset 0 -2px 4px rgba(0,0,0,0.2);
  z-index: 1;
}

.splash-fill::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.5) 50%,
    transparent 100%);
  animation: barShimmer 1.2s ease-in-out infinite;
}

@keyframes barShimmer {
  0% { transform: translateX(-200%) skewX(-15deg); }
  100% { transform: translateX(200%) skewX(-15deg); }
}

.splash-fill::after {
  content: '';
  position: absolute;
  top: 2px; left: 4px; right: 4px;
  height: 4px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.6),
    rgba(255,255,255,0.2),
    rgba(255,255,255,0.6));
  border-radius: 6px;
  opacity: 0.8;
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255,215,0,0.4)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 25px rgba(255,215,0,0.7)); transform: scale(1.05); }
}

.splash-text {
  font-size: 16px;
  font-family: 'Fredoka One', cursive;
  color: rgba(255,255,255,.85);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes splashPulse {
  0%, 100% { opacity: .4; }
  50%      { opacity: .8; }
}

.splash-skip {
  position: absolute;
  bottom: 30px;
  right: 30px;
  color: rgba(255,255,255,.3);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  animation: skipPulse 2s ease-in-out infinite;
  z-index: 10;
  user-select: none;
}

/* CINEMATIC OVERLAY */
#cinematicOverlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 99998;
  display: none;
  cursor: pointer;
  overflow: hidden;
}

#cinematicOverlay.active {
  display: block;
}

#cinematicOverlay .skip-hint {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: rgba(255,255,255,.3);
  font-size: 13px;
  font-weight: 700;
  z-index: 10;
  animation: skipPulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes skipPulse {
  0%, 100% { opacity: .3; }
  50%      { opacity: .7; }
}

/* Emma temporal durante cinematica */
.emma-temp {
  position: absolute;
  z-index: 200;
  transition: none;
  pointer-events: none;
}

.emma-temp .npe {
  font-size: 42px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5));
  display: block;
}

/* Emma rotando al irse */
.emma-spin {
  animation: emmaSpin 1.5s ease-in forwards;
}

@keyframes emmaSpin {
  0%   { transform: rotate(0deg) translateY(0); opacity: 1; }
  50%  { transform: rotate(720deg) translateY(-40px); opacity: 1; }
  100% { transform: rotate(1080deg) translateY(-200px); opacity: 0; }
}

/* Burbujas de dialogo cinematica */
.cine-bubble {
  position: absolute;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  padding: 10px 16px;
  max-width: 280px;
  font-size: 14px;
  color: #fff;
  line-height: 1.4;
  z-index: 10;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.cine-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

.cine-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(0,0,0,.85);
}

/* Ocultar boton cerrar en modo intro */
.ibx.intro-hidden {
  display: none !important;
}

/* ── ANDROID NOTIFICATION TRAY ── */
#notificationTray {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 16px 12px 20px;
  background: linear-gradient(180deg, rgba(10,10,26,0.95) 0%, rgba(10,10,26,0.85) 60%, rgba(10,10,26,0) 100%);
  transform: translateY(-120%);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#notificationTray.notification-tray-visible {
  transform: translateY(0) !important;
}

#notificationTray.notification-tray-hidden {
  transform: translateY(-120%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 20px rgba(0, 200, 83, 0.3), 0 2px 8px rgba(0,0,0,0.5);
  cursor: pointer;
  border: 1px solid rgba(0, 200, 83, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: notifBounce 0.5s ease-out 0.3s both;
}

@keyframes notifBounce {
  0% { transform: scale(0.9); opacity: 0; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

.notification-card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(0, 200, 83, 0.4), 0 4px 12px rgba(0,0,0,0.6);
}

.notification-card:active {
  transform: scale(0.98);
}

.notif-icon {
  font-size: 36px;
  margin-right: 14px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 200, 83, 0.15);
  border-radius: 50%;
}

.notif-content {
  flex: 1;
}

.notif-title {
  font-size: 14px;
  font-weight: 700;
  color: #00C853;
  margin-bottom: 2px;
}

.notif-message {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 10px;
}
