:root { 
    --color-bg-magico: linear-gradient(135deg, #ffdeae, #bbf7d0, #bfdbfe); 
    --color-canvas-ninos: #fffbeb; 
    --texto-principal: #1e293b; 
    --texto-mutado: #475569; 
    --g-prestamo: linear-gradient(135deg, #ff5e62, #ff9966); 
    --g-devolucion: linear-gradient(135deg, #00c6ff, #0072ff); 
}

* { 
    box-sizing: border-box; 
}

body { 
    margin: 0; 
    padding: 20px; 
    font-family: 'Comic Sans MS', 'Segoe UI', sans-serif; 
    background: var(--color-bg-magico); 
    min-height: 100vh; 
    color: var(--texto-principal); 
}

/* Reduje el max-width de 1200px a 1000px para que el diseño no quede tan ancho en pantalla */
.contenedor-app { 
    width: 95%; 
    max-width: 1000px; 
    min-height: 620px; 
    margin: 0 auto; 
    background: var(--color-canvas-ninos); 
    border-radius: 40px; 
    padding: 35px; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.1); 
    border: 5px solid #ffffff; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.banner-colegio { 
    background: linear-gradient(90deg, #ff007f, #ffaa00, #00aaff); 
    color: white; 
    text-align: center; 
    padding: 15px; 
    font-size: 26px; 
    font-weight: 900; 
    border-radius: 20px; 
    margin-bottom: 20px; 
    box-shadow: 0 8px 15px rgba(0,0,0,0.08); 
}

.barra-superior { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-bottom: 10px; 
}

.saludo-mascota { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

.avatar-mascota { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    border: 4px solid #ffaa00; 
    object-fit: cover; 
}

.texto-bienvenida h1 { margin: 0; font-size: 32px; font-weight: 900; color: #5a189a; }
.texto-bienvenida p { margin: 5px 0 0 0; color: var(--texto-mutado); font-size: 18px; font-weight: bold; }

.boton-maestras { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    background: #ffffff; 
    border: 3px solid #cbd5e1; 
    padding: 12px 24px; 
    border-radius: 50px; 
    cursor: pointer; 
}
.boton-maestras span { font-size: 28px; }
.txt-btn-maestra b { display: block; font-size: 15px; color: #1e293b; text-align: left; }
.txt-btn-maestra small { color: #64748b; font-size: 11px; display: block; text-align: left; }

.grid-tarjetas-gigantes { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 35px; 
    flex-grow: 1; 
}

.tarjeta-enorme { 
    height: 100%; 
    min-height: 380px; 
    border-radius: 35px; 
    color: white; 
    padding: 30px; 
    position: relative; 
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    overflow: hidden; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.08); 
}

.t-prestamo { background: var(--g-prestamo); } 
.t-devolucion { background: var(--g-devolucion); }

/* Reglas generales para que funcionen como marca de agua */
.decoracion-personaje { 
    position: absolute; 
    opacity: 0.35; 
    pointer-events: none; 
    z-index: 1;
}

/* Ajuste individual para hacer crecer al Unicornio */
.img-unicornio {
    width: 310px; /* Súbele a este número si lo quieres aún más grande */
    right: -10px; /* Lo mueve un poquito a la derecha */
    bottom: 20px; 
}

/* Ajuste individual para encoger al Dragón */
.img-dragon {
    width: 260px; /* Bájale a este número si lo quieres más chiquito */
    right: -20px; 
    bottom: 20px; 
}

/* Asegura que el texto y el botón siempre queden por encima */
.contenido-tarjeta, .flecha-accion {
    position: relative;
    z-index: 2;
}

.contenido-tarjeta { position: relative; z-index: 2; text-align: left; }
.contenido-tarjeta h2 { font-size: 34px; font-weight: 900; margin: 0 0 10px 0; }
.contenido-tarjeta p { font-size: 18px; margin: 0; opacity: 0.95; font-weight: bold; }
.flecha-accion { width: 100%; background: #ffffff; color: #1e293b; padding: 16px 0; text-align: center; border-radius: 20px; font-weight: 900; font-size: 20px; z-index: 2; }
.boton-volver { background: #ff007f; color: white; border: none; padding: 12px 28px; border-radius: 50px; font-weight: bold; cursor: pointer; font-size: 16px; align-self: flex-start; margin-bottom: 15px; }

.formulario-caja-completa { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    background: #ffffff; 
    padding: 40px; 
    border-radius: 35px; 
    text-align: center; 
    flex-grow: 1; 
}
.formulario-caja-completa h2 { font-size: 42px; color: #5a189a; margin: 0 0 15px 0; font-weight: 900; }
.formulario-caja-completa p { font-size: 22px; margin: 0 0 35px 0; font-weight: bold; color: var(--texto-mutado); }

.simulador-escaner-gigante { display: flex; gap: 35px; justify-content: center; align-items: stretch; width: 100%; flex-grow: 1; }
/* 1. Efecto limpio y moderno para las cajas de escaneo (Igual que las tarjetas principales) */
.zona-escanear { 
    flex: 1; 
    border-radius: 35px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 250px; 
    font-weight: 900; 
    font-size: 26px; 
    color: white; 
    /* Le quitamos el borde blanco y le ponemos la sombra suave de las tarjetas */
    border: none; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.08); 
    transition: transform 0.3s ease; /* Animación suave */
}

/* Efecto al pasar el mouse para que se sientan interactivas */
.zona-escanear:hover {
    transform: translateY(-5px);
}
/* Botón 1 (Credencial): Rosa Unicornio Brillante */
.btn-gradiente-alumno { 
    background: linear-gradient(135deg, #e11d48 0%, #fda4af 100%) !important; 
    color: #ffffff !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
} 

/* Botón 2 (Libro QR): Verde Esmeralda Mágico */
.btn-gradiente-libro { 
    background: linear-gradient(135deg, #047857 0%, #6ee7b7 100%) !important; 
    color: #ffffff !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

/* Botón Devolución: Morado Chimuelo Profundo */
.btn-gradiente-devolucion { 
    background: linear-gradient(135deg, #4c1d95 0%, #c084fc 100%) !important; 
    color: #ffffff !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}
.icono-grande { font-size: 110px; display: block; margin-bottom: 20px; line-height: 1; }

.contenedor-lectometro-barra { margin-bottom: 15px; text-align: left; background: #f8fafc; padding: 10px 14px; border-radius: 18px; border: 2px solid #e2e8f0; }
.info-lectometro-barra { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 16px; }
.badge-libros { background: #ffffff; padding: 4px 10px; border-radius: 50px; font-weight: bold; border: 2px solid #cbd5e1; }
.fondo-barra-progreso { width: 100%; height: 18px; background: #e2e8f0; border-radius: 50px; overflow: hidden; }
.relleno-barra-progreso { height: 100%; border-radius: 50px; transition: width 0.5s ease; }
.barra-morada { background: linear-gradient(90deg, #9d4edf, #5a189a); } 
.barra-verde { background: linear-gradient(90deg, #10b981, #059669); }

.panel-admin-modal { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(0, 0, 0, 0.6); 
    justify-content: center; 
    align-items: center; 
    z-index: 9999; 
}

.caja-modal-admin { 
    background: white; 
    padding: 35px; 
    border-radius: 30px; 
    width: 95%; 
    max-width: 650px; 
    max-height: 90vh; 
    overflow-y: auto; 
    text-align: center; 
}

.encabezado-modal { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 2px dashed #cbd5e1; padding-bottom: 10px; }
.cerrar-modal { background: #ff4d6d; border: none; color: white; font-size: 18px; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; font-weight: bold; }
.seccion-lectometro-interna { background: #fffbeb; border-radius: 20px; padding: 20px; margin-bottom: 25px; border: 2px solid #ffdeae; text-align: left; }
.bloque-registro { background: #f1f5f9; padding: 20px; border-radius: 20px; text-align: left; margin-bottom: 15px; }
.campo-input { width: 100%; padding: 12px; border-radius: 12px; border: 2px solid #cbd5e1; font-size: 16px; margin-bottom: 15px; font-family: inherit; }
.btn-crear-qr { width: 100%; background: #631aff; color: white; border: none; padding: 14px; border-radius: 12px; font-weight: bold; font-size: 16px; cursor: pointer; }

/* Botón Principal de Entrada */
.btn-entrar-magico {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    font-size: 26px;
    padding: 20px 40px;
    border-radius: 50px;
    border: none;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* Sombra suave */
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3); /* Brillo en el texto */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Animación */
}

/* Efecto al pasar el mouse */
.btn-entrar-magico:hover {
    transform: translateY(-5px); /* Hace que el botón "salte" un poquito */
    box-shadow: 0 15px 30px rgba(0,0,0,0.25); /* La sombra se hace más grande al flotar */
}

/* Estilos para las nuevas imágenes de los escáneres */
.icono-escaner {
    width: 120px; /* Tamaño ideal para que se vean claros pero no estorben */
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.25)); /* Sombra para que floten */
    transition: transform 0.3s ease; /* Para la animación */
}

/* Efecto divertido: la imagen crece un poco cuando pasas el mouse por la caja */
.zona-escanear:hover .icono-escaner {
    transform: scale(1.15) rotate(-3deg); 
}