* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    background-color: #000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.calculadora {
    background-color: #48bfff;
    color: white;
    width: 350px;
    max-width: 100%;
    padding: 1.5rem;
    border-radius: 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    box-shadow: 0 0 20px #48bfff;
}

.pantalla {
    grid-column: 1 / 5;
    background-color: #090c31;
    padding: 1rem;
    font-size: 2.5rem;
    text-align: right;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 4rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.btn {
    background-color: #006da7;
    color: white;
    border: 0;
    padding: 1.2rem 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    user-select: none;
}

.btn:hover {
    background-color: #004f78;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

#cero {
    grid-column: span 2;
}

#igual {
    grid-row: span 2;
    background-color: #e65766;
}

#igual:hover {
    background-color: #e6394a;
}

/* Media Query para pantallas pequeñas */
@media (max-width: 400px) {
    .calculadora {
        width: 95%;
        padding: 1rem;
    }
    
    .pantalla {
        font-size: 2rem;
        padding: 0.8rem;
    }
    
    .btn {
        padding: 1rem 0.3rem;
    }
}
