/* ListeningWeb — Demo Visual v1.0 */
/* Paleta: celeste #bfe7ff, verde lima #a6f4a4, acentos #00aaff */
:root{
  --bg1: #f4fbff;
  --bg2: #eaf7ff;
  --brand: #00aaff;
  --accent: #7bd389;
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --ring: rgba(0,170,255,0.35);
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Poppins,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text)}

.bg{
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  min-height: 100vh;
  display:flex;
  flex-direction:column;
}

.topbar{
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  position:sticky; top:0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border-bottom:1px solid #e2e8f0;
  z-index: 10;
}
.back{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:10px; text-decoration:none;
  color:var(--brand); font-weight:600; border:1px solid #bae6fd;
  background:#fff;
}
.back:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.brand{display:flex;align-items:center;gap:10px}
.logo{font-size:28px; display:inline-block}
.brand-text{font-weight:800; letter-spacing:.3px}

.container{
  width: min(980px, 92%);
  margin: 24px auto;
  flex:1;
}

.center{display:grid;place-items:center}

.card{
  background:var(--card);
  border-radius:18px;
  padding:24px;
  box-shadow: var(--shadow);
  border:1px solid #e2e8f0;
}

.title{
  margin:0;
  font-size: clamp(28px, 4vw, 42px);
  line-height:1.1;
}
.subtitle{text-align: center; color:var(--muted); margin-top:8px; margin-bottom:24px}

.hero {
  text-align: center;
}

.hero-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 16px;
}

.btn{
  display:inline-block;
  justify-content: center;
  padding:12px 18px;
  border-radius:14px;
  background:#fff;
  color:var(--text);
  text-decoration:none;
  border:1px solid #cbd5e1;
  font-weight:600;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,0.12); }
.btn.primary{
  background: linear-gradient(135deg, var(--brand), #34d399);
  color:#fff;
  border:none;
}

.footer{
  text-align:center;
  padding:18px 12px;
  color:var(--muted);
}

.form{display:grid; gap:10px; margin-top:10px}
.form input{
  padding:12px 14px;
  border-radius:12px;
  border:1px solid #cbd5e1;
  outline:none;
}
.form input:focus{ box-shadow: 0 0 0 6px var(--ring); border-color:#7dd3fc }

.small{font-size:12px}
.muted{color:var(--muted)}

.section-title{margin:8px 0 16px 2px}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}
.card.game{ text-decoration:none; color:inherit; text-align:center; padding:22px }
.card-emoji{ font-size:42px; margin-bottom:8px }

.userpill{
  min-width: 48px;
  padding: 8px 12px;
  border-radius: 999px;
  background:#e0f2fe;
  color:#0369a1;
  font-weight:600;
}

.placeholder{
  display:grid; place-items:center;
  border:2px dashed #bae6fd;
  padding:28px; border-radius:16px; margin:10px 0 18px;
  background:#f0f9ff;
}
.placeholder-emoji{ font-size:64px; }
.placeholder-text{ color:var(--muted) }

/* ==========================================================
   MENU – MARCO DE JUEGOS (menu.php) INICIO
   ========================================================== */

.menu-frame {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

/* Ajuste de grid SOLO para el menú */
.menu-frame .grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Compactar tarjetas del menú */
.menu-frame .card.game {
  padding: 16px;
}

/* Awards */
.awards-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
  margin: 8px 0 18px;
}
.award{
  background:#fff;
  border-radius:18px;
  padding:18px;
  border:1px solid #e2e8f0;
  box-shadow: var(--shadow);
  text-align:center;
}
.award-emoji{ font-size:36px; }
.award-title{ font-weight:700; margin-top:8px }
.award-desc{ color:var(--muted); font-size:14px }
.award.locked{ opacity:.65 }
.award.unlocked{ outline:3px solid #86efac; }

.legend{ margin-top:10px }
.legend-dot{ display:inline-block; width:12px; height:12px; border-radius:999px; margin:0 6px -1px 6px }
.locked-dot{ background:#cbd5e1 }
.unlocked-dot{ background:#86efac }

/* Animations */
.fade-in{ animation: fade .6s ease both }
@keyframes fade{ from{opacity:0; transform: translateY(6px)} to{opacity:1; transform:none} }

.bounce{ animation: bounce .9s ease-out both }
@keyframes bounce{
  0%{ transform: translateY(-22px) }
  55%{ transform: translateY(6px) }
  100%{ transform: translateY(0) }
}

.bounce-sm{ transition: transform .12s ease }
.bounce-sm:hover{ transform: translateY(-3px) }

.link{ color:var(--brand); text-decoration:none; font-weight:600 }
.link:hover{ text-decoration:underline }

/* ==========================================================
   🐸 SECCIÓN FINAL — MONSTRUO VIGILANTE LOGIN
   Versión limpia y estable (único bloque)
   ========================================================== */

/* 1️⃣ Asegura que el main no oculte nada */
body.login-page main {
  position: relative;           /* Base de referencia para el monstruo */
  overflow: visible;            /* Permite que sobresalga por arriba */
   margin-top: 180px;   /* 🔽 Baja todo el bloque: monstruo + tarjeta */
}

/* 2️⃣ Ajustes de la tarjeta solo para el login */
body.login-page .card {
  position: relative;
  overflow: visible;
  width: 50%;
  max-width: 400px;
  min-width: 280px;
  margin: 0 auto;
  z-index: 10;             /* Tarjeta por encima del monstruo */
}

/* 3️⃣ Monstruo que muerde el borde superior */
body.login-page .login-monster {
  position: absolute;
  top: -150px;             /* Ajuste visual para que muerda el borde */
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  z-index: 1;              /* 🔽 Por debajo de la tarjeta */
  pointer-events: none;
  animation: monster-bob 3s ease-in-out infinite;
}

/* 4️⃣ Animación de respiración del monstruo */
@keyframes monster-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}

/* === Estilos mensaje cuando no hay juegos para cargar === */
.no-game-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 1.6rem;
  color: #333;
  font-family: 'Poppins', sans-serif;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 1em 2em;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
