/**
 * Plataforma: Aventuras de Verano
 * UI/UX: Sistema de Botones Táctiles Gigantes 3D (Mobile-First Absoluto)
 */

:root {
    --bg-primary: #f0f7ff;
    --color-aventura: #3b82f6; /* Celeste */
    --color-text: #1e293b;
    --font-kids: 'Fredoka', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Eliminar destello feo en iOS/Android */
    user-select: none; /* Evitar que el niño seleccione texto por accidente */
}

body {
    font-family: var(--font-kids);
    background-color: var(--bg-primary);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.login-container {
    width: 100%;
    max-width: 420px; /* Tamaño ideal para simular un smartphone en pantallas grandes */
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--color-aventura);
    margin-bottom: 8px;
}

.instruccion {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #64748b;
}

/* --- GRID DE AVATARES --- */
.avatar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 10px;
}

.avatar-card {
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    border-bottom: 7px solid #e2e8f0; /* Efecto 3D base */
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    font-family: var(--font-kids);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    transition: all 0.1s ease;
}

/* Efecto Físico de Hundimiento al presionar */
.avatar-card:active {
    transform: translateY(4px);
    border-bottom-width: 3px;
}

.avatar-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

/* --- INTERFAZ DEL TECLADO PIN --- */
.hidden {
    display: none !important;
}

.btn-regresar {
    background: none;
    border: none;
    font-family: var(--font-kids);
    font-size: 0.95rem;
    color: #64748b;
    cursor: pointer;
    margin-bottom: 20px;
}

.identidad-seleccionada {
    margin-bottom: 20px;
}

#saludo-personaje {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Visualizador de esferas PIN */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.dot {
    width: 24px;
    height: 24px;
    border: 3px solid #cbd5e1;
    border-radius: 50%;
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dot.active {
    background-color: #22c55e; /* Verde logro */
    border-color: #22c55e;
    transform: scale(1.15);
}

/* El Teclado Numérico Gigante */
.teclado-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.btn-num {
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-bottom: 6px solid #cbd5e1; /* Botón gordo */
    border-radius: 16px;
    font-family: var(--font-kids);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    padding: 14px 0;
    cursor: pointer;
    transition: all 0.05s ease;
}

.btn-num:active {
    transform: translateY(4px);
    border-bottom-width: 2px;
    background: #e2e8f0;
}

.btn-action {
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-clear { background: #fee2e2; border-color: #fca5a5; border-bottom-color: #fca5a5; }
.btn-backspace { background: #fef3c7; border-color: #fde68a; border-bottom-color: #fde68a; }

/* Mensaje de Error Divertido */
.error-bubble {
    background: #fef2f2;
    border: 2px solid #ef4444;
    color: #b91c1c;
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 600;
}