@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&display=swap');

:root {
  --azul: #ff9800;
  --azul-oscuro: #e65100;
  --verde: #ffc107;
  --verde-oscuro: #ffa000;
  --rojo: #ff4757;
  
  --primary-grad: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
  --primary-shadow: #ff7675;
  --bg-mesh-kids: radial-gradient(at 8% 12%, hsla(286, 73%, 85%, 1) 0px, transparent 50%),
                  radial-gradient(at 88% 18%, hsla(196, 80%, 79%, 1) 0px, transparent 50%),
                  radial-gradient(at 48% 76%, hsla(43, 89%, 81%, 1) 0px, transparent 50%),
                  radial-gradient(at 15% 85%, hsla(340, 81%, 84%, 1) 0px, transparent 50%);
  --bg-color: #f6f8fd;
  --text-dark: #2c3e50;
  
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --borde-radio: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
  font-family: 'Outfit', sans-serif; 
  background-color: var(--bg-color);
  background-image: var(--bg-mesh-kids);
  background-attachment: fixed;
  color: var(--text-dark); 
  padding: 16px; 
  min-height: 100vh; 
}

.container { max-width: 500px; margin: 0 auto; }

h1 { 
  text-align: center; 
  font-weight: 900; 
  font-size: 2.2rem; 
  margin-bottom: 20px; 
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 2px 2px rgba(255, 107, 107, 0.2));
}

h2 { font-weight: 800; font-size: 1.3rem; margin-bottom: 12px; color: #34495e; letter-spacing: -0.5px; }

/* Glassmorphism Card */
.card { 
  background: var(--glass-bg); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--borde-radio); 
  padding: 28px; 
  margin-bottom: 24px; 
  box-shadow: var(--glass-shadow); 
  border: 1px solid var(--glass-border); 
}

select, input[type="text"] { 
  width: 100%; 
  padding: 16px; 
  font-size: 16px; 
  font-family: 'Outfit', sans-serif; 
  font-weight: 600;
  border-radius: 16px; 
  border: 2px solid rgba(255,255,255,0.8); 
  margin-bottom: 20px; 
  background: rgba(255, 255, 255, 0.9); 
  color: var(--text-dark);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
  transition: all 0.3s ease;
}

select { 
  appearance: none; 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FF8E53' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1.753 1.659l-4.796 5.48a1 1 0 1-1.506 0z'/%3E%3C/svg%3E"); 
  background-repeat: no-repeat; 
  background-position: right 16px center; 
}

select:focus, input[type="text"]:focus { 
  outline: none; 
  border-color: #FF8E53; 
  box-shadow: 0 0 0 4px rgba(255, 142, 83, 0.2);
  transform: translateY(-2px);
}

/* Premium Buttons */
button { 
  width: 100%; 
  padding: 16px; 
  font-size: 17px; 
  font-weight: 800; 
  font-family: 'Outfit', sans-serif; 
  border-radius: 16px; 
  border: none; 
  background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%); 
  color: white; 
  cursor: pointer; 
  margin: 8px 0; 
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  box-shadow: 0 6px 0 #d84315, 0 10px 20px rgba(255, 87, 34, 0.3); 
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 10px 0 #d84315, 0 15px 25px rgba(255, 87, 34, 0.4); 
}

button:active { 
  transform: translateY(4px); 
  box-shadow: 0 2px 0 #d84315, 0 5px 10px rgba(255, 87, 34, 0.3); 
}

button:disabled { 
  background: #e2e8f0; 
  box-shadow: 0 6px 0 #cbd5e1; 
  cursor: not-allowed; 
  transform: translateY(0); 
  color: #94a3b8;
}

