/* Tema infantil y colorido */
:root {
  --bg: #fff7ed; /* naranja muy claro */
  --bg-2: #e0f2fe; /* celeste claro */
  --bg-3: #fde1e1; /* rosado claro */
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #f97316; /* naranja vivo */
  --accent-2: #22c55e; /* verde */
  --accent-3: #3b82f6; /* azul */
  --accent-4: #f43f5e; /* rosa */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Fredoka", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(1200px 600px at 15% -10%, #fff0c9 0%, var(--bg) 55%),
    radial-gradient(1000px 500px at 110% 10%, var(--bg-2) 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--bg-3) 0%, transparent 60%);
  color: var(--text);
}

header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
}

h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.3px;
}

main {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 20px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand .logo {
  font-size: 26px;
}

.hero {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 18px 16px;
  margin: 16px 0 20px;
  overflow: hidden;
}

.hero h2 {
  margin: 4px 0 8px;
  font-size: 32px;
}

.hero p {
  margin: 0 0 12px;
  color: var(--muted);
}

.hero .bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.25;
  filter: blur(2px);
}

.b1 { background: var(--accent-2); top: -20px; left: -30px; }
.b2 { background: var(--accent-3); top: -30px; right: -20px; }
.b3 { background: var(--accent-4); bottom: -30px; left: 20%; }

.card {
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.grid, .games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 120ms ease, box-shadow 120ms ease;
  position: relative;
  overflow: hidden;
}

.game-card h4 { margin: 0; font-size: 18px; }

.game-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.08); }
.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.cover-cazador::before {
  background-image: linear-gradient(0deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.0) 100%),
    url('juegos/cazador_de_letras/Investigador.jpg');
}

.cover-adivina::before {
  background-image: linear-gradient(0deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.0) 100%),
    url('juegos/adivina_la_figura/adivina.png');
}

.cover-memoria::before {
  background-image: linear-gradient(0deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.0) 100%),
    url('juegos/memoria/memo.png');
}

.cover-tangram::before {
  background-image: linear-gradient(0deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.0) 100%),
    url('juegos/tangram/tangram.png');
}

.category-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #e0f2fe;
  color: #075985;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.games-grid a.game-card { color: inherit; text-decoration: none; }

.tag-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.category-label { display: inline-flex; align-items: center; gap: 6px; background: #e0f2fe; color: #075985; border: 1px solid rgba(0,0,0,0.06); padding: 4px 10px; border-radius: 999px; font-size: 12px; }

.game-head { display: flex; align-items: center; gap: 12px; }
.icon-bubble { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fef3c7; font-size: 26px; border: 1px solid rgba(0,0,0,0.06); }
.icon-bubble.sm { width: 28px; height: 28px; font-size: 16px; }
.icon-bubble img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.pill { display: inline-block; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #e0f2fe; color: #075985; border: 1px solid rgba(0,0,0,0.06); }

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid rgba(0,0,0,0.06);
}

.btn-primary {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  color: #111827;
  background: linear-gradient(180deg, var(--accent), #f97316);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
}

.btn-disabled {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  color: #6b7280;
  background: #f3f4f6;
  text-decoration: none;
  font-weight: 600;
  border: 1px dashed #d1d5db;
  cursor: not-allowed;
}

.section-title {
  font-size: 22px;
  margin: 8px 0 12px;
}

.muted { color: var(--muted); }

.site-footer {
  margin: 28px 0 18px;
  text-align: center;
  color: var(--muted);
}

/* Cover backgrounds for game cards */
.cover-geoplanos {
  background-image: url('juegos/geoplanos/geoplano.gif');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.cover-geoplanos::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 1;
}

.cover-geoplanos > * {
  position: relative;
  z-index: 2;
}


