* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.calculadora {
    background: white;
    border-radius: 30px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 500px;
}

.display {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: right;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

#expressao {
    font-size: 18px;
    color: #6c757d;
    min-height: 27px;
    word-wrap: break-word;
}

#resultado {
    font-size: 36px;
    font-weight: bold;
    color: #212529;
    min-height: 54px;
    word-wrap: break-word;
}

.botoes {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

button {
    padding: 18px 5px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    background: #e9ecef;
    color: #212529;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-operador {
    background: #339af0;
    color: white;
}

.btn-cientifico {
    background: #ae3ec9;
    color: white;
    font-size: 16px;
}

.btn-igual {
    background: #51cf66;
    color: white;
    font-size: 24px;
}

.btn-limpar {
    background: #ff6b6b;
    color: white;
}

.btn-zero {
    grid-column: span 1;
}

/* Responsividade */
@media (max-width: 550px) {
    .calculadora {
        width: 100%;
        padding: 15px;
    }
    
    button {
        padding: 15px 3px;
        font-size: 16px;
    }
    
    .btn-cientifico {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .botoes {
        gap: 5px;
    }
    
    button {
        padding: 12px 2px;
        font-size: 14px;
    }
}