button.secundario { 
  background: rgba(255, 255, 255, 0.8); 
  color: var(--text-dark); 
  box-shadow: 0 6px 0 #cbd5e1, 0 10px 20px rgba(0,0,0,0.05); 
  backdrop-filter: blur(5px);
}
button.secundario:hover {
  box-shadow: 0 10px 0 #cbd5e1, 0 15px 25px rgba(0,0,0,0.08); 
}
button.secundario:active {
  box-shadow: 0 2px 0 #cbd5e1, 0 5px 10px rgba(0,0,0,0.05); 
}

.btn-limpiar { margin: 0 auto 16px; padding: 10px 16px; font-size: 0.9rem; width: auto; display: block; }
#juego-container { animation: aparecer 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes aparecer { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.oculto { display: none !important; }

/* In-game Elements */
.header-juego { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.timer { background: linear-gradient(135deg, #ff6b81, #ff4757); color: white; padding: 8px 20px; border-radius: 20px; font-weight: 800; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3); }
.puntaje { background: linear-gradient(135deg, #2ed573, #1e90ff); color: white; padding: 8px 20px; border-radius: 20px; font-weight: 800; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(46, 213, 115, 0.3); }

.zona-pedido { 
  background: rgba(255, 243, 205, 0.8); 
  backdrop-filter: blur(8px);
  border: 3px dashed #ffca28; 
  border-radius: 16px; 
  padding: 16px; 
  text-align: center; 
  margin-bottom: 20px; 
  font-size: 1.3rem; 
  font-weight: 800; 
  color: #d35400;
  box-shadow: 0 8px 20px rgba(255, 202, 40, 0.15);
}

.contenedor-cajas { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; margin-bottom: 20px; }
.caja-pizza { 
  background: rgba(243, 229, 171, 0.9); 
  border: 4px solid #d35400; 
  border-radius: 12px; 
  width: 170px; min-height: 170px; 
  display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; position: relative; justify-content: center; align-items: center; 
  box-shadow: inset 0 0 15px rgba(0,0,0,0.05), 0 5px 15px rgba(211, 84, 0, 0.1);
}
.caja-pizza::after { content: 'PIZZA'; position: absolute; bottom: 4px; right: 8px; font-size: 0.7rem; color: #d35400; opacity: 0.5; font-weight: 900; }
.porcion { 
  background: linear-gradient(135deg, #ffdb58, #ffb142); 
  border: 3px solid #e67e22; 
  border-radius: 50% 50% 15% 50%; 
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; cursor: grab; user-select: none; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); width: 70px; height: 70px; transform: rotate(45deg); 
  box-shadow: 4px 4px 0 #d35400; text-align: center; color: #a04000;
}
.txt-porcion { transform: rotate(-45deg); display: block; line-height: 1.1; pointer-events: none; }
.porcion:hover { transform: scale(1.15) rotate(45deg) translateY(-4px); box-shadow: 8px 8px 0 #d35400, 0 10px 20px rgba(0,0,0,0.2); }
.porcion:active { cursor: grabbing; transform: scale(0.9) rotate(45deg); box-shadow: 1px 1px 0 #d35400; }

.arrastrando {
  opacity: 0.92 !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 25px rgba(255, 165, 0, 0.7) !important;
  cursor: grabbing !important;
  z-index: 9999 !important;
  filter: brightness(1.1) saturate(1.3) !important;
}
.porcion.arrastrando {
  transform: rotate(45deg) scale(1.1) !important;
}
.jarra.arrastrando {
  transform: rotate(0deg) scale(1.1) !important;
}

/* Tetris */
.tablero-tetris { background: rgba(44, 62, 80, 0.9); border-radius: 16px; padding: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; min-height: 300px; margin-bottom: 20px; box-shadow: inset 0 0 20px rgba(0,0,0,0.2); }
.ficha-tetris { background: linear-gradient(135deg, #3498db, #2980b9); color: white; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; box-shadow: 0 6px 0 #1f618d, 0 10px 15px rgba(0,0,0,0.2); cursor: pointer; transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); aspect-ratio: 1; }
.ficha-tetris:hover { transform: translateY(-4px); box-shadow: 0 10px 0 #1f618d, 0 15px 20px rgba(0,0,0,0.3); }
.ficha-tetris:active { transform: translateY(4px); box-shadow: 0 2px 0 #1f618d; }
.ficha-tetris.correcta { background: linear-gradient(135deg, #2ecc71, #27ae60); box-shadow: 0 6px 0 #1e8449; animation: flash-verde 0.5s; }
.ficha-tetris.incorrecta { background: linear-gradient(135deg, #e74c3c, #c0392b); box-shadow: 0 6px 0 #922b21; animation: sacudir 0.3s; }
.ficha-base { background: linear-gradient(135deg, #f1c40f, #f39c12); box-shadow: 0 6px 0 #d68910; grid-column: 1 / -1; font-size: 1.8rem; color: #784212; }

@keyframes flash-verde { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); filter: brightness(1.2); } }
@keyframes sacudir { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px) rotate(-2deg); } 75% { transform: translateX(8px) rotate(2deg); } }

/* Chef */
.objetivo-chef { background: rgba(232, 248, 245, 0.9); border: 3px solid #1abc9c; border-radius: 16px; padding: 16px; text-align: center; margin-bottom: 20px; font-size: 1.4rem; font-weight: 800; color: #16a085; box-shadow: 0 8px 20px rgba(26, 188, 156, 0.15); }
.contenedor-bowls { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-bottom: 20px; }
.bowl { background: rgba(236, 240, 241, 0.9); border: 5px solid #95a5a6; border-radius: 50%; width: 150px; height: 150px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 800; color: var(--text-dark); position: relative; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.1), inset 0 0 20px rgba(0,0,0,0.05); }
.bowl::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: var(--nivel-liquido, 0%); background: rgba(var(--color-liquido-rgb, 52, 152, 219), 0.7); transition: height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.bowl.lleno { border-color: #2ecc71 !important; box-shadow: 0 0 30px rgba(46, 204, 113, 0.8), inset 0 0 20px rgba(46, 204, 113, 0.5); transition: all 0.4s ease; transform: scale(1.05); }

/* Vapor / Peligro */
@keyframes vibrar-suave { 0%, 100% { transform: translateX(0) scale(1); } 25% { transform: translateX(-2px) scale(1.02); } 75% { transform: translateX(2px) scale(1.02); } }
.bowl.peligro { animation: vibrar-suave 0.15s infinite; border-color: #f39c12 !important; box-shadow: 0 0 20px rgba(243, 156, 18, 0.5); }
.vapor-container { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; width: 100px; height: 60px; pointer-events: none; z-index: 5; }
.vapor-particula { width: 35px; height: 35px; background: rgba(255, 255, 255, 0.6); border-radius: 50%; filter: blur(10px); margin: 0 -10px; opacity: 0; animation: subida-vapor 2.5s infinite ease-out; }
.vapor-particula:nth-child(2) { animation-delay: 0.8s; }
.vapor-particula:nth-child(3) { animation-delay: 1.6s; }
.vapor-container.quemado .vapor-particula { background: rgba(40, 40, 40, 0.9); filter: blur(8px); }
@keyframes subida-vapor { 0% { transform: translateY(30px) scale(0.5); opacity: 0; } 40% { transform: translateY(0) scale(1.2); opacity: 0.7; } 100% { transform: translateY(-60px) scale(2); opacity: 0; } }

.jarras-container { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.jarra { background: rgba(var(--color-liquido-rgb, 52, 152, 219), 0.15); border: 4px solid rgb(var(--color-liquido-rgb, 52, 152, 219)); border-radius: 12px 12px 6px 6px; width: 80px; height: 110px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; font-weight: 800; font-size: 1.1rem; color: #2c3e50; cursor: grab; position: relative; transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.jarra::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 46px; height: 10px; background: rgb(var(--color-liquido-rgb, 52, 152, 219)); border-radius: 5px 5px 0 0; pointer-events: none; }
.jarra:hover { transform: translateY(-8px) scale(1.05); box-shadow: 0 15px 25px rgba(0,0,0,0.2), 0 0 15px rgba(52, 152, 219, 0.3); border-color: #2980b9; }
.jarra:active { cursor: grabbing; transform: scale(0.9) translateY(5px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.jarra.usada { opacity: 0.4; cursor: not-allowed; filter: grayscale(1); box-shadow: none; transform: none; }

.cronometro-wrap { display: flex; flex-direction: column; gap: 8px; }
.barra-tiempo-fondo { width: 100%; height: 12px; background: rgba(223, 230, 233, 0.8); border-radius: 6px; overflow: hidden; box-shadow: inset 0 2px 5px rgba(0,0,0,0.1); }
.barra-tiempo { height: 100%; background: linear-gradient(90deg, #2ecc71, #1abc9c); border-radius: 6px; transition: width 1s linear, background 0.5s; }

/* Arquitecto */
.cuerda-ref { height: 36px; background-color: #e67e22; background-image: repeating-linear-gradient( -45deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 12px, rgba(0,0,0,0.2) 12px, rgba(0,0,0,0.2) 24px ); border-radius: 18px; margin: 20px auto; border: 4px solid #d35400; display: flex; overflow: hidden; box-shadow: inset 0 5px 10px rgba(0,0,0,0.4), 0 8px 15px rgba(0,0,0,0.2); }
.cuerda-ref.incorrecta { animation: sacudir 0.3s; border-color: var(--rojo) !important; }
.opciones-arquitecto { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-top: 25px; }
.cuerda-opcion { height: 40px; background-color: #bdc3c7; background-image: repeating-linear-gradient( -45deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 12px, rgba(0,0,0,0.15) 12px, rgba(0,0,0,0.15) 24px ); border-radius: 20px; cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 4px solid #95a5a6; width: 0; display: flex; overflow: hidden; box-shadow: inset 0 5px 10px rgba(0,0,0,0.3), 0 5px 10px rgba(0,0,0,0.1); }
.cuerda-opcion:hover { transform: scale(1.03) translateY(-2px); filter: brightness(1.15); box-shadow: inset 0 5px 10px rgba(0,0,0,0.3), 0 10px 20px rgba(0,0,0,0.2); }
.cuerda-opcion.correcta { background-color: var(--verde); border-color: #27ae60; }
.cuerda-opcion.incorrecta { background-color: var(--rojo); border-color: #c0392b; animation: sacudir 0.3s; }
.cuerda-segmento { height: 100%; border-right: 2px solid rgba(0,0,0,0.2); flex: 1; opacity: 0; transform: scaleX(0); transform-origin: left; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.cuerda-segmento.aparecer { opacity: 1; transform: scaleX(1); }

/* Porcentajes */
.percent-visual-circle { width: 180px; height: 180px; background: conic-gradient(var(--azul) 0%, rgba(236, 240, 241, 0.8) 0%); border-radius: 50%; margin: 25px auto; border: 6px solid #bdc3c7; box-shadow: 0 10px 25px rgba(0,0,0,0.2), inset 0 5px 15px rgba(0,0,0,0.1); transition: background 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; }
.percent-mark { position: absolute; top: 0; left: calc(50% - 1.5px); width: 3px; height: 14px; background: rgba(127, 140, 141, 0.8); transform-origin: center 90px; pointer-events: none; z-index: 10; border-radius: 2px; }
.percent-mark.quarter { height: 22px; width: 4px; left: calc(50% - 2px); background: #2c3e50; }
.percent-label-big { font-size: 2.8rem; font-weight: 900; color: #e65100; text-align: center; margin-bottom: 10px; text-shadow: 0 4px 10px rgba(230, 81, 0, 0.2); }
.btn-grid-porcentaje { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 25px; }

/* Partículas de chispas */
.particula {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3000;
  animation: volar-chispa 0.6s ease-out forwards;
}
@keyframes volar-chispa {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* Notificaciones Toast */
.notificacion-toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-150%); z-index: 2000; width: 90%; max-width: 400px; padding: 18px 24px; border-radius: 20px; text-align: center; font-weight: 800; box-shadow: 0 15px 40px rgba(0,0,0,0.2); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s; opacity: 0; pointer-events: none; font-size: 1.15rem; backdrop-filter: blur(10px); }
.notificacion-toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.notificacion-toast.exito { background: rgba(213, 244, 230, 0.95); color: #27ae60; border: 3px solid #2ecc71; }
.notificacion-toast.error { background: rgba(250, 219, 216, 0.95); color: #c0392b; border: 3px solid #e74c3c; }

/* Logros */
.logro-item { display: flex; align-items: center; gap: 15px; padding: 16px; background: rgba(255, 255, 255, 0.6); border-radius: 16px; margin-bottom: 12px; border: 2px solid rgba(255, 255, 255, 0.8); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.logro-item.completado { background: rgba(255, 253, 231, 0.9); border-color: #f1c40f; transform: scale(1.03); box-shadow: 0 8px 25px rgba(241, 196, 15, 0.2); }
.logro-icon { font-size: 1.8rem; filter: grayscale(1); transition: filter 0.5s; }
.logro-item.completado .logro-icon { filter: grayscale(0); animation: saltito 1s ease; }
.logro-check { margin-left: auto; color: #bdc3c7; font-size: 1.4rem; }
.completado .logro-check { color: #2ecc71; filter: drop-shadow(0 2px 4px rgba(46, 204, 113, 0.4)); }
.maestro-banner { background: linear-gradient(135deg, #FFD700, #FF8C00); color: white; padding: 20px; border-radius: 16px; text-align: center; font-weight: 900; font-size: 1.2rem; margin-bottom: 25px; box-shadow: 0 10px 30px rgba(255, 140, 0, 0.4); animation: pulso-nota 2s infinite; border: 2px solid #fff; }

@keyframes saltito { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Barra de Progreso de Maestría */
.progreso-container { width: 100%; height: 18px; background: rgba(255, 255, 255, 0.5); border-radius: 9px; margin-bottom: 25px; position: relative; overflow: hidden; box-shadow: inset 0 4px 8px rgba(0,0,0,0.1); border: 2px solid rgba(255, 255, 255, 0.8); }
.progreso-barra { height: 100%; background: linear-gradient(90deg, #ff9800, #ffc107, #2ecc71); width: 0%; transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
.progreso-texto { position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: 0.7rem; font-weight: 900; color: #2c3e50; line-height: 18px; text-transform: uppercase; letter-spacing: 1.5px; pointer-events: none; text-shadow: 0 1px 2px rgba(255,255,255,0.8); }

@keyframes pulso-nota { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15) rotate(2deg); } }
.nota-perfecta { animation: pulso-nota 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite; display: inline-block; color: #ff9800; text-shadow: 0 4px 15px rgba(255, 152, 0, 0.4); }

/* Slogan */
.mp-slogan { margin-top: -10px; font-size: 1.2rem; color: #e65100; font-weight: 900; text-align: center; margin-bottom: 25px; animation: mpFadeIn 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes mpFadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Mascota MateBot ── */
.matebot {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.matebot-body {
  width: 70%;
  height: 70%;
  border-radius: 20%;
  position: relative;
  box-shadow: inset -5px -5px 10px rgba(0,0,0,0.2), 5px 5px 15px rgba(0,0,0,0.1);
  transition: background 0.5s ease;
  z-index: 10;
}

.matebot-face {
  position: absolute;
  top: 30%;
  left: 0;
  width: 100%;
  height: 40%;
  display: flex;
  justify-content: center;
  gap: 15%;
  z-index: 20;
}

.matebot-eye {
  width: 15%;
  height: 40%;
  background: #2c3e50;
  border-radius: 50%;
  animation: parpadeo 4s infinite;
}

@keyframes parpadeo {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

.matebot-mouth {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 10%;
  background: rgba(0,0,0,0.1);
  border-radius: 20px;
}

/* Accesorios */
.matebot-acc {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 30;
  display: flex;
  justify-content: center;
}

/* Hats */
.acc-hat-viking {
  position: absolute;
  top: -15%;
  width: 80%;
  height: 40%;
  background: #95a5a6;
  border-radius: 50% 50% 0 0;
  border: 4px solid #7f8c8d;
}
.acc-hat-viking::before, .acc-hat-viking::after {
  content: ''; position: absolute; top: 0; width: 30%; height: 60%; background: #ecf0f1; border: 3px solid #bdc3c7;
}
.acc-hat-viking::before { left: -15%; border-radius: 100% 0 0 0; transform: rotate(-20deg); }
.acc-hat-viking::after { right: -15%; border-radius: 0 100% 0 0; transform: rotate(20deg); }

.acc-hat-crown {
  position: absolute;
  top: -25%;
  width: 70%;
  height: 40%;
  background: #f1c40f;
  clip-path: polygon(0% 100%, 100% 100%, 100% 0%, 80% 50%, 50% 0%, 20% 50%, 0% 0%);
  border-bottom: 4px solid #d4ac0d;
}

.acc-hat-fedora {
  position: absolute;
  top: -10%;
  width: 90%;
  height: 30%;
  background: #2c3e50;
  border-radius: 5px;
}
.acc-hat-fedora::before {
  content: ''; position: absolute; top: -70%; left: 15%; width: 70%; height: 100%; background: #2c3e50; border-radius: 10px 10px 0 0; border-bottom: 4px solid #e74c3c;
}

.acc-hat-chef {
  position: absolute;
  top: -35%;
  width: 70%;
  height: 50%;
  background: #fff;
  border-radius: 20px 20px 5px 5px;
  border: 4px solid #ddd;
  box-shadow: 0 -5px 10px rgba(0,0,0,0.05);
}
.acc-hat-chef::before {
  content: ''; position: absolute; top: -20px; left: -10%; width: 120%; height: 40px; background: #fff; border-radius: 50%; border: 4px solid #ddd; border-bottom: none;
}

.acc-hat-magic {
  position: absolute;
  top: -45%;
  width: 70%;
  height: 60%;
  background: #4b2c20;
  clip-path: polygon(10% 100%, 90% 100%, 70% 0%, 30% 0%);
  border-bottom: 8px solid #3d1e13;
}
.acc-hat-magic::after {
  content: '★'; position: absolute; top: 10%; left: 50%; transform: translateX(-50%); color: #f1c40f; font-size: 1.5rem;
}

/* Glasses / Face / Face Items */
.acc-glasses-cool {
  position: absolute;
  top: 30%;
  width: 80%;
  height: 25%;
  display: flex;
  gap: 5%;
}
.acc-glasses-cool::before, .acc-glasses-cool::after {
  content: ''; flex: 1; background: #2c3e50; border-radius: 5px; border-bottom: 3px solid #34495e;
}

.acc-glasses-nerd {
  position: absolute;
  top: 30%;
  width: 85%;
  height: 30%;
  display: flex;
  gap: 10%;
}
.acc-glasses-nerd::before, .acc-glasses-nerd::after {
  content: ''; flex: 1; border: 4px solid #2c3e50; background: rgba(255,255,255,0.2); border-radius: 5px;
}

.acc-glasses-scientist {
  position: absolute;
  top: 25%;
  width: 90%;
  height: 35%;
  display: flex;
  gap: 5%;
}
.acc-glasses-scientist::before, .acc-glasses-scientist::after {
  content: ''; flex: 1; border: 6px solid #555; background: rgba(255,255,255,0.3); border-radius: 50%;
}

.acc-glasses-eyepatch {
  position: absolute;
  top: 30%;
  left: 0;
  width: 100%;
  height: 30%;
  display: flex;
  justify-content: center;
}
.acc-glasses-eyepatch::before {
  content: ''; width: 40%; height: 100%; background: #2c3e50; border-radius: 5px 5px 50% 50%; position: absolute; left: 15%;
}
.acc-glasses-eyepatch::after {
  content: ''; position: absolute; top: 10px; width: 100%; height: 4px; background: #2c3e50; transform: rotate(-10deg);
}

.acc-face-mustache {
  position: absolute;
  top: 60%;
  width: 40%;
  height: 15%;
  background: #333;
  border-radius: 50px 50px 0 0;
  clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
}

.acc-face-sparkle {
  position: absolute;
  top: 30%;
  width: 100%;
  height: 40%;
  display: flex;
  justify-content: space-around;
}
.acc-face-sparkle::before, .acc-face-sparkle::after {
  content: '✨'; font-size: 1.2rem; animation: sparkle-anim 1s infinite;
}

/* Body Items */
.acc-body-labcoat {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60%;
  background: #fff;
  border-radius: 0 0 15px 15px;
  border: 2px solid #ddd;
  z-index: 15;
  clip-path: polygon(0% 0%, 40% 0%, 50% 40%, 60% 0%, 100% 0%, 100% 100%, 0% 100%);
}
.acc-body-labcoat::after {
  content: '•••'; position: absolute; left: 52%; top: 40%; transform: rotate(90deg); font-size: 12px; color: #999; letter-spacing: 2px;
}

.acc-body-spacesuit {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 65%;
  background: #ecf0f1;
  border-radius: 0 0 15px 15px;
  border: 4px solid #bdc3c7;
  z-index: 15;
}
.acc-body-spacesuit::before {
  content: '🚀'; position: absolute; left: 10%; top: 20%; font-size: 0.8rem;
}
.acc-body-spacesuit::after {
  content: ''; position: absolute; top: 0; width: 100%; height: 20%; background: #3498db; opacity: 0.3;
}

.acc-body-jersey {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 55%;
  background: #e74c3c;
  border-radius: 0 0 15px 15px;
  border-top: 6px solid #c0392b;
  z-index: 15;
}
.acc-body-jersey::after {
  content: '10'; position: absolute; left: 50%; top: 20%; transform: translateX(-50%); color: white; font-weight: 900; font-size: 1.2rem;
}

/* Hand Items */
.acc-hand-pencil {
  position: absolute;
  right: -20%;
  bottom: 10%;
  width: 15%;
  height: 60%;
  background: #f1c40f;
  border: 2px solid #d4ac0d;
  border-radius: 5px;
  transform: rotate(15deg);
  z-index: 25;
}
.acc-hand-pencil::before {
  content: ''; position: absolute; top: -10px; left: 0; width: 100%; height: 10px; background: #edbb99; clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.acc-hand-pencil::after {
  content: ''; position: absolute; top: -10px; left: 35%; width: 30%; height: 4px; background: #333; border-radius: 50%;
}

.acc-hand-pen {
  position: absolute;
  right: -15%;
  bottom: 10%;
  width: 10%;
  height: 55%;
  background: #3498db;
  border: 2px solid #2980b9;
  border-radius: 3px;
  transform: rotate(10deg);
  z-index: 25;
}
.acc-hand-pen::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 20%; background: #bdc3c7;
}

.acc-hand-hook {
  position: absolute;
  right: -25%;
  bottom: 15%;
  width: 30%;
  height: 40%;
  background: #7f8c8d;
  clip-path: polygon(0% 100%, 40% 100%, 50% 0%, 100% 40%, 80% 60%, 40% 40%);
  z-index: 25;
  transform: rotate(20deg);
}

.acc-hand-rocket {
  position: absolute;
  right: -25%;
  bottom: 10%;
  font-size: 2.5rem;
  z-index: 25;
  transform: rotate(-15deg);
}

.acc-hand-trophy {
  position: absolute;
  right: -30%;
  bottom: 5%;
  font-size: 2.8rem;
  z-index: 25;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,0.2));
}

/* More Hats */
.acc-hat-pirate {
  position: absolute;
  top: -30%;
  width: 110%;
  height: 45%;
  background: #2c3e50;
  clip-path: polygon(0% 100%, 100% 100%, 80% 0%, 50% 20%, 20% 0%);
}
.acc-hat-pirate::after {
  content: '☠️'; position: absolute; top: 40%; left: 50%; transform: translateX(-50%); font-size: 0.8rem;
}

.acc-hat-helmet {
  position: absolute;
  top: -15%;
  width: 100%;
  height: 110%;
  border: 6px solid #bdc3c7;
  border-radius: 30%;
  background: rgba(52, 152, 219, 0.2);
  z-index: 100;
}

.acc-hat-cap {
  position: absolute;
  top: -15%;
  width: 90%;
  height: 35%;
  background: #e74c3c;
  border-radius: 20px 20px 0 0;
}
.acc-hat-cap::after {
  content: ''; position: absolute; bottom: 0; left: 80%; width: 40%; height: 8px; background: #c0392b; border-radius: 0 10px 10px 0;
}

@keyframes sparkle-anim { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } }

/* Victory Mascot & Speech Bubble */
.mascota-victoria-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  animation: saltito-victoria 0.8s infinite;
}

@keyframes saltito-victoria {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.burbuja-matebot {
  background: white;
  border: 3px solid #3498db;
  border-radius: 20px;
  padding: 12px 20px;
  position: relative;
  margin-bottom: 15px;
  font-weight: 800;
  color: #2c3e50;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  max-width: 200px;
  text-align: center;
}
.burbuja-matebot::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 15px solid #3498db;
}

/* Items en Tienda */
.item-accesorio {
  background: rgba(255,255,255,0.8);
  border-radius: 15px;
  padding: 10px;
  text-align: center;
  border: 2px solid #eee;
  transition: all 0.3s ease;
}
.item-accesorio.comprado { border-color: #2ecc71; background: #f0fff4; }
.item-accesorio.equipado { border-color: #3498db; box-shadow: 0 0 10px rgba(52, 152, 219, 0.3); background: #ebf5fb; }
.item-accesorio button { padding: 8px; font-size: 0.8rem; margin-top: 5px; }

/* Streak Fire Animations */
@keyframes flame-blue { 0% { text-shadow: 0 0 5px #3498db, 0 0 10px #3498db; transform: scale(1); } 100% { text-shadow: 0 0 10px #3498db, 0 0 20px #3498db; transform: scale(1.1); } }
@keyframes flame-orange { 0% { text-shadow: 0 0 5px #e67e22, 0 0 15px #e67e22; transform: scale(1.1); } 100% { text-shadow: 0 0 15px #e67e22, 0 0 25px #e67e22; transform: scale(1.2); } }
@keyframes flame-purple { 0% { text-shadow: 0 0 10px #9b59b6, 0 0 20px #9b59b6; transform: scale(1.2); } 100% { text-shadow: 0 0 20px #9b59b6, 0 0 35px #9b59b6; transform: scale(1.3); } }

.streak-blue { animation: flame-blue 0.4s infinite alternate; color: #3498db; }
.streak-orange { animation: flame-orange 0.3s infinite alternate; color: #e67e22; }
.streak-purple { animation: flame-purple 0.2s infinite alternate; color: #9b59b6; }

@keyframes mpFadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 360px) { h1 { font-size: 1.8rem; } .card { padding: 20px; } button { padding: 14px; font-size: 15px; } }
