/* Variables de color inspiradas en Admisión PUCP */
:root {
    --pucp-blue: #042354;       /* Azul oscuro institucional */
    --pucp-light-blue: #004EA8; /* Azul medio */
    --pucp-cyan: #00AEEF;       /* Cian brillante para acentos */
    --pucp-magenta: #E30613;    /* Magenta para alertas/errores */
    --pucp-gray: #F2F2F2;       /* Gris claro para fondos */
    --text-dark: #333333;
    --text-light: #FFFFFF;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--pucp-gray);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header estilo PUCP */
.pucp-header {
    background-color: var(--pucp-blue);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center; /* Centrado para móvil/kiosco */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-pucp {
    height: 50px;
    filter: brightness(0) invert(1); /* Logo blanco */
}

/* Contenedor principal */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: url("https://admision.pucp.edu.pe/sites/default/files/shape-4elements.png"); /* Elemento gráfico sutil */
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: 300px;
}

.search-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    border-top: 5px solid var(--pucp-cyan); /* Acento de color */
}

.app-title {
    color: var(--pucp-blue);
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* Pantalla del buscador */
#display {
    width: 100%;
    height: 80px;
    font-size: 48px;
    font-weight: 600;
    text-align: center;
    color: var(--pucp-blue);
    background-color: var(--pucp-gray);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 25px;
    transition: border-color 0.3s;
}

#display:focus {
    outline: none;
    border-color: var(--pucp-cyan);
}

/* Teclado numérico */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.btn-key {
    padding: 20px;
    font-size: 24px;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    background-color: white;
    color: var(--pucp-blue);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-key:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

.btn-key:active {
    transform: translateY(0);
}

/* Botones especiales */
.btn-key.action-clear {
    color: var(--pucp-magenta);
    font-weight: 700;
}

.btn-key.action-backspace {
    color: var(--pucp-light-blue);
}

.btn-key.number-0 {
    /* grid-column: span 3; Si quisieras el 0 ancho, pero mantendremos el grid 3x4 */
}

/* Mensaje Overlay */
#mensaje {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(4, 35, 84, 0.95); /* Azul PUCP con transparencia */
    color: white;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.mensaje-content {
    text-align: center;
    padding: 40px;
    border-radius: 20px;
    max-width: 90%;
}

.mensaje-texto {
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.mensaje-subtexto {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* Footer */
.pucp-footer {
    background-color: var(--pucp-blue);
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-content {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 576px) {
    .search-card {
        padding: 20px;
        box-shadow: none;
        border-radius: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .main-content {
        padding: 0;
        background: white;
    }
    
    .app-title {
        font-size: 1.5rem;
    }

    #display {
        font-size: 24px; /* Reducir tamaño de fuente para que quepa el placeholder */
    }
    
    .btn-key {
        padding: 15px;
        font-size: 20px;
        background-color: var(--pucp-gray); /* Más contraste en móvil */
    }

    .mensaje-texto {
        font-size: 5rem; /* Reducir tamaño de fuente del mensaje en móvil */
        word-break: break-word; /* Asegurar que palabras largas no rompan el layout */
    }
    
    .mensaje-content {
        padding: 20px;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}